summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2015-03-17tests: Add an indirection for white-box testing....* tests/gexp.scm (gexp-inputs, gexp-native-inputs, gexp-outputs, gexp->sexp): Make an indirection, to facilitate live testing with Geiser. Ludovic Courtès
2015-03-09services: Statically report duplicate dmd service identifiers....Reported by 白い熊 @相撲道 <guix-devel_gnu.org@sumou.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-03/msg00264.html>. * gnu/services/dmd.scm (assert-no-duplicates): New procedure. (dmd-configuration-file): Use it. * po/guix/POTFILES.in: Add gnu/services/dmd.scm. * tests/guix-system.sh (errorfile): Add test. Ludovic Courtès
2015-03-05lint: Add tests for the 'source' checker....* guix/scripts/lint.scm (check-source): Export. * tests/lint.scm (%null-sha256): New procedure. ("source: 200", "source: 404"): New tests. Ludovic Courtès
2015-03-05tests: Fix import....* tests/lint.scm: Use 'url-fetch' from (guix download), not (guix build download), although this was actually harmless here. Ludovic Courtès
2015-03-05store: Attempt to decode build logs as UTF-8....* guix/serialization.scm (read-maybe-utf8-string): New procedure. * guix/store.scm (process-stderr): Use it for the build log and errors. * tests/store.scm ("current-build-output-port, UTF-8", "current-build-output-port, UTF-8 + garbage"): New tests. Ludovic Courtès
2015-03-04tests: Remove dependency on 'glibc-utf8-locales' for profile tests....This fixes a regression introduced in commit 536c3ee. * guix/profiles.scm (ca-certificate-bundle): When MANIFEST is empty, make a trivial derivation. * guix/scripts/package.scm (guix-package)[process-actions]: Pass #:ca-certificate-bundle? to 'profile-generation'. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation"): Likewise. Ludovic Courtès
2015-03-02gexp: Make sure 'gexp-outputs' removes duplicate outputs....Fixes a regression introduced in f9efe56. * guix/gexp.scm (gexp-outputs): Add call to 'delete-duplicates'. * tests/gexp.scm ("output list, combined gexps, duplicate output"): New test. Ludovic Courtès
2015-02-27gexp: Aggregate outputs of compound gexps....* guix/gexp.scm (gexp-outputs)[add-reference-output]: Recurse into lists. * tests/gexp.scm ("output list + ungexp-splicing list, combined gexps"): New test. Ludovic Courtès
2015-02-27gexp: Add tests for 'gexp-outputs'....* tests/gexp.scm (gexp-outputs): New procedure. ("output list", "output list, combined gexps"): New tests. Ludovic Courtès
2015-02-26ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS....Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>. * guix/ui.scm (parse-command-line)[parse-options-from]: Add 'seeds' parameter. Thread the result of the first 'parse-options-from' call to the second. Ludovic Courtès
2015-02-26ui: Factorize command-line + env. var. option parsing....* guix/ui.scm (%default-argument-handler, parse-command-line): New procedures. (environment-build-options): Make private. * guix/scripts/archive.scm (guix-archive)[parse-options, parse-options-from]: Remove. Use 'parse-command-line' instead. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * tests/ui.scm (with-environment-variable): New macro. ("parse-command-line"): New test. Ludovic Courtès
2015-02-24tests: Skip tests that would fail due to the shebang length....Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>. Fixes <http://bugs.gnu.org/19888>. * guix/tests.scm (shebang-too-long?): New procedure. * tests/builders.scm ("gnu-build"): Conditionalize on not (shebang-too-long?). * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/guix-package.sh (shebang_not_too_long): New function. Use it to determine whether to build 'gnu-make-boot0'. Ludovic Courtès
2015-02-24tests: Factorize the network reachability test....* guix/tests.scm (network-reachable?): New procedure. * tests/builders.scm (network-reachable?): Remove. Replace references to it with calls to the new 'network-reachable?' procedure. * tests/derivations.scm (%coreutils): Use 'network-reachable?' instead of 'getaddrinfo'. * tests/packages.scm: Likewise. * tests/union.scm: Likewise. Ludovic Courtès
2015-02-20import: cpan: Update tests for dependency handling....* tests/cpan.scm (test-json): Remove core module dependencies. [cpan->guix-package]: Add mock url handling for module api. Adjust expected native-inputs and license. Eric Bavier
2015-02-13gexp: Add #:graft? parameter to 'gexp->derivation'....* guix/gexp.scm (gexp->derivation): Add #:graft? parameter and honor it. * tests/gexp.scm ("gexp->derivation vs. grafts"): New test. * doc/guix.texi (G-Expressions): Update 'gexp->derivation' documentation. Ludovic Courtès
2015-02-13gexp: Implement 'imported-modules' & co. using 'gexp->derivation'....* guix/derivations.scm (imported-files): Keep private. (%imported-modules, %compiled-modules, build-expression->derivation): Mark as deprecated. (imported-modules, compiled-modules): Remove. * guix/gexp.scm (%mkdir-p-definition): New variable. (imported-files, search-path*, imported-modules, compiled-modules): New procedures. * tests/derivations.scm ("imported-files"): Remove. * tests/gexp.scm ("imported-files", "gexp->derivation #:modules"): New tests. Ludovic Courtès
2015-02-11gexp: Add #:allowed-references parameter to 'gexp->derivation'....* guix/gexp.scm (lower-references): New procedure. (gexp->derivation): Add #:allowed-references and honor it. * tests/gexp.scm ("gexp->derivation #:allowed-references", "gexp->derivation #:allowed-references, disallowed"): New tests. * doc/guix.texi (G-Expressions): Update 'gexp->derivation' doc. Ludovic Courtès
2015-02-09profiles: Report "pseudo-upgrades" as upgrades, not downgrades....Reported by Andreas Enge <andreas@enge.fr> at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19764#19>. * guix/profiles.scm (manifest-transaction-effects): Use 'version>=?' instead of 'version>?'. * tests/profiles.scm ("manifest-transaction-effects and pseudo-upgrades"): New test. Ludovic Courtès
2015-02-08profiles: Distinguish downgrades from upgrades....Fixes <http://bugs.gnu.org/19764>. * guix/profiles.scm (manifest-transaction-effects): Return downgraded packages as a fourth value. * guix/ui.scm (show-manifest-transaction): Adjust accordingly. * tests/profiles.scm ("manifest-transaction-effects and downgrades"): New test. Ludovic Courtès
2015-02-08ui: Simplify 'show-manifest-transaction' test....* tests/ui.scm ("show-manifest-transaction"): Remove useless call to 'manifest-transaction-effects'. Ludovic Courtès
2015-02-07serialization: Check for EOF and incomplete input conditions....Fixes <http://bugs.gnu.org/19756>. Reported by <sleep_walker@suse.cz>. * guix/serialization.scm (currently-restored-file): New variable. (get-bytevector-n*): New procedure. (read-int, read-long-long, read-string, read-latin1-string, read-contents): Use it instead of 'get-bytevector-n'. (restore-file): Parameterize 'currently-restored-file' and set it. * tests/nar.scm ("restore-file with incomplete input"): New test. Ludovic Courtès
2015-02-06tests: Disable grafts when comparing derivations....Fixes a regression introduced with the grafting of Patch in 3f11f01. * tests/packages.scm ("reference to non-existent output"): Wrap in 'parameterize'. Ludovic Courtès
2015-02-06guix package: Make custom profiles actual indirect roots....Before that, any profile generation built when '-p' is used would effectively become a permanent GC root because the symlink in /var/guix/gcroots/auto would point directly to /gnu/store/...-profile. * guix/scripts/package.scm (maybe-register-gc-root): Rename to... (register-gc-root): ... this. Remove conditional, and replace call to 'canonicalize-path' with (string-append (getcwd) "/" ...). (guix-package): Call 'register-gc-root' only if PROFILE is different from %CURRENT-PROFILE. * tests/guix-package.sh: Add test case. Ludovic Courtès
2015-02-02tests: Skip 'guix-register' when the socket name length is exceeded....* tests/guix-register.sh: Before running 'guix-daemon', check whether the socket name length exceeds the system limitation. Ludovic Courtès
2015-02-02tests: Don't dump the list of dead items in the test log....* tests/store.scm ("dead-paths"): Wrap result in '->bool'. Ludovic Courtès
2015-02-02store: Add 'build-things'....* guix/store.scm (operation-id): Rename 'build-derivations' to 'build-things', as per Nix commit 1aba0bf0. (build-derivations): Rename to... (build-things): ... this. Keep 'build-derivations' as an alias. (build): New procedure. * tests/store.scm ("build-things with output path", "substitute + build-things with output path"): New tests. Ludovic Courtès
2015-02-02tests: Add 'with-derivation-substitute' and use it....* guix/tests.scm (%substitute-directory): New variable. (call-with-derivation-narinfo): Use it. (call-with-derivation-substitute): New procedure. (with-derivation-substitute): New macro. * tests/store.scm ("substitute"): Use 'with-derivation-substitute'. ("substitute, corrupt output hash"): Likewise. Ludovic Courtès
2015-02-02tests: Further factorize substitute mocks....* guix/tests.scm (derivation-narinfo): Turn 'nar' into a keyword parameter. Add #:sha256 parameter, and honor it. (call-with-derivation-narinfo): Add #:sha256 and pass it to 'derivation-narinfo'. (with-derivation-narinfo): Extend with support for (sha256 => value). * tests/store.scm ("substitute query"): Use 'with-derivation-narinfo'. ("substitute"): Likewise. ("substitute, corrupt output hash"): Likewise. ("substitute --fallback"): Likewise. * tests/derivations.scm: Remove Emacs local variable. Ludovic Courtès
2015-02-02tests: Use 'with-store' as appropriate....* tests/store.scm ("no substitutes", "substitute query", "substitute", "substitute, corrupt output hash", "substitute --fallback"): Use 'with-store' instead of 'open-connection'. Ludovic Courtès
2015-01-28lint: Fix argument parsing when several packages are specified....* guix/scripts/lint.scm (%options) <--checkers>: Remove 'arg-handler' parameter, and return a single value. (guix-lint)[parse-options]: Remove 'arg-handler' parameter from handlers. Remove second seed to 'args-fold*'. * tests/guix-lint.sh: Add test. Ludovic Courtès
2015-01-24derivations: Raise an error for references to non-existent outputs....Fixes <http://bugs.gnu.org/19630>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/derivations.scm (&derivation-error, &derivation-missing-output-error): New error conditions. (derivation->output-path): Raise a '&derivation-missing-output-error' if OUTPUT is not an output of DRV. * guix/ui.scm (call-with-error-handling): Add case for 'derivation-missing-output-error?'. (show-what-to-build): Check whether (derivation-outputs drv) is empty. * tests/packages.scm ("reference to non-existent output"): Add test. Ludovic Courtès
2015-01-20gnu: 'search-patch' raises an error when a patch is not found....* gnu/packages.scm (search-patch): Raise an error condition when 'search-path' returns #f. * tests/packages.scm ("patch not found yields a run-time error"): New test. Ludovic Courtès
2015-01-19records: Add support for delayed fields....* guix/records.scm (make-syntactic-constructor): Add #:delayed parameter. [delayed-field?]: New procedure. [wrap-field-value]: Use it. (define-record-type*)[delayed-field?, wrapped-field?]: New procedures. [thunked-field-accessor-name]: Rename to... [wrapped-field-accessor-name]: ... this. [field-spec->srfi-9]: Change 'thunked' to 'wrapped'. [delayed-field-accessor-definition]: New procedure. Compute delayed-field accessors and emit them. Pass #:delayed to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & delayed", "define-record-type* & delayed & default", "define-record-type* & delayed & inherited"): New tests. Ludovic Courtès
2015-01-19tests: Adjust syscall tests for 2.6ish Linux....* tests/syscalls.scm ("set-network-interface-flags", "set-network-interface-address"): Accept EACCES as a valid result. Ludovic Courtès
2015-01-17monads: Add the state monad....* guix/monads.scm (state-return, state-bind, run-with-state, current-state, set-current-state, state-push, state-pop): New procedures. (%state-monad): New variable. * tests/monads.scm (%monads): Add %STATE-MONAD. (%monad-run): Add 'run-with-state'. (values->list): New macro. ("set-current-state", "state-push etc."): New tests. Ludovic Courtès
2015-01-17store: Add #:recursive? parameter to 'export-paths'....* guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests. Ludovic Courtès
2015-01-16Merge branch 'core-updates'...Conflicts: gnu/packages/bootstrap.scm Ludovic Courtès
2015-01-14packages: Convert source derivations to monadic style....* guix/packages.scm (origin->derivation): Take body from 'package-source-derivation', and change it to monadic style. Expect METHOD to a monadic procedure. (package-source-derivation): Define in terms of 'origin->derivation'. * guix/download.scm (url-fetch): Remove 'store' argument. Remove 'guile-for-build' variable. Turn into a monadic procedure. * guix/git-download.scm (git-fetch): Likewise. * guix/svn-download.scm (svn-fetch): Likewise. * tests/builders.scm (url-fetch*): New procedure. Change tests to call 'url-fetch*' instead of 'url-fetch'. * tests/packages.scm ("package-source-derivation, snippet"): Remove 'store' parameter of 'fetch' and change it to use 'interned-file' instead of 'add-to-store'. * gnu/packages/bootstrap.scm (bootstrap-origin)[boot]: Remove 'store' parameter. Ludovic Courtès
2015-01-14store: Add 'store-lower'....* guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test. Ludovic Courtès
2015-01-14monads: Move '%store-monad' and related procedures where they belong....This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly. Ludovic Courtès
2015-01-13Merge branch 'master' into core-updatesMark H Weaver
2015-01-13tests: Properly synchronize threads in the 'home-page' lint tests....* tests/lint.scm (%http-server-lock, %http-server-ready): New variables. (http-open): New procedure. (stub-http-server): Use it. (call-with-http-server): Wrap body in 'with-mutex'. Call 'wait-condition-variable' after 'make-thread'. Ludovic Courtès
2015-01-12monads: Remove 'derivation-expression'....* guix/monads.scm (lower-inputs, derivation-expression): Remove. * tests/monads.scm (derivation-expression, "mlet* + derivation-expression"): Remove. Ludovic Courtès
2015-01-12monads: Rewrite 'text-file*' using gexps....* guix/monads.scm (text-file*): Move to... * guix/gexp.scm (text-file*): ... here. Rewrite using gexps. * tests/monads.scm ("text-file*"): Move to... * tests/gexp.scm ("text-file*"): ... here. Ludovic Courtès
2015-01-11Add (guix sets)....* guix/sets.scm, tests/sets.scm: New files.sets * Makefile.am (MODULES, SCM_TESTS): Add them. Ludovic Courtès
2015-01-11Merge branch 'master' into core-updatesMark H Weaver
2015-01-10derivations: Add 'substitution-oracle' and use it....This makes 'guix environment PACKAGE' significantly faster when substitutes are enabled. Before that, it would lead to many invocations of 'guix substitute-binary', one per 'derivation-prerequisites-to-build' call. Now, all these are replaced by a single invocation. * guix/derivations.scm (derivation-output-paths, substitution-oracle): New procedures. (derivation-prerequisites-to-build): Replace #:use-substitutes? with #:substitutable?. Remove the local 'derivation-output-paths' and 'substitutable?'. * guix/ui.scm (show-what-to-build): Add 'substitutable?'. Pass it to 'derivation-prerequisites-to-build'. [built-or-substitutable?]: Use it instead of 'has-substitutes?'. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Use #:substitutable? instead of #:use-substitutes?. Ludovic Courtès
2015-01-09derivations: Add 'derivation-output-names'....* guix/derivations.scm (derivation-output-names): New procedure. (derivation-prerequisites-to-build): Use it for #:outputs. (map-derivation): Likewise. * tests/derivations.scm ("derivation-output-names"): New test. Ludovic Courtès
2015-01-09import: Add CPAN importer....* guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm: New files. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them. * guix/scripts/import.scm (importers): Add cpan. * doc/guix.texi (Requirements): Mention `guix import cpan` as a user of guile-json. (Invoking guix import): Document new `guix import cpan` command. Eric Bavier
2015-01-09tests: import: Factorize utility function....* tests/pypi.scm (mock): Move this... * guix/tests.scm: to here. Eric Bavier