aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* store: Add 'topologically-sorted'.Ludovic Courtès2014-01-24
| | | | | | | * guix/store.scm (topologically-sorted): New procedure. * tests/store.scm ("topologically-sorted, one item", "topologically-sorted, several items", "topologically-sorted, more difficult"): New tests.
* nar: Add 'restore-file-set', for use by build hooks.Ludovic Courtès2014-01-24
| | | | | | | | | | | | | | | * guix/nar.scm (&nar-invalid-hash-error, &nar-signature-error): New condition types. (&nar-error): Add 'file' and 'port' fields. (&nar-read-error): Remove 'port' and 'file' fields. (lock-store-file, unlock-store-file, finalize-store-file, temporary-store-directory, restore-file-set): New procedures. * tests/nar.scm (%seed): New variable. (random-text): New procedure. ("restore-file-set (signed, valid)", "restore-file-set (missing signature)", "restore-file-set (corrupt)"): New tests. * po/Makevars (XGETTEXT_OPTIONS): Add '--keyword=message'.nar fixes * po/POTFILES.in: Add guix/nar.scm.
* hash: Add 'open-sha256-input-port', for Guile > 2.0.9.Ludovic Courtès2014-01-24
| | | | | | | | * guix/hash.scm (open-sha256-input-port): New procedure. * tests/hash.scm (supports-unbuffered-cbip?): New procedure. ("open-sha256-input-port, empty", "open-sha256-input-port, hello", "open-sha256-input-port, hello, one two", "open-sha256-input-port, hello, read from wrapped port"): New tests.
* utils: Add 'fcntl-flock'.Ludovic Courtès2014-01-24
| | | | | | * guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables. (fcntl-flock): New procedure. * tests/utils.scm ("fcntl-flock"): New test.
* store: Add 'register-path' procedure.Ludovic Courtès2014-01-24
| | | | | | | | | * guix/store.scm (register-path): New procedure. * tests/store.scm ("register-path"): New test. * guix/config.scm.in (%guix-register-program): New variable. * configure.ac: Compute and substitute 'guix_sbindir'. Compute 'guix_prefix'. * pre-inst-env.in: Define 'GUIX_REGISTER'.
* guix-register: Support registration in the current store, without '--prefix'.Ludovic Courtès2014-01-24
| | | | | | | * nix/guix-register/guix-register.cc (register_validity): Leave 'info.path' unmodified when PREFIX is empty. (main): Call 'settings.processEnvironment' early on. Leave 'settings.nixStore' unmodified when PREFIX is empty.
* archive: Add '--missing'.Ludovic Courtès2014-01-06
| | | | | | | | * guix/scripts/archive.scm (show-help, %options): Add '--missing'. (guix-archive)[lines]: New procedure. Use it to honor '--missing'. * tests/guix-archive.sh: Add tests. * doc/guix.texi (Invoking guix archive): Document '--missing'.
* guix package: Gracefully deal with EPIPE on stdout for --list-*.Ludovic Courtès2014-01-04
| | | | | | | * guix/scripts/package.scm (leave-on-EPIPE): New macro. (guix-package): Use it for 'list-installed', 'list-available', and '--list-generations'. * tests/guix-package.sh: Add test.
* archive: Add '--authorize'.Ludovic Courtès2013-12-30
| | | | | | | | | * guix/scripts/archive.scm (authorize-key): New procedure. (guix-archive): Call it when OPTS contains 'authorize-key'. * tests/guix-archive.sh: Add test with invalid public key. * guix/pki.scm: Export '%acl-file'. * doc/guix.texi (Invoking guix archive): Make it clear that '--import' works only with authorized keys. Document '--authorize'.
* pk-crypto: Fix 'canonical-sexp->sexp' for atoms.Ludovic Courtès2013-12-30
| | | | | | * guix/pk-crypto.scm (canonical-sexp->sexp): Add hack to extract an atom's buffer. * tests/pk-crypto.scm ("sexp->canonical-sexp->sexp"): Add sample.
* pk-crypto: Work around Libgcrypt bug <https://bugs.g10code.com/gnupg/issue1594>.Ludovic Courtès2013-12-30
| | | | | | | * guix/pk-crypto.scm (canonical-sexp-fold): Call 'nth-data' before 'nth' to work around <https://bugs.g10code.com/gnupg/issue1594>. * tests/pk-crypto.scm ("https://bugs.g10code.com/gnupg/issue1594"): New test.
* Add (guix pki).Ludovic Courtès2013-12-29
| | | | | | * guix/pki.scm, tests/pki.scm: New files. * Makefile.am (MODULES): Add 'guix/pki.scm'. (SCM_TESTS): Add 'tests/pki.scm'.
* pk-crypto: Add canonical-sexp to sexp conversion procedures.Ludovic Courtès2013-12-29
| | | | | | | * guix/pk-crypto.scm (canonical-sexp-fold, canonical-sexp->sexp, sexp->canonical-sexp): New procedures. * tests/pk-crypto.scm ("canonical-sexp->sexp", "sexp->canonical-sexp->sexp"): New tests.
* pk-crypto: Add 'canonical-sexp-length' and related procedures.Ludovic Courtès2013-12-29
| | | | | | | * guix/pk-crypto.scm (canonical-sexp-length, canonical-sexp-null?, canonical-sexp-list?): New procedures. * tests/pk-crypto.scm ("canonical-sexp-length", "canonical-sexp-list?"): New tests.
* pk-crypto: 'canonical-sexp-nth-data' returns a symbol for "tokens".Ludovic Courtès2013-12-29
| | | | | | | | | | * guix/pk-crypto.scm (token-string?): New procedure. (canonical-sexp-nth-data): Return a symbol when the element is a "token", and a bytevector otherwise. (latin1-string->bytevector): Remove. (hash-data->bytevector): Adjust accordingly. * tests/pk-crypto.scm ("canonical-sexp-nth"): Adjust accordingly. Add octet string example.
* authenticate: Store the public key as part of the signature.Ludovic Courtès2013-12-29
| | | | | | | * guix/scripts/authenticate.scm (signature-sexp): New procedure. (guix-authenticate): Use it to produce the signature. Adjust verification code accordingly. * tests/store.scm ("import corrupt path"): Adjust test accordingly.
* pk-crypto: Rename 'gcry-sexp' to 'canonical-sexp'.Ludovic Courtès2013-12-29
| | | | | | | * guix/pk-crypto.scm: Rename procedures, variables, etc. from 'gcry-sexp' to 'canonical-sexp'. Add comment with references. * guix/scripts/authenticate.scm, tests/pk-crypto.scm: Adjust accordingly.
* Add 'guix archive'.Ludovic Courtès2013-12-22
| | | | | | | | | * guix/scripts/archive.scm, tests/guix-archive.sh: New files. * Makefile.am (MODULES): Add 'archive.scm'. (SH_TESTS): Add 'guix-archive.sh'. * doc/guix.texi (Invoking guix archive): New section. * guix/scripts/build.scm: Export 'derivation-from-expression'. * guix/scripts/package.scm: Export 'specification->package+output'.
* authenticate: Add test.Ludovic Courtès2013-12-21
| | | | | * tests/guix-authenticate.sh: New file. * Makefile.am (SH_TESTS): Add it.
* build: Adjust pk-crypto tests to Libgcrypt 1.5.3.Ludovic Courtès2013-12-21
| | | | | | | | Reported by Andreas Enge <andreas@enge.fr>. * tests/pk-crypto.scm ("string->gcry-sexp->string"): Remove "#C0FFEE#" from SEXPS. ("gcry-sexp-nth"): Start at index 1.
* daemon: Implement signed archive import/export.Ludovic Courtès2013-12-20
| | | | | | | | | | | | | | | | | | | | | * guix/scripts/authenticate.scm, nix/scripts/guix-authenticate.in, tests/signing-key.pub, tests/signing-key.sec: New files. * po/POTFILES.in: Add 'guix/scripts/authenticate.scm'. * guix/store.scm (dump-port): New procedure. (process-stderr): Add 'user-port' optional parameter. Handle the %STDERR-WRITE and %STDERR-READ cases as expected. (import-paths, export-path, export-paths): New procedures. * tests/store.scm ("export/import several paths", "import corrupt path"): New tests. * Makefile.am (MODULES): Add 'guix/scripts/authenticate.scm'. (EXTRA_DIST): Add 'tests/signing-key.{pub,sec}'. * daemon.am (libstore_a_CPPFLAGS)[-DNIX_CONF_DIR]: Change 'NIX_CONF_DIR' to .../guix. Change 'OPENSSL_PATH' to 'guix-authenticate'. * config-daemon.ac: Instantiate 'nix/scripts/guix-authenticate'. * nix/nix-daemon/guix-daemon.cc (main): Augment $PATH to include 'settings.nixLibexecDir'. * test-env.in: Export 'NIX_CONF_DIR' and 'NIX_LIBEXEC_DIR'. Populate $NIX_CONF_DIR.
* pk-crypto: Add a few sexp utility procedures.Ludovic Courtès2013-12-20
| | | | | | | | * guix/pk-crypto.scm (gcry-sexp-car, gcry-sexp-cdr, gcry-sexp-nth, gcry-sexp-nth-data, dereference-size_t, latin1-string->bytevector, hash-data->bytevector): New procedures. * tests/pk-crypto.scm ("gcry-sexp-car + cdr", "gcry-sexp-nth", "gcry-sexp-nth-data", "bytevector->hash-data->bytevector"): New tests.
* Add (guix pk-crypto).Ludovic Courtès2013-12-20
| | | | | * guix/pk-crypto.scm, tests/pk-crypto.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them.
* guix package: allow multiple arguments after -i, -r, and -u.Mark H Weaver2013-12-14
| | | | | | | | | | | | | | | | * guix/scripts/package.scm (%options): Adapt option processors to accept and return a second seed value: 'arg-handler', which handles bare arguments (if not false). The install, remove, and upgrade option processors return an arg-handler that repeat the same operation. All other option processors return #f as the arg-handler. Make the arguments to install and remove optional. The upgrade option processor deletes (upgrade . #f) from the alist before adding a new entry. (guix-package): Procedures passed to 'args-fold*' accept the new seed value 'arg-handler'. The 'operand-proc' uses 'arg-handler' (if not false). * doc/guix.texi (Invoking guix package): Update docs. * tests/guix-package.sh: Add test.
* build: Skip one 'package-source-derivation' test when networking is missing.Ludovic Courtès2013-12-11
| | | | | * tests/packages.scm ("package-source-derivation, snippet"): Skip when networking is missing.
* store: Add tests for 'store-path-package-name'.Ludovic Courtès2013-12-11
| | | | | * tests/store.scm ("store-path-package-name", "store-path-package-name #f"): New tests.
* monads: Fix 'anym'.Ludovic Courtès2013-12-10
| | | | | * guix/monads.scm (anym): Fix successful case. * tests/monads.scm ("anym"): New test.
* derivations: Use more keyword parameters for 'build-expression->derivation'.Ludovic Courtès2013-12-04
| | | | | | | | | | | | | | | | | * guix/derivations.scm (build-expression->derivation): Turn 'system' and 'inputs' into keyword parameters. Adjust callers accordingly. * gnu/system/linux.scm, gnu/system/vm.scm, guix/build-system/cmake.scm, guix/build-system/gnu.scm, guix/build-system/perl.scm, guix/build-system/python.scm, guix/build-system/trivial.scm, guix/download.scm, guix/packages.scm, guix/profiles.scm, guix/scripts/pull.scm, tests/derivations.scm, tests/guix-build.sh, tests/monads.scm, tests/store.scm, tests/union.scm: Adjust users of 'build-expression->derivation' and 'derivation-expression' accordingly. * doc/guix.texi (Derivations): Adjust 'build-expression->derivation' documentation accordingly. (The Store Monad): Likewise for 'derivation-expression'.
* Merge branch 'master' into core-updatesLudovic Courtès2013-11-20
|\ | | | | | | | | Conflicts: guix/packages.scm
| * packages: 'package-field-location' returns a relative file name.Ludovic Courtès2013-11-18
| | | | | | | | | | | | | | * guix/packages.scm (package-field-location): Set %FILE-PORT-NAME-CANONICALIZATION. * tests/packages.scm ("package-field-location, relative file name"): New test.
| * guix build: '-e' can be passed a monadic thunk.Ludovic Courtès2013-11-18
| | | | | | | | | | | | | | | | | | | | | | | | * guix/ui.scm (read/eval): New procedure. (read/eval-package-expression): Use it. * guix/scripts/build.scm (derivations-from-package-expressions): Rename to... (derivation-from-expression): ... this. Accept procedures, under the assumption that they are monadic thunk. (show-help): Adjust accordingly. (guix-build): Ditto. * tests/guix-build.sh: Add test. * doc/guix.texi (Invoking guix build): Augment description of '-e'.
| * derivations: Allow 'map-derivations' to replace sources.Ludovic Courtès2013-11-13
| | | | | | | | | | | | | | * guix/derivations.scm (map-derivation)[input->output-paths]: Allow non-derivation inputs. Allow replacements to be store files. Replace in SOURCES too. * tests/derivations.scm ("map-derivation, sources"): New test.
| * packages: Suitably cope with indirect store paths as package sources.Ludovic Courtès2013-11-13
| | | | | | | | | | | | | | * guix/packages.scm (package-source-derivation): Don't let indirect store paths pass through. * tests/packages.scm ("package-source-derivation, indirect store path"): New test.
| * store: Make 'direct-store-path?' public.Ludovic Courtès2013-11-13
| | | | | | | | | | | | * guix/store.scm (direct-store-path?): New procedure. * guix/derivations.scm (derivation)[direct-store-path?]: Remove. * tests/store.scm ("direct-store-path?"): New test.
| * derivations: Add 'map-derivation'.Ludovic Courtès2013-11-13
| | | | | | | | | | * guix/derivations.scm (map-derivation): New procedure. * tests/derivations.scm ("map-derivation"): New test.
| * utils: Add 'string-replace-substring'.Ludovic Courtès2013-11-13
| | | | | | | | | | | | * guix/utils.scm (string-replace-substring): New procedure. Based on code by Mark H. Weaver. * tests/utils.scm ("string-replace-substring"): New test.
| * guix build: Add '--log-file'.Ludovic Courtès2013-11-12
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (show-help): Add '--log-file'. (%options): Likewise. (guix-build): Set %FILE-PORT-NAME-CANONICALIZATION. Honor '--log-file'. * tests/guix-build.sh: Add '--log-file' tests. * doc/guix.texi (Invoking guix build): Document '--log-file'.
| * store: Add 'log-file' procedure.Ludovic Courtès2013-11-12
| | | | | | | | | | | | * guix/store.scm (log-file): New procedure. * tests/store.scm ("log-file, derivation", "log-file, output file name"): New tests.
* | tests: Adjust to bootstrap tarball updates.Ludovic Courtès2013-11-16
| | | | | | | | | | | | | | | | Reported by Mark H. Weaver <mhw@netris.org>. * tests/packages.scm ("package-source-derivation, snippet"): Change to "guile-2.0.9.tar.xz". * tests/union.scm ("union-build"): Check or include/c++ being a symlink.
* | Merge branch 'master' into core-updatesLudovic Courtès2013-11-08
|\| | | | | | | | | Conflicts: guix/packages.scm
| * packages: Add a 'snippet' field to <origin>.Ludovic Courtès2013-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (<origin>): Add 'snippet', 'modules', and 'imported-modules' fields. (patch-and-repack): Make 'inputs' a keyword parameter. Add 'snippet', 'modules', and 'imported-modules' parameters. Accept SOURCE as a raw file name. Insert SNIPPET in BUILDER. Pass IMPORTED-MODULES to 'build-expression->derivation'. (package-source-derivation): Pass the extra arguments to 'patch-and-repack'. * tests/packages.scm ("package-source-derivation, snippet"): New test. * doc/guix.texi (Defining Packages): Mention the 'patches' and 'snippet' fields. (Invoking guix build): Tell that --source has patches and snippets applied. (Software Freedom): Mention packages that contain non-free code.
| * tests: Fix max-silent-time test.Ludovic Courtès2013-11-04
| | | | | | | | | | | | * tests/derivations.scm ("build-expression->derivation and max-silent-time"): Use STORE instead of %STORE. Change BUILDER to succeed by default. Return #f when no exception is raised.
| * tests: Add the builder as an input to raw derivations.Ludovic Courtès2013-11-04
| | | | | | | | | | | | | | | | | | | | * tests/derivations.scm ("build derivation with 1 source", "derivation with local file as input", "derivation with a fixed-output input", "multiple-output derivation", "multiple-output derivation, non-alphabetic order", "user of multiple-output derivation"): Add %BASH as an input, needed in chroot builds.
| * guix package: Allow removal of a specific package output.Ludovic Courtès2013-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/15756>. * guix/profiles.scm (<manifest-pattern>): New record type. (remove-manifest-entry): Remove. (entry-predicate, manifest-matching-entries): New procedures. (manifest-remove): Accept a list of <manifest-pattern>. (manifest-installed?): Replace 'name' parameter by 'pattern', a <manifest-pattern>. * guix/scripts/package.scm (options->removable): Return a list of <manifest-pattern>. (guix-package)[process-action]: Use 'manifest-matching-entries' to compute the list of packages to remove. * tests/profiles.scm: New file. * Makefile.am (SCM_TESTS): Add it.
| * ui: Factorize package specification parsing.Ludovic Courtès2013-11-01
|/ | | | | | | * guix/ui.scm (package-specification->name+version+output): New procedure. * guix/scripts/package.scm (specification->package+output): Use it. * tests/ui.scm ("package-specification->name+version+output"): New test.
* derivations: 'derivation-path->output-path' honors the 'output' parameter.Ludovic Courtès2013-10-30
| | | | | | * guix/derivations.scm (derivation-path->output-path): Pass OUTPUT. * tests/derivations.scm ("multiple-output derivation, derivation-path->output-path"): New test.
* records: define-record-type*: Field bindings are bound with 'let*'.Ludovic Courtès2013-10-15
| | | | | | | * guix/records.scm (define-record-type*): Wrap field bindings in a 'let*', not in a 'letrec*', which turned out to be pointlessly inconvenient. * tests/records.scm: Adjust test names accordingly.
* monads: Allow resolution of a monad's bind/return at expansion time.Ludovic Courtès2013-10-03
| | | | | | | | | * guix/monads.scm (<monad>): Turn in a raw SRFI-9 record type. (define-monad): New macro. (with-monad): Add a case for when MONAD is a macro. (identity-return, identity-bind, store-return, store-bind): Inline. (%identity-monad, %store-monad): Use 'define-monad'. * tests/monads.scm ("monad?"): New test.
* Add (guix monads).Ludovic Courtès2013-10-03
| | | | | | | | | * guix/monads.scm: New file. * tests/monads.scm: New file. * Makefile.am (MODULES): Add guix/monads.scm. (SCM_TESTS): Add tests/monads.scm. * doc/guix.texi (The Store Monad): New node. (The Store): Reference it.
* guix package: '--delete-generations' deletes generations older than specified.Ludovic Courtès2013-09-27
| | | | | | | | | | * guix/scripts/package.scm (matching-generations): Add 'duration-relation' keyword parameter. (guix-package)[process-action](delete-generations): Pass #:duration-relation >. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix package): Clarify the meaning of durations for '--list-durations' and '--delete-durations'.