summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2013-11-13derivations: Add 'map-derivation'....* guix/derivations.scm (map-derivation): New procedure. * tests/derivations.scm ("map-derivation"): New test. Ludovic Courtès
2013-11-13utils: Add 'string-replace-substring'....* guix/utils.scm (string-replace-substring): New procedure. Based on code by Mark H. Weaver. * tests/utils.scm ("string-replace-substring"): New test. Ludovic Courtès
2013-11-12guix build: Add '--log-file'....* 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'. Ludovic Courtès
2013-11-12store: Add 'log-file' procedure....* guix/store.scm (log-file): New procedure. * tests/store.scm ("log-file, derivation", "log-file, output file name"): New tests. Ludovic Courtès
2013-11-08Merge branch 'master' into core-updates...Conflicts: guix/packages.scm Ludovic Courtès
2013-11-07packages: Add a 'snippet' field to <origin>....* 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. Ludovic Courtès
2013-11-04tests: Fix max-silent-time test....* 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. Ludovic Courtès
2013-11-04tests: Add the builder as an input to raw derivations....* 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. Ludovic Courtès
2013-11-01guix package: Allow removal of a specific package output....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. Ludovic Courtès
2013-11-01ui: Factorize package specification parsing....* 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. Ludovic Courtès
2013-10-30derivations: 'derivation-path->output-path' honors the 'output' parameter....* guix/derivations.scm (derivation-path->output-path): Pass OUTPUT. * tests/derivations.scm ("multiple-output derivation, derivation-path->output-path"): New test. Ludovic Courtès
2013-10-15records: define-record-type*: Field bindings are bound with 'let*'....* 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. Ludovic Courtès
2013-10-03monads: Allow resolution of a monad's bind/return at expansion time....* 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. Ludovic Courtès
2013-10-03Add (guix monads)....* 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. Ludovic Courtès
2013-09-27guix package: '--delete-generations' deletes generations older than specified....* 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'. Ludovic Courtès
2013-09-27tests: Fix typo....* tests/guix-package.sh: Add missing "-p" option. Ludovic Courtès
2013-09-27build-system/trivial: Take the 'source' field into account....* guix/build-system/trivial.scm (trivial-build): When SOURCE is true, add it to INPUTS. (trivial-cross-build): Likewise. * tests/packages.scm ("trivial with source"): New test. Ludovic Courtès
2013-09-26guix package: Add '--delete-generations'....* guix/scripts/package.scm (switch-to-previous-generation): New function. (roll-back): Use the new function instead of 'switch-link'. (show-help): Add '--delete-generations'. (%options): Likewise. (guix-package)[process-actions]: Add 'current-generation-number', 'display-and-delete', and 'delete-generation'. Add support for '--delete-generations', and reindent the code. * tests/guix-package.sh: Test '--delete-generations'. * doc/guix.texi (Invoking guix-package): Document '--delete-generations'. Nikita Karetnikov
2013-09-25guix package: Show which generation is the current one....* guix/scripts/package.scm (guix-package)[process-query]: Show that a generation is the current one if the profile points to it. * tests/guix-package.sh: Test it. Nikita Karetnikov
2013-09-25tests: Use 'test -z' to check that a string equals zero.Nikita Karetnikov
2013-09-25guix package: Do not list the zeroth generation....* guix/scripts/package.scm (guix-package)[process-query]: Change 'list-generation' to not list the zeroth generation. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it, and use the right term when talking about generations. Nikita Karetnikov
2013-09-25guix package: Exit with 1 when a generation cannot be listed....* guix/scripts/package.scm (guix-package)[process-query]: Exit with 1 when a generation does not exist or the profile points to the zeroth generation. * tests/guix-package.sh: Test the former case. Nikita Karetnikov
2013-09-23guix-register: Expect closures to refer to the original store....* nix/guix-register/guix-register.cc (prefix): New variable. (parse_opt): Use it. (register_validity): Change 'info.path' to the final store name. Hash the final under its real path. * tests/guix-register.sh: Adjust the contents of $closure accordingly. Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'. Don't try to call 'valid-path?'. Add test using 'sqlite3'. Ludovic Courtès
2013-09-23Add 'guix-register'....* nix/guix-register/guix-register.cc, tests/guix-register.sh: New files. * Makefile.am (SH_TESTS)[BUILD_DAEMON]: Add tests/guix-register.sh. * daemon.am (sbin_PROGRAMS, guix_register_SOURCES, guix_register_CPPFLAGS, guix_register_LDADD): New variables. * test-env.in: Export 'storedir', 'prefix', 'datarootdir', 'datadir', and 'localstatedir'. Ludovic Courtès
2013-09-19guix package: Add '--list-generations'....* guix/scripts/package.scm: Import (srfi srfi-19). (generation-time, matching-generations): New functions. (show-help): Add '--list-generations'. (%options): Likewise. (guix-package)[process-query]: Add support for '--list-generations'. * guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex). (string->generations, string->duration): New functions. * tests/guix-package.sh: Test '--list-generations'. * tests/ui.scm: Import (srfi srfi-19). Test 'string->generations' and 'string->duration'. * doc/guix.texi (Invoking guix-package): Document '--list-generations'. Nikita Karetnikov
2013-09-18derivations: 'derivation' and related procedures return a single value....* guix/derivations.scm (derivation->output-path, derivation->output-paths): New procedures. (derivation-path->output-path): Use 'derivation->output-path'. (derivation-path->output-paths): Use 'derivation->output-paths'. (derivation): Accept 'derivation?' objects as inputs. Return a single value. (build-derivations): New procedure. (compiled-modules): Use 'derivation->output-paths'. (build-expression->derivation)[source-path]: Add case for when the input matches 'derivation?'. [prologue]: Accept 'derivation?' objects in INPUTS. [mod-dir, go-dir]: Use 'derivation->output-path'. * guix/download.scm (url-fetch): Adjust to the single-value return. * guix/packages.scm (package-output): Use 'derivation->output-path'. * guix/scripts/build.scm (guix-build): When the argument is 'derivation-path?', pass it through 'read-derivation'. Use 'derivation-file-name' to print out the .drv file names, and to register them. Use 'derivation->output-path' instead of 'derivation-path->output-path'. * guix/scripts/package.scm (roll-back): Adjust to the single-value return. (guix-package): Use 'derivation->output-path'. * guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?' objects instead of .drv file names. * gnu/system/grub.scm (grub-configuration-file): Use 'derivation->output-path' instead of 'derivation-path->output-path'. * gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise. * tests/builders.scm, tests/derivations.scm, tests/packages.scm, tests/store.scm, tests/union.scm: Adjust to the new calling convention. * doc/guix.texi (Defining Packages, The Store, Derivations): Adjust accordingly. Ludovic Courtès
2013-09-18tests: Clarify filtering of the "debug" output....* tests/guix-package.sh: Clearly filter out the "debug" output of 'gnu-make-boot0'. Ludovic Courtès
2013-09-17derivations: Keep the .drv file name in <derivation> objects....* guix/derivations.scm (<derivation>): Add 'file-name' field. (%read-derivation): Use (port-filename DRV-PORT) as the file name for the result. (derivation): Set the 'file-name' field in the result. * tests/derivations.scm ("build derivation with 1 source"): Assert that 'derivation-file-name' returns the right thing. Ludovic Courtès
2013-09-11store: The 'references' parameter of 'add-text-to-store' is now optional....* guix/store.scm (add-text-to-store): Make 'references' optional. * tests/store.scm ("dead-paths", "references"): Use 'add-text-to-store' with no optional argument. * doc/guix.texi (The Store): Adjust accordingly. Ludovic Courtès
2013-09-02union: Don't traverse sub-directories only found in one element of the union....This significantly reduces I/O when building profiles, especially with lots of package-specific sub-directories (such as 'share/emacs/24.3', 'texmf', etc.) * guix/build/union.scm (union-build)[file-tree](others-have-it?): New procedure. Use it in the 'enter?' parameter of 'file-system-fold'; change 'skip' parameter accordingly. * tests/union.scm ("union-build"): Ensure that 'include' is a symlink and 'bin' is a directory. Ludovic Courtès
2013-08-28derivations: Rename #:dependency-graphs to #:references-graphs....* guix/derivations.scm (derivation, build-expression->derivation): Rename #:dependency-graphs to #:references-graphs, for consistency in the terminology. * tests/derivations.scm: Adjust accordingly. Ludovic Courtès
2013-08-26derivations: Add #:dependency-graphs to `build-expression->derivation'....* guix/derivations.scm (build-expression->derivation): Add #:dependency-graphs keyword argument. Pass it to `derivation'. * tests/derivations.scm ("build-expression->derivation with #:dependency-graphs"): New test. * doc/guix.texi (Derivations): Update `build-expression->derivation' description. Ludovic Courtès
2013-08-26derivations: Add #:dependency-graphs `derivation' parameter....* guix/derivations.scm (derivation): Add `dependency-graphs' keyword parameter; honor it. * tests/derivations.scm (bootstrap-binary): New procedure. (%bash): Use it. (%mkdir): New variable. (directory-contents): Add `slurp' optional parameter. ("derivation with #:dependency-graphs"): New test. * doc/guix.texi (Derivations): Update accordingly. Ludovic Courtès
2013-08-26derivations: Move 3 positional parameters into keyword parameters....* guix/derivations.scm (derivation): Turn `system', `env-vars', and `inputs' into keyword parameters. (build-expression->derivation): Adjust accordingly. * gnu/packages/bootstrap.scm (%bootstrap-guile): Likewise. * tests/derivations.scm, tests/store.scm: Likewise. * doc/guix.texi (Derivations): Likewise. Ludovic Courtès
2013-08-24packages: Allow file names as package sources....* guix/packages.scm (package-source-derivation): Add cases for SOURCE as a store path or user file. * tests/packages.scm ("package-source-derivation, file", "package-source-derivation, store path"): New tests. Ludovic Courtès
2013-08-23utils: Add `guile-version>?', and use it....This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge <andreas@enge.fr>. * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise. Ludovic Courtès
2013-08-22substitute-binary: Try hard to avoid port buffering....* guix/scripts/substitute-binary.scm (fetch): In the `file' case, open with the `b' flag, so that the coding cookie reading thing doesn't lead to buffering some of the data (on 2.0.5). * tests/utils.scm ("filtered-port, file"): Open with `r0b'. Fixes a test failure with Guile 2.0.5 whereby the first byte of FILE would be missing from DECOMPRESSED. Ludovic Courtès
2013-07-10records: `recutils->alist' recognizes lines starting with a `+'....* guix/records.scm (%recutils-plus-rx): New variable. (recutils->alist): Use it to read + lines. * tests/records.scm ("recutils->alist with + lines"): New test. Ludovic Courtès
2013-07-10records: `alist->record' supports multiple-field occurrences....* guix/records.scm (alist->record): Add `multiple-value-keys' parameter. Update docstring, and honor it. * tests/records.scm ("alist->record"): New record. Ludovic Courtès
2013-07-10records: `recutils->alist' recognizes comments....* guix/records.scm (%recutils-comment-rx): New variable. (recutils->alist): Match comments. * tests/records.scm ("recutils->alist"): Add comments. Ludovic Courtès
2013-07-10records: Add `recutils->alist' for public consumption....* guix/records.scm (%recutils-field-rx): New variable. (recutils->alist): New procedure, formerly known as `fields->alist'. * guix/scripts/substitute-binary.scm (fields->alist): Use it. * tests/records.scm ("recutils->alist"): New test. Ludovic Courtès
2013-07-10tests: Fix guix-package.sh in the presence of multiple-output `make'....* tests/guix-package.sh: For $boot_make_drv, take only the "out" output. Reported by Nikita Karetnikov <nikita@karetnikov.org>. Ludovic Courtès
2013-07-08tests: Adjust `package-field-location' test for Guile <= 2.0.6....* tests/packages.scm ("package-field-location"): Check the result of `read-at' against both VALUE and (FIELD VALUE). Reported by Matthew Lien - 練喆明" <bluet@bluet.org>. Ludovic Courtès
2013-07-02hash: Add `open-sha256-port'....* guix/hash.scm (GCRY_MD_SHA256): New macro. (sha256): Use it. (open-sha256-md, md-write, md-read, md-close, open-sha256-port, port-sha256): New procedures. * tests/hash.scm: New file. * Makefile.am (SCM_TESTS): Add it. Ludovic Courtès
2013-07-01Move `sha256' to (guix hash)....* guix/utils.scm (sha256): Move to... * guix/hash.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/derivations.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/refresh.scm, tests/base32.scm, tests/derivations.scm, tests/store.scm: Use (guix hash). Ludovic Courtès
2013-06-13store: Add `requisites'....* guix/store.scm (fold-path, requisites): New procedures. * tests/store.scm ("requisites"): New test. Ludovic Courtès
2013-05-29store: Test the `fallback?' store option....* guix/store.scm (set-build-options): Rename #:try-fallback? to #:fallback?. * tests/store.scm ("substitute --fallback"): New test. Ludovic Courtès
2013-05-27packages: Raise an error condition a cross builder is needed but unavailable....* guix/packages.scm (&package-cross-build-system-error): New condition type. (package-cross-derivation): Raise &package-cross-build-system-error when the build system doesn't support cross builds. * guix/ui.scm (call-with-error-handling): Add package-cross-build-system-error? case. * tests/packages.scm ("package-cross-derivation, no cross builder"): New test. Ludovic Courtès
2013-05-24build-system/trivial: Implement the cross-build protocol....* guix/build-system/trivial.scm (guile-for-build): New procedure. (trivial-build): Use it. (trivial-cross-build): New procedure. (trivial-build-system): Use it. Ludovic Courtès
2013-05-24build: Add `--target' option....* guix/scripts/build.scm (derivations-from-package-expressions): Add `package-derivation' parameter. (show-help, %options): Add `--target'. (guix-build): Use `package-cross-derivation' when `--target' is passed. * tests/guix-build.sh: Add dry-run test with `--target'. * doc/guix.texi (Invoking guix build): Document `--target'. Ludovic Courtès