summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* 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
| * | substitute-binary: Implement `--substitute'.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows build outputs to be transparently downloaded from http://hydra.gnu.org, for example. * config-daemon.ac: Check for `gzip', `bzip2', and `xz'. * guix/config.scm.in (%gzip, %bzip2, %xz): New variable. * guix/scripts/substitute-binary.scm (fetch): Return SIZE as a second value. (<narinfo>): Change `url' to `uri'. (make-narinfo): Rename to... (narinfo-maker): ... this. Handle relative URLs. (fetch-narinfo): Adjust accordingly. (filtered-port, decompressed-port): New procedures. (guix-substitute-binary): Implement the `--substitute' case. * tests/store.scm ("substitute query"): Use (%store-prefix) instead of (getenv "NIX_STORE_DIR"). ("substitute"): New test.
| * | nar: Add support for symlinks.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/nar.scm (write-file): Add case for type `symlink'. (restore-file): Likewise. * tests/nar.scm (random-file-size, make-file-tree, delete-file-tree, with-file-tree, file-tree-equal?, make-random-bytevector, populate-file): New procedures. (%test-dir): New variable. ("write-file + restore-file"): Use `%test-dir' and `file-tree-equal?'. ("write-file + restore-file with symlinks"): New test.
| * | nar: Implement restoration from Nar.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | * guix/nar.scm (&nar-error, &nar-read-error): New condition types. (dump): New procedure. (write-contents)[dump]: Remove. Use the one above instead. (read-contents, write-file, restore-file): New procedures. (%archive-version-1): New variable.
| * | Add preliminary binary substituter.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: New file. * Makefile.am (MODULES): Add it. * nix/scripts/substitute-binary.in: New file. * config-daemon.ac: Produce nix/scripts/substitute-binary. * daemon.am (nodist_pkglibexec_SCRIPTS): Add nix/scripts/substitute-binary. * guix/store.scm (substitutable-path-info): Use the `query-substitutable-path-infos' RPC. * nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'. * pre-inst-env.in: Set `NIX_SUBSTITUTERS'. * test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set `GUIX_BINARY_SUBSTITUTE_URL, and create $NIX_STATE_DIR/substituter-data. Run `guix-daemon' within `./pre-inst-env'. * tests/store.scm ("substitute query"): New test.
| * | store: Add `store-path-hash-part'.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | * guix/store.scm (store-path-hash-part): New procedure. * tests/store.scm ("store-path-hash-part", "store-path-hash-part #f"): New tests.
| * | tests: Adjust `gnu-build' test to search path mechanism.Ludovic Courtès2013-04-11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced in a18eda2. Reported by Nikita Karetnikov <nikita@karetnikov.org>. * tests/builders.scm (%bootstrap-search-paths): New variable. ("gnu-build"): Pass #:search-paths.
| * | packages: Add `native-search-paths' field and honor it.Ludovic Courtès2013-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (<search-path-specification>): New record type. (search-path-specification->sexp): New procedure. (<package>)[native-search-paths]: New field. (package-derivation): Accumulate the search paths, and pass them as #:search-paths toe BUILDER. * guix/build-system/gnu.scm (gnu-build): Add #:search-paths. Compute `implicit-search-paths'. Pass #:search-paths in BUILDER. * guix/build-system/perl.scm (perl-build): Add #:search-paths, pass it to BUILDER with the search paths of PERL. * guix/build-system/cmake.scm (cmake-build): Add #:search-paths, pass it to BUILDER. * guix/build-system/trivial.scm (trivial-build): Add #:search-paths, ignore it. * guix/build/gnu-build-system.scm (set-paths): Add #:search-paths. Remove explicit settings of CPATH, LIBRARY_PATH, and PKG_CONFIG_PATH. Instead, walk SEARCH-PATHS and call `set-path-environment-variable' for them. * guix/build/perl-build-system.scm (perl-build): Remove PERL5LIB setting. * tests/packages.scm ("search paths"): New test. * gnu/packages/bootstrap.scm (%bootstrap-guile)[raw]: Add #:search-paths. (%bootstrap-gcc): Add `native-search-paths' field. * gnu/packages/perl.scm (perl): Likewise. * gnu/packages/pkg-config.scm (pkg-config): Likewise. * gnu/packages/glib.scm (intltool): Remove `arguments'. * gnu/packages/avahi.scm (avahi): Remove #:phases.
* | | substitute-binary: Support decompression from non-file ports.Ludovic Courtès2013-04-29
| |/ |/| | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm (filtered-port): Move to utils.scm. (decompressed-port): Upon "none", return '() as the second value. (guix-substitute-binary): Expect `decompressed-port' to return a list of PIDs as its second value. * guix/utils.scm (filtered-port): New procedure. Add case for when INPUT is not `file-port?'. * tests/utils.scm ("filtered-port, file", "filtered-port, non-file"): New tests.
* | packages: Use `read' and source properties for `package-field-location'.Ludovic Courtès2013-04-25
| | | | | | | | | | | | | | * guix/packages.scm (package-field-location): Rewrite using `read' and source properties. Change to return #f upon failure. * tests/packages.scm ("package-field-location"): Check for #f upon failure. * build-aux/sync-synopses.scm: Adjust accordingly.
* | packages: Add `package-field-location'.Ludovic Courtès2013-04-22
| | | | | | | | | | | | * guix/packages.scm (package-field-location): New procedure. * build-aux/sync-synopses.scm: Use it instead of `package-location'. * tests/packages.scm ("package-field-location"): New test.
* | tests: Use a new synopsis of GNU Hello.Nikita Karetnikov2013-04-18
| | | | | | | | | | * tests/guix-package.sh: Use a new synopsis of GNU Hello, which was added in f50d2669e3e624365221cc81918ba55fdce94107.
* | scripts: Report what will be substituted.Ludovic Courtès2013-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/derivations.scm (derivation-input-output-paths): New procedure. (derivation-prerequisites-to-build): New `use-substitutes?' keyword argument. Change two return the list of substitutable paths as a second argument. * guix/ui.scm (show-what-to-build): Turn `dry-run?' into a keyword argument. New `use-substitutes?' keyword argument. Use `fold2' and adjust to use both return values of `derivation-prerequisites-to-build'. Display what will/would be downloaded. * guix/scripts/build.scm (guix-build): Adjust accordingly. * guix/scripts/package.scm (guix-package): Likewise. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): New test.
* | substitute-binary: Add a local cache.Ludovic Courtès2013-04-15
| | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm (%narinfo-cache-directory, %narinfo-ttl, %narinfo-negative-ttl): New variables. (with-atomic-file-output, object->fields, read-narinfo, write-narinfo, narinfo->string, string->narinfo, lookup-narinfo): New procedures. (fetch-narinfo): Adjust to use `read-narinfo'. (guix-substitute-binary): Ensure the existence of %NARINFO-CACHE-DIRECTORY. Use `lookup-narinfo' instead of `fetch-narinfo'.
* | utils: Add `fold2'.Ludovic Courtès2013-04-14
| | | | | | | | | | | | | | * gnu/packages.scm (fold2): Remove. * guix/utils.scm (fold2): New procedure. Generalization of the above to one and two lists. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists"): New tests.
* | tests: Remove temporary directory created by nar.scm.Ludovic Courtès2013-04-12
| | | | | | | | | | * tests/nar.scm ("write-file + restore-file with symlinks"): Add (rm-rf output).
* | substitute-binary: Implement `--substitute'.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows build outputs to be transparently downloaded from http://hydra.gnu.org, for example. * config-daemon.ac: Check for `gzip', `bzip2', and `xz'. * guix/config.scm.in (%gzip, %bzip2, %xz): New variable. * guix/scripts/substitute-binary.scm (fetch): Return SIZE as a second value. (<narinfo>): Change `url' to `uri'. (make-narinfo): Rename to... (narinfo-maker): ... this. Handle relative URLs. (fetch-narinfo): Adjust accordingly. (filtered-port, decompressed-port): New procedures. (guix-substitute-binary): Implement the `--substitute' case. * tests/store.scm ("substitute query"): Use (%store-prefix) instead of (getenv "NIX_STORE_DIR"). ("substitute"): New test.
* | nar: Add support for symlinks.Ludovic Courtès2013-04-12
| | | | | | | | | | | | | | | | | | | | | | * guix/nar.scm (write-file): Add case for type `symlink'. (restore-file): Likewise. * tests/nar.scm (random-file-size, make-file-tree, delete-file-tree, with-file-tree, file-tree-equal?, make-random-bytevector, populate-file): New procedures. (%test-dir): New variable. ("write-file + restore-file"): Use `%test-dir' and `file-tree-equal?'. ("write-file + restore-file with symlinks"): New test.
* | nar: Implement restoration from Nar.Ludovic Courtès2013-04-08
| | | | | | | | | | | | | | | | * guix/nar.scm (&nar-error, &nar-read-error): New condition types. (dump): New procedure. (write-contents)[dump]: Remove. Use the one above instead. (read-contents, write-file, restore-file): New procedures. (%archive-version-1): New variable.
* | Add preliminary binary substituter.Ludovic Courtès2013-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: New file. * Makefile.am (MODULES): Add it. * nix/scripts/substitute-binary.in: New file. * config-daemon.ac: Produce nix/scripts/substitute-binary. * daemon.am (nodist_pkglibexec_SCRIPTS): Add nix/scripts/substitute-binary. * guix/store.scm (substitutable-path-info): Use the `query-substitutable-path-infos' RPC. * nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'. * pre-inst-env.in: Set `NIX_SUBSTITUTERS'. * test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set `GUIX_BINARY_SUBSTITUTE_URL, and create $NIX_STATE_DIR/substituter-data. Run `guix-daemon' within `./pre-inst-env'. * tests/store.scm ("substitute query"): New test.
* | store: Add `store-path-hash-part'.Ludovic Courtès2013-04-01
|/ | | | | | * guix/store.scm (store-path-hash-part): New procedure. * tests/store.scm ("store-path-hash-part", "store-path-hash-part #f"): New tests.
* packages: Remove the default value for `license'.Ludovic Courtès2013-03-07
| | | | | | | * guix/packages.scm (<package>): Remove the default value for `license'. * gnu/packages/bootstrap.scm (package-from-tarball, %bootstrap-glibc, %bootstrap-gcc): Initialize `license'. * tests/packages.scm (dummy-package): Likewise.
* guix package: Add `--install-from-expression'.Ludovic Courtès2013-03-01
| | | | | | | | | | | | * guix/scripts/package.scm (read/eval-package-expression): New procedure. (show-help): Add `-e'. (%options): Likewise. (guix-package)[process-actions]: Handle ('install . p) pairs, where P is a package. * tests/guix-package.sh: Add `boot_make_drv'. Use `-i $boot_make_drv' once, and then use `-e $boot_make'. * doc/guix.texi (Invoking guix package): Document `-e'.
* guix gc: Add `--references' and `--referrers'.Ludovic Courtès2013-02-27
| | | | | | | | | | * guix/scripts/gc.scm (show-help): Update. (%options): Add `--references' and `--referrers'. (guix-gc)[symlink-target, store-directory]: New procedures. Handle the `list-references' and `list-referrers' actions. * tests/guix-gc.sh: Add tests for `--references'. * doc/guix.texi (Invoking guix gc): Document `--references' and `--referrers'.
* store: Add queries for references & co.Ludovic Courtès2013-02-27
| | | | | | | * guix/store.scm (operation-id)[query-valid-derivers]: New value. (references, referrers, valid-derivers, query-derivation-outputs): New procedures. * tests/store.scm ("references", "derivers"): New tests.
* Replace individual scripts with master 'guix' script.Mark H Weaver2013-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scripts/guix.in: New script. * Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. (MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm', 'guix/scripts/import.scm', 'guix/scripts/package.scm', and 'guix/scripts/gc.scm'. * configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. * guix-build.in, guix-download.in, guix-gc.in, guix-import.in, guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to (guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in usage help string. * pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH. Export $GUIX_UNINSTALLED. * tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of "guix-COMMAND". * doc/guix.texi: Replace all occurrences of "guix-COMMAND" with "guix COMMAND". * po/POTFILES.in: Update.
* packages: Add `package-output'.Ludovic Courtès2013-02-16
| | | | | * guix/packages.scm (package-output): New procedure. * tests/packages.scm ("package-output"): New test.
* union: Delete duplicates when passed the same input several times.Ludovic Courtès2013-02-06
| | | | | | | * guix/build/union.scm (union-build): Prepend "." to the result of `union-tree', to match the expectations of `delete-duplicate-leaves'. Don't do mkdir when SUBDIR is ".". * tests/union.scm ("union-build"): Keep duplicates in %BOOTSTRAP-INPUTS.
* guix-package: Test installation of packages by name.Ludovic Courtès2013-02-06
| | | | | * tests/guix-package.sh: Remove `boot_guile'. Replace occurrences of $boot_guile by the `guile-bootstrap' package name.
* store: Add substitute-related procedures.Ludovic Courtès2013-02-04
| | | | | | | | | | * guix/store.scm (has-substitutes?, substitutable-paths, read-substitutable-path-list, substitutable-path-info): New procedures. (<substitutable>): New record type. (read-arg): Add `substitutable-path-info'. Change `hash' pattern variable to `base16' literal. * tests/store.scm ("no substitutes"): New test.
* tests: Fix thinko in `derivation' test.Ludovic Courtès2013-02-04
| | | | | | * tests/derivations.scm ("derivation with local file as input"): Return a Boolean instead of a bytevector. Don't attempt to compare the content of the result with that of the input.
* Augment `.dir-locals.el'.Ludovic Courtès2013-02-01
| | | | | | | | * .dir-locals.el: Add more Scheme settings. * guix-build.in, tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/derivations.scm, tests/packages.scm, tests/snix.scm, tests/store.scm, tests/union.scm, tests/utils.scm: Remove redundant Emacs local variable settings.
* guix-package: Report `--search' matches in recutils format.Ludovic Courtès2013-02-01
| | | | | | | | | | | | * guix/ui.scm (fill-paragraph, string->recutils, package->recutils): New procedures. * guix-package.in (guix-package)[process-query]: Use `package->recutils' to display package meta-data. * tests/guix-package.sh: Adjust test. * tests/ui.scm: New file. * Makefile.am (TESTS): Add it. * doc/guix.texi (Invoking guix-package): Adjust `--search' documentation, and give an example.
* guix-package: Gracefully report non-existing outputs.Ludovic Courtès2013-02-01
| | | | | * guix-package.in (guix-package)[find-package](ensure-output): New procedure. Use it to validate SUB-DRV.
* store: Remove the `fixed?' parameter from `add-to-store'.Ludovic Courtès2013-01-30
| | | | | | | | * guix/store.scm (add-to-store): Remove the `fixed?' parameter from the public interface. * gnu/packages/bootstrap.scm, guix-download.in, guix/derivations.scm, guix/packages.scm, tests/derivations.scm: Update all callers accordingly.
* guix-package: Add '--search'.Nikita Karetnikov2013-01-28
| | | | | | | | * guix-package.in (find-packages-by-description): New procedure. (show-help, %options): Add '--search'. (guix-package)[process-query]: Add support for '--search'. * doc/guix.texi (Invoking guix-package): Document it. * tests/guix-package.sh: Add tests.