aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* 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'.
* tests: Fix typo.Ludovic Courtès2013-09-27
| | | | * tests/guix-package.sh: Add missing "-p" option.
* build-system/trivial: Take the 'source' field into account.Ludovic Courtès2013-09-27
| | | | | | | * 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.
* guix package: Add '--delete-generations'.Nikita Karetnikov2013-09-26
| | | | | | | | | | | | * 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'.
* guix package: Show which generation is the current one.Nikita Karetnikov2013-09-25
| | | | | | * 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.
* tests: Use 'test -z' to check that a string equals zero.Nikita Karetnikov2013-09-25
|
* guix package: Do not list the zeroth generation.Nikita Karetnikov2013-09-25
| | | | | | | | * 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.
* guix package: Exit with 1 when a generation cannot be listed.Nikita Karetnikov2013-09-25
| | | | | | | * 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.
* guix-register: Expect closures to refer to the original store.Ludovic Courtès2013-09-23
| | | | | | | | | | * 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'.
* Add 'guix-register'.Ludovic Courtès2013-09-23
| | | | | | | | | | * 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'.
* guix package: Add '--list-generations'.Nikita Karetnikov2013-09-19
| | | | | | | | | | | | | | * 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'.
* derivations: 'derivation' and related procedures return a single value.Ludovic Courtès2013-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* tests: Clarify filtering of the "debug" output.Ludovic Courtès2013-09-18
| | | | | * tests/guix-package.sh: Clearly filter out the "debug" output of 'gnu-make-boot0'.
* derivations: Keep the .drv file name in <derivation> objects.Ludovic Courtès2013-09-17
| | | | | | | | | * 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.
* store: The 'references' parameter of 'add-text-to-store' is now optional.Ludovic Courtès2013-09-11
| | | | | | | * 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.
* union: Don't traverse sub-directories only found in one element of the union.Ludovic Courtès2013-09-02
| | | | | | | | | | | | 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.
* derivations: Rename #:dependency-graphs to #:references-graphs.Ludovic Courtès2013-08-28
| | | | | | | * guix/derivations.scm (derivation, build-expression->derivation): Rename #:dependency-graphs to #:references-graphs, for consistency in the terminology. * tests/derivations.scm: Adjust accordingly.
* derivations: Add #:dependency-graphs to `build-expression->derivation'.Ludovic Courtès2013-08-26
| | | | | | | | | * 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.
* derivations: Add #:dependency-graphs `derivation' parameter.Ludovic Courtès2013-08-26
| | | | | | | | | | | * 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.
* derivations: Move 3 positional parameters into keyword parameters.Ludovic Courtès2013-08-26
| | | | | | | | | * 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.
* packages: Allow file names as package sources.Ludovic Courtès2013-08-24
| | | | | | | * 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.
* utils: Add `guile-version>?', and use it.Ludovic Courtès2013-08-23
| | | | | | | | | | | | | | 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.
* substitute-binary: Try hard to avoid port buffering.Ludovic Courtès2013-08-22
| | | | | | | | | * 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.
* records: `recutils->alist' recognizes lines starting with a `+'.Ludovic Courtès2013-07-10
| | | | | | * guix/records.scm (%recutils-plus-rx): New variable. (recutils->alist): Use it to read + lines. * tests/records.scm ("recutils->alist with + lines"): New test.
* records: `alist->record' supports multiple-field occurrences.Ludovic Courtès2013-07-10
| | | | | | * guix/records.scm (alist->record): Add `multiple-value-keys' parameter. Update docstring, and honor it. * tests/records.scm ("alist->record"): New record.
* records: `recutils->alist' recognizes comments.Ludovic Courtès2013-07-10
| | | | | | * guix/records.scm (%recutils-comment-rx): New variable. (recutils->alist): Match comments. * tests/records.scm ("recutils->alist"): Add comments.
* records: Add `recutils->alist' for public consumption.Ludovic Courtès2013-07-10
| | | | | | | * 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.
* tests: Fix guix-package.sh in the presence of multiple-output `make'.Ludovic Courtès2013-07-10
| | | | | * tests/guix-package.sh: For $boot_make_drv, take only the "out" output. Reported by Nikita Karetnikov <nikita@karetnikov.org>.
* tests: Adjust `package-field-location' test for Guile <= 2.0.6.Ludovic Courtès2013-07-08
| | | | | | * 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>.
* hash: Add `open-sha256-port'.Ludovic Courtès2013-07-02
| | | | | | | | | * 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.
* Move `sha256' to (guix hash).Ludovic Courtès2013-07-01
| | | | | | | | | * 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).
* store: Add `requisites'.Ludovic Courtès2013-06-13
| | | | | * guix/store.scm (fold-path, requisites): New procedures. * tests/store.scm ("requisites"): New test.
* store: Test the `fallback?' store option.Ludovic Courtès2013-05-29
| | | | | * guix/store.scm (set-build-options): Rename #:try-fallback? to #:fallback?. * tests/store.scm ("substitute --fallback"): New test.
* packages: Raise an error condition a cross builder is needed but unavailable.Ludovic Courtès2013-05-27
| | | | | | | | | * 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.
* build-system/trivial: Implement the cross-build protocol.Ludovic Courtès2013-05-24
| | | | | | | * guix/build-system/trivial.scm (guile-for-build): New procedure. (trivial-build): Use it. (trivial-cross-build): New procedure. (trivial-build-system): Use it.
* build: Add `--target' option.Ludovic Courtès2013-05-24
| | | | | | | | | | * 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'.
* packages: Implement `package-cross-derivation'.Ludovic Courtès2013-05-24
| | | | | | | | | | | * guix/packages.scm (package-transitive-target-inputs, package-transitive-native-inputs): New procedures. (package-derivation): Parametrize `%current-target-system'. (package-cross-derivation): Implement. * guix/utils.scm (%current-target-system): New variable. * tests/packages.scm ("package-cross-derivation"): New test. * doc/guix.texi (Defining Packages): Document `package-cross-derivation'.
* Add `--max-silent-time' to `guix build' and `guix package'.Ludovic Courtès2013-05-20
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (%default-options): Add default `max-silent-time' value. (show-help, %options): Add `--max-silent-time'. (guix-build): Pass `max-silent-time' to `set-build-options'. * guix/scripts/package.scm (%default-options): Add default `max-silent-time' value. (show-help, %options): Add `--max-silent-time'. (guix-package): Pass `max-silent-time' to `set-build-options'. * guix/ui.scm (string->number*): New procedure. * tests/derivations.scm ("build-expression->derivation and max-silent-time"): New test. * doc/guix.texi (Invoking guix package, Invoking guix build): Document `--max-silent-time'.
* substitute-binary: Pass `filtered-port' an unbuffered port.Ludovic Courtès2013-05-15
| | | | | | | | | | | | | | | | | | This fixes a bug whereby `read-response' would read more than just the response, with the extra data going into the port's buffer; the "bzip2 -dc" process spawned by `filtered-port' would not see the those buffered data, which are definitely lost, and would bail out with "bzip2: (stdin) is not a bzip2 file." * guix/utils.scm (filtered-port): Document that INPUT must be unbuffered. * guix/web.scm (http-fetch): Add `buffered?' parameter. Call `open-socket-for-uri' explicitly, and call `setvbuf' when BUFFERED? is false. Pass the port to `http-get'. Close it upon 301/302. * guix/scripts/substitute-binary.scm (fetch): Add `buffered?' parameter. Pass it to `http-fetch'; honor it for `file' URIs. (guix-substitute-binary): Call `fetch' with #:buffered? #f for port RAW. * tests/utils.scm ("filtered-port, file"): Open FILE as unbuffered.
* Move record utilities to (guix records).Ludovic Courtès2013-05-12
| | | | | | | | | | | | | | | | * guix/utils.scm (define-record-type*): Move to... * guix/records.scm: ... here. New file. * guix/build-system.scm, guix/packages.scm: Use it. * guix/gnu-maintenance.scm: Likewise. (official-gnu-packages)[alist->record]: Remove. * guix/scripts/substitute-binary.scm: Likewise. (alist->record, object->fields): Remove. * tests/utils.scm ("define-record-type*", "define-record-type* with letrec* behavior", "define-record-type* & inherit", "define-record-type* & inherit & letrec* behavior", "define-record-type* & thunked", "define-record-type* & thunked & default", "define-record-type* & thunked & inherited"): Move to... * tests/records.scm: ... here. New file.
* tests: Fix out-of-source builds.Ludovic Courtès2013-05-11
| | | | | * tests/nar.scm (%test-dir): Compute relative to `pre-inst-env', which is in $top_builddir.
* tests: Add `guix hash' test.Ludovic Courtès2013-05-11
| | | | | | | * guix/scripts/hash.scm (guix-hash)[eof->null]: New procedure. Use it to convert the EOF object to the empty bytevector. * tests/guix-hash.sh: New file. * Makefile.am (SH_TESTS): Add it.
* package: Store the output path of packages installed with `-e'.Ludovic Courtès2013-05-10
| | | | | | * guix/scripts/package.scm (guix-package)[process-actions](package->tuple): Put the output path in the tuple, not the derivation path. * tests/guix-package.sh: Add test.
* Merge branch 'core-updates'Ludovic Courtès2013-04-30
|\
| * guix package: Add `--search-paths' & co.Ludovic Courtès2013-04-28
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables, display-search-paths): New procedures. (show-help, %options): Add `--search-paths'. (guix-package)[process-actions]: Call `display-search-paths' once the profile is ready. [process-query]: Honor `search-paths'.
| * utils: Add `string-tokenize*'.Ludovic Courtès2013-04-28
| | | | | | | | | | * guix/utils.scm (string-tokenize*): New procedure. * tests/utils.scm ("string-tokenize*"): New test.
| * Merge branch 'master' into core-updatesLudovic Courtès2013-04-26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.am gnu/packages/autotools.scm gnu/packages/guile.scm gnu/packages/python.scm gnu/packages/shishi.scm guix/gnu-maintenance.scm guix/scripts/build.scm guix/scripts/gc.scm guix/scripts/package.scm guix/scripts/substitute-binary.scm guix/ui.scm nix/nix-daemon/guix-daemon.cc test-env.in tests/nar.scm tests/store.scm