summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2013-02-16Replace individual scripts with master 'guix' script....* 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. Mark H Weaver
2013-02-16packages: Add `package-output'....* guix/packages.scm (package-output): New procedure. * tests/packages.scm ("package-output"): New test. Ludovic Courtès
2013-02-06union: Delete duplicates when passed the same input several times....* 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. Ludovic Courtès
2013-02-06guix-package: Test installation of packages by name....* tests/guix-package.sh: Remove `boot_guile'. Replace occurrences of $boot_guile by the `guile-bootstrap' package name. Ludovic Courtès
2013-02-04store: Add substitute-related procedures....* 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. Ludovic Courtès
2013-02-04tests: Fix thinko in `derivation' test....* 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. Ludovic Courtès
2013-02-01Augment `.dir-locals.el'....* .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. Ludovic Courtès
2013-02-01guix-package: Report `--search' matches in recutils format....* 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. Ludovic Courtès
2013-02-01guix-package: Gracefully report non-existing outputs....* guix-package.in (guix-package)[find-package](ensure-output): New procedure. Use it to validate SUB-DRV. Ludovic Courtès
2013-01-30store: Remove the `fixed?' parameter from `add-to-store'....* 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. Ludovic Courtès
2013-01-28guix-package: Add '--search'....* 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. Nikita Karetnikov
2013-01-27guix-package: Always use the next number for new generations....Suggested by Andreas Enge <andreas@enge.fr> at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00325.html>. * guix-package.in (latest-profile-number): Remove. (switch-symlinks): New procedure. (roll-back)[switch-link]: Use it. (guix-package)[process-actions]: Always choose NUMBER + 1 for the new profile. Use `switch-symlinks' instead of `symlink'. Remove code to delete PROFILE when it exists since `switch-symlinks' has the same effect. * tests/guix-package.sh: Adjust existing `--roll-back' tests. * doc/guix.texi (Invoking guix-package): Document this `--roll-back' behavior. Ludovic Courtès
2013-01-27guix-package: When rolling back to nothingness, point to the empty profile....Suggested by Andreas Enge <andreas@enge.fr> at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00316.html>. * guix-package.in (roll-back): Check whether PROFILE is valid using `file-exists?'. When NUMBER is zero, just emit a notice. When PREVIOUS-NUMBER is zero and PREVIOUS-PROFILE does not exist, build the empty profile, and link to it. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix-package): Document the new behavior. Ludovic Courtès
2013-01-24packages: Mark the `inputs' field of <package> as thunked....* guix/packages.scm (<package>)[inputs]: Mark as thunked. (package-derivation)[expand-input]: Remove case where the input is a procedure. * tests/packages.scm ("trivial with system-dependent input"): Remove `lambda', and use (%current-system). * gnu/packages/bootstrap.scm (package-from-tarball): Likewise for `inputs'. (%bootstrap-glibc, %bootstrap-gcc): Likewise. * gnu/packages/scheme.scm (mit-scheme): Likewise. Ludovic Courtès
2013-01-24guix-package: Error out when passed a non-option argument....* guix-package.in (guix-package)[parse-options]: Call `leave' when passed a non-option argument. Reported by Andreas Enge <andreas@enge.fr>. * tests/guix-package.sh: Add test. Ludovic Courtès
2013-01-23define-record-type*: Add the `thunked' field definition keyword....* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: Add a `thunked' parameter. (thunked-field?, field-bindings): New procedures. Use the latter when generating `letrec*' bindings. [thunked-field?, thunked-field-accessor-name, field-spec->srfi-9, thunked-field-accessor-name]: New procedures. Use them when generating the `define-record-type' form, and to generated thunk field accessors, along call to `make-syntactic-constructor' with the new argument. * tests/utils.scm ("define-record-type* & thunked", "define-record-type* & thunked & default", "define-record-type* & thunked & inherited"): New tests. Ludovic Courtès
2013-01-22guix-package: Fix `--roll-back' when `--profile' is not passed....* guix-package.in (roll-back): Fix file name of PREVIOUS-PROFILE, which could end up containing the dirname twice. Reported by Nikita and Andreas. * tests/guix-package.sh: Add test. Ludovic Courtès
2013-01-22guix-build: Allow version-qualified package names....* guix-build.in (guix-build)[find-package]: New procedure. Use it instead of using `find-packages-by-name' directly. Suggested by Andreas Enge <andreas@enge.fr>. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix-build): Add `coreutils-8.20' as an example. Fix guile-1.8 example. Ludovic Courtès
2013-01-20packages: Have `package-derivation' return a <derivation> as a second value....* guix/packages.scm (cache): Change the `drv' argument to `thunk'. Memoize all the return values of THUNK. (cached-derivation): Remove. (cached): New macro. (package-derivation): Use `cached' instead of `(or (cached-derivation) …)'. * doc/guix.texi (Defining Packages): Update accordingly. Ludovic Courtès
2013-01-18distro: Rename (distro) to (gnu packages)....* distro.scm: Rename to... * gnu/packages.scm: ... this. Update all users accordingly. * Makefile.am (MODULES): Adjust accordingly. * po/POTFILES.in: Likewise. Ludovic Courtès
2013-01-18distro: Change the module name space to (gnu ...)....* distro: Rename to... * gnu: ... this. Update module names accordingly. * Makefile.am: Adjust accordingly. * po/POTFILES.in: Likewise. * distro.scm: Search for files under /gnu/packages instead of /distro/packages. * gnu/packages/base.scm (ld-wrapper-boot3): Likewise. Ludovic Courtès
2013-01-17guix-package: Allow `--roll-back' to skip missing generations....* guix-package.in (profile-numbers): New procedure. (latest-profile-number): Use it. (previous-profile-number): New procedure. (roll-back): Use it lieu of `1-'. Check whether PREVIOUS-NUMBER is zero, and raise an error when it is. * tests/guix-package.sh: Test whether we can roll back over a "hole". Ludovic Courtès
2013-01-17guix-package: Add `--roll-back'....Based on a patch by Nikita Karetnikov <nikita@karetnikov.org>. * guix-package.in (profile-regexp): New procedure. (latest-profile-number): Remove `%profile-rx', and use `profile-regexp' instead. (profile-number, roll-back): New procedure. (show-help): Add `--roll-back'. (%options): Likewise. (guix-package)[process-actions]: First check whether `roll-back?' is among OPTS, and call `roll-back' if it is, followed by a recursive call to `process-actions'. Emit the "nothing to be done" message only when INSTALL or REMOVE is non-empty. * tests/guix-package.sh (readlink_base): New function. Add tests for `--roll-back'. * doc/guix.texi (Invoking guix-package): Document `--roll-back'. Ludovic Courtès
2013-01-14guix-package: Create or diagnose missing profile directory....Reported by Andreas Enge. * guix-package.in (%profile-directory): Honor $NIX_STATE_DIR. (guix-package)[ensure-default-profile]: Use it. [process-actions]: Call it when the `profile' option is %CURRENT-PROFILE. * tests/guix-package.sh: Add installation test with $HOME set, using the default profile. Ludovic Courtès
2013-01-14tests: Use "binutils:lib" as the `guix-package' example....* tests/guix-package.sh: Use "binutils:lib" instead of "libsigsegv:lib", since the latter no longer exists. Ludovic Courtès
2013-01-11Merge branch 'core-updates'...Conflicts: guix/build/union.scm Ludovic Courtès
2013-01-09union: Detect collisions, and delete duplicate leaves....* guix/build/union.scm (delete-duplicate-leaves): New procedure. (union-build)[leaf=?, resolve-collision]: New procedures. Use `delete-duplicate-leaves' on the result of `tree-union'. * tests/union.scm ("delete-duplicate-leaves, default", "delete-duplicate-leaves, file names"): New tests. Ludovic Courtès
2013-01-09derivations: Fix `derivation-prerequisites-to-build' when outputs are there....Before it would list inputs not built, even if the outputs of the given derivation were already available. * guix/derivations.scm (derivation-prerequisites-to-build): Add `outputs' keyword parameter. [built?, derivation-built?]: New procedures. [loop]: Add `sub-drvs' parameter. Use `derivation-built?' to check if the SUB-DRVS of DRV are built before checking its inputs. Ludovic Courtès
2013-01-07guix-package: Remove `-b' shorthand for `--bootstrap'....* guix-package.in (%options): Remove #\b as an alternate for "bootstrap". (show-help): Adjust accordingly. * tests/guix-package.sh: Use `--bootstrap' instead of `-b'. Ludovic Courtès
2013-01-07snix: Update `license' check in unit test....* tests/snix.scm ("nixpkgs->guix-package"): Expect `license' to be a symbol. This is a follow-up to commit e7aa73e. Ludovic Courtès
2013-01-06Merge branch 'master' into core-updates...Conflicts: build-aux/download.scm distro/packages/autotools.scm distro/packages/base.scm distro/packages/bootstrap.scm distro/packages/lsh.scm distro/packages/make-bootstrap.scm distro/packages/ncurses.scm distro/packages/perl.scm tests/derivations.scm tests/union.scm Ludovic Courtès
2013-01-06Update license headers....Change all license headers, except guix/build/* and ld-wrapper.scm, with this code: (use-modules (guix build utils) (srfi srfi-1)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (remove (lambda (f) (or (string-contains f ".tar.") (string-contains f ".git/") (string-contains f ".so") (string-suffix? ".o" f) (string-suffix? ".a" f) (string-suffix? ".go" f) (string-suffix? ".pdf" f) (string-suffix? ".png" f) (string-suffix? ".info" f) (equal? (basename f) "guix-daemon") (equal? (basename f) "nix-setuid-helper") (string-contains f "nix-upstream/") (string-contains f "distro/packages/bootstrap/"))) (find-files "." "\\.[a-z]+$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) Change headers using C-style comments manually. Ludovic Courtès
2013-01-06Add `guix-gc'....* guix-gc.in, tests/guix-gc.sh: New files. * configure.ac: Output `guix-gc', and make it executable. * Makefile.am (bin_SCRIPTS): Add `guix-gc'. (TESTS): Add `tests/guix-gc.sh'. * doc/guix.texi (Features): Add xref to "Invoking guix-gc". (Invoking guix-gc): New node. * po/POTFILES.in: Add `guix-gc.in'. Ludovic Courtès
2013-01-05derivations: Add `derivation-path->output-paths'....* guix/derivations.scm (derivation-path->output-paths): New procedure. * tests/derivations.scm ("multiple-output derivation"): Test it. Ludovic Courtès
2013-01-02tests: Adjust to not rely on /bin/sh....* tests/derivations.scm (%bash): New variable. Replace occurrences of "/bin/sh" by %BASH. * tests/union.scm ("union-build"): Delete duplicates from %BOOTSTRAP-INPUTS. Ludovic Courtès
2012-12-13Merge branch 'nix-integration'...Conflicts: tests/guix-package.sh Ludovic Courtès
2012-12-13tests: Skip network-dependent tests when the network is unreachable....* tests/builders.scm (network-reachable?): New variable. ("url-fetch", "gnu-build"): Skip unless NETWORK-REACHABLE?. * tests/derivations.scm (%coreutils): Check for network access. ("build-expression->derivation with one input"): Skip when %COREUTILS is #f. * tests/guix-package.sh: Skip installation of GNU Make when the network is unreachable. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/union.scm ("union-build"): Likewise. Ludovic Courtès
2012-12-13tests: base32: Work around `system*' bug....* tests/base32.scm (%nix-hash): When `getenv' returns the empty string, ignore it. (%have-nix-hash?): New variable. Update `test-skip' clause to use it. Ludovic Courtès
2012-12-12tests: Remove `t-profile' files on exit....* tests/guix-package.sh: Use a trap on EXIT to remove profile-related files. Reported by Andreas Enge <andreas@enge.fr>. Ludovic Courtès
2012-12-12guix-package: Gracefully handle multiple installs of the same path....* guix-package.in (guix-package)[process-actions]: Compute PACKAGES such that packages listed in INSTALL* are first removed from the remainder of the list. When PROF is equal to the previous profile's store path, do nothing. Reported by Andreas Enge <andreas@enge.fr>. * tests/guix-package.sh: Test the behavior of installing the same store path twice. When removing a package, omit its version number. Ludovic Courtès
2012-12-09Merge branch 'master' into nix-integration...Conflicts: guix/store.scm Ludovic Courtès
2012-12-09store: Add GC-related operations....* guix/store.scm (gc-action): New enumerate type. (read-long-long, read-string-list, write-store-path, write-store-path-list, read-store-path-list): New procedures. (write-arg): Add support for `store-path' and `store-path-list'. (read-arg): Add support for `store-path-list'. (define-operation): Add support for multiple-value returns. (run-gc, live-paths, dead-paths, collect-garbage, delete-paths): New procedures. (%long-long-max): New macro. * tests/store.scm: New file. * Makefile.am (TESTS): Add it. Ludovic Courtès
2012-12-06build: Update skip count in `tests/derivations.scm'....* tests/derivations.scm: When %STORE if #f, skip 11 tests. Ludovic Courtès
2012-12-06build: Run all the tests against the just-built daemon....* test-env.in: New file. * configure.ac: Add it to `AC_CONFIG_FILES' and `commands-exec'. * config-daemon.ac: Set and substitute `GUIX_TEST_ROOT'. * Makefile.am (SCM_LOG_COMPILER, SH_LOG_COMPILER): Use it in lieu of `pre-inst-env'. * daemon.am (test_root): Remove (AM_TESTS_ENVIRONMENT): Remove `TEST_ROOT'. (clean-local): Use $(GUIX_TEST_ROOT); make files writable before removing them.guix_test_root * tests/guix-daemon.sh: Remove `NIX_' variable settings; don't launch `guix-daemon'. Ludovic Courtès
2012-12-05tests: Remove hard-coded /nix/store....* tests/utils.scm ("store-path-package-name"): Use (%store-prefix) instead of a hard-coded "/nix/store". Ludovic Courtès
2012-12-05daemon: Add `list-runtime-roots' script....* nix/scripts/list-runtime-roots.in: New file. * config-daemon.ac: Add `AC_CONFIG_FILES' invocation for it. * daemon.am (nodist_pkglibexec_SCRIPTS): New variable. (AM_TESTS_ENVIRONMENT): Define `top_builddir'. * tests/guix-daemon.sh: Export `NIX_ROOT_FINDER'. * nix/sync-with-upstream: Substitute the path to the root finder in libstore/gc.cc. Ludovic Courtès
2012-12-04daemon: Add test....* daemon.am (test_root, AM_TESTS_ENVIRONMENT): New variables. (clean-local): New target. * tests/guix-daemon.sh: New file. Ludovic Courtès
2012-12-04derivations: Fix erroneous call to `add-to-store' for local files as input....* guix/derivations.scm (derivation)[inputs]: Fix typo in call to `add-to-store'. * tests/derivations.scm ("derivation with local file as input"): New test. * tests/packages.scm ("trivial with local file as input"): New test. Ludovic Courtès
2012-11-19guix-package: Extract version strings when installing a direct store path....* guix-package.in (guix-package)[process-actions]: Extract the version string from store paths. * tests/guix-package.sh: Adjust accordingly. Ludovic Courtès
2012-11-19guix-package: Add `--list-available'....* guix-package.in (show-help, %options): Add `--list-available'. (guix-package)[process-query]: Add support for `--list-available'. * doc/guix.texi (Invoking guix-package): Document it. * tests/guix-package.sh: Add test. * guix/ui.scm (location->string): New procedure. * guix/utils.scm: Export <location>. Ludovic Courtès