aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* profiles: Generate GHC's package database cache.Federico Beffa2015-04-08
| | | | | | | | | | * guix/profiles.scm (ghc-package-cache-file): New procedure. (profile-derivation): Add 'ghc-package-cache?' keyword argument. If true (the default), add the result of 'ghc-package-cache-file' to 'inputs'. * guix/scripts/package.scm (guix-package)[process-actions]: Pass #:ghc-package-cache? to 'profile-generation'. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation"): Likewise.
* import: Add hackage importer.Federico Beffa2015-04-08
| | | | | * guix/import/hackage.scm: New file. * tests/hackage.scm: New file.
* tests: Skip 'guix-package-net.sh' when prerequisites aren't met.Ludovic Courtès2015-04-08
| | | | | * tests/guix-package-net.sh: Reinstate networking and shebang test that inadvertently vanished in commit 57b8623.
* tests: Move 'guix package' tests that require networking to a separate file.Ludovic Courtès2015-04-06
| | | | | | | * tests/guix-package.sh (shebang_not_too_long): Remove. Move everything below "if [networking + shebang_not_too_long]" to... * tests/guix-package-net.sh: ... here. New file. * Makefile.am (SH_TESTS): Add it.
* guix package: Never remove the current generation and warn about it.Ludovic Courtès2015-04-06
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/19978>. Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer). * guix/scripts/package.scm (delete-matching-generations): Warn when CURRENT is in NUMBERS, and always remove it before calling 'delete-generations'. * tests/guix-package.sh: Add --switch-generation=2 invocation before --delete-generations=3 invocation. Add --delete-generations=1.. test case.
* tests: Deal with 'mount-points' not returning "/".Ludovic Courtès2015-04-06
| | | | | | | | Fixes <http://bugs.gnu.org/20261>. Reported by Mark H Weaver <mhw@netris.org>. * tests/syscalls.scm ("mount-points"): Check for a few other likely mount points in addition to "/".
* scripts: Add 'publish' command.David Thompson2015-04-04
| | | | | | | | | * guix/scripts/publish.scm: New file. * po/guix/POTFILES.in: Add it. * tests/publish.scm: New file. * Makefile.am (MODULES): Add script module. (SCM_TESTS): Add test module. * doc/guix.texi ("Invoking guix publish"): New node.
* store: Add query-path-info operation.David Thompson2015-04-04
| | | | | | | | * guix/store.scm (<path-info>): New record type. (read-path-info): New procedure. (read-arg): Add 'path-info' syntax. (query-path-info): New variable. * tests/store.scm ("query-path-info"): New test.
* Add (guix build gremlin).Ludovic Courtès2015-03-31
| | | | | | * guix/build/gremlin.scm, tests/gremlin.scm: New files. * Makefile.am (MODULES): Add guix/build/gremlin.scm. (SCM_TESTS): Add tests/gremlin.scm.
* tests: Fix module name for 'lint'.Ludovic Courtès2015-03-31
| | | | * tests/lint.scm: Change module name to 'test-lint'.
* gexp: Add 'local-file'.Ludovic Courtès2015-03-29
| | | | | | | | | | | | | * guix/gexp.scm (<local-file>): New record type. (local-file): New procedure. (local-file-compiler): New compiler. (gexp->sexp) <struct? thing>: Handle the case where 'lower' returns a file name. (text-file*): Update docstring.local-file doc * tests/gexp.scm ("one local file", "gexp->derivation, local-file"): New tests. * doc/guix.texi (G-Expressions): Mention local files early. Document 'local-file'. Update 'text-file*' documentation.
* Fix remaining references to "substitute-binary".Taylan Ulrich Bayırlı/Kammer2015-03-26
| | | | | | | | * nix/nix-daemon/guix-daemon.cc (main): Change substitute-binary to substitute. * po/guix/POTFILES.in: Likewise. * tests/guix-daemon.sh: Likewise. * tests/guix-system.sh: Likewise.
* substitute: Rename cache directory from "substitute-binary" to "substitute".Ludovic Courtès2015-03-25
| | | | | | | * guix/scripts/substitute.scm (%narinfo-cache-directory): Change "substitute-binary" to "substitute". * tests/store.scm ("substitute query"): Likewise. * tests/substitute.scm (call-with-narinfo): Likewise.
* Rename 'guix substitute-binary' to 'guix substitute'.Ludovic Courtès2015-03-25
| | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: Rename to... * guix/scripts/substitute.scm: ... this. Adjust module name, entry point, comments, and help string accordingly. * nix/scripts/substitute-binary.in: Rename to... * nix/scripts/substitute.in: ... this. * pre-inst-env.in (NIX_SUBSTITUTERS): Adjust accordingly. * tests/substitute-binary.scm: Rename to... * tests/substitute.scm: ... this. Adjust references to (guix scripts substitute) accordingly. * guix/ui.scm (show-guix-help)[internal?]: Change "substitute-binary" to "substitute". * Makefile.am (MODULES, SCM_TESTS): Adjust to file renames. * daemon.am (nodist_pkglibexec_SCRIPTS): Likewise. * config-daemon.ac: Likewise. * guix/tests.scm (call-with-derivation-narinfo): Adjust comments and docstring.
* derivations: Add a 'cut?' parameter to 'derivation-prerequisites'.Ludovic Courtès2015-03-25
| | | | | | | * guix/derivations.scm (valid-derivation-input?): New procedure. (derivation-prerequisites): Add 'cut?' parameter and honor it. * tests/derivations.scm ("derivation-prerequisites and derivation-input-is-valid?"): New test.
* gexp: Fix handling of nativeness in nested gexps.Ludovic Courtès2015-03-22
| | | | | | | | * guix/gexp.scm (gexp-inputs): Remove 'references' parameter; add #:native? and honor it. [add-reference-inputs]: Distinguish between native gexp inputs, and non-native gexp inputs. Honor 'native?' field of list inputs. * tests/gexp.scm ("ungexp + ungexp-native, nested"): New test.
* gexp: Allow <gexp-input> objects in #:allowed-references.Ludovic Courtès2015-03-22
| | | | | | * guix/gexp.scm (lower-references): Add <gexp-input> case. * tests/gexp.scm ("gexp->derivation #:allowed-references, specific output"): New test.
* gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp.Ludovic Courtès2015-03-17
| | | | | | | | | | | * guix/gexp.scm (gexp-inputs)[add-reference-inputs]: Remove clause for inputs of the form (PACKAGE OUTPUT). (gexp->sexp)[reference->sexp]: Likewise. * tests/gexp.scm ("input list splicing"): Change 'list' to 'gexp-input' for glibc:debug. ("text-file*"): Likewise for %bootstrap-guile:out. ("input list splicing + gexp-input + ungexp-native-splicing"): Remove, now redundant.
* gexp: Export 'gexp-input' constructor.Ludovic Courtès2015-03-17
| | | | | | | | | | | | * guix/gexp.scm (<gexp-input>)[gexp-input]: Rename to... [%gexp-input]: ... this. Adjust callers accordingly. (gexp-input): New procedure. (gexp-inputs)[add-reference-inputs]: When the input is a list, check whether each item is already 'gexp-input?' and to not rewrap those. (gexp-outputs)[add-reference-output]: Likewise. (gexp->sexp): Likewise. * tests/gexp.scm ("input list splicing + gexp-input + ungexp-native-splicing"): New test.
* gexp: Add <gexp-input>.Ludovic Courtès2015-03-17
| | | | | | | | | | | * guix/gexp.scm (<gexp-input>): New record type. (gexp-inputs)[add-reference-inputs]: Adjust clauses to expect <gexp-input> objects. (gexp-outputs)[add-reference-output]: Likewise. (gexp->sexp)[reference->sexp]: Likewise. (canonicalize-reference): Remove. (gexp)[escape->ref]: Use 'gexp-input' for all the references. Remove use of 'canonicalize-reference'.
* tests: Add an indirection for white-box testing.Ludovic Courtès2015-03-17
| | | | | | * tests/gexp.scm (gexp-inputs, gexp-native-inputs, gexp-outputs, gexp->sexp): Make an indirection, to facilitate live testing with Geiser.
* services: Statically report duplicate dmd service identifiers.Ludovic Courtès2015-03-09
| | | | | | | | | | 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.
* lint: Add tests for the 'source' checker.Ludovic Courtès2015-03-05
| | | | | | * guix/scripts/lint.scm (check-source): Export. * tests/lint.scm (%null-sha256): New procedure. ("source: 200", "source: 404"): New tests.
* tests: Fix import.Ludovic Courtès2015-03-05
| | | | | * tests/lint.scm: Use 'url-fetch' from (guix download), not (guix build download), although this was actually harmless here.
* store: Attempt to decode build logs as UTF-8.Ludovic Courtès2015-03-05
| | | | | | | * 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.
* tests: Remove dependency on 'glibc-utf8-locales' for profile tests.Ludovic Courtès2015-03-04
| | | | | | | | | | | 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.
* gexp: Make sure 'gexp-outputs' removes duplicate outputs.Ludovic Courtès2015-03-02
| | | | | | | | 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.
* gexp: Aggregate outputs of compound gexps.Ludovic Courtès2015-02-27
| | | | | | | * guix/gexp.scm (gexp-outputs)[add-reference-output]: Recurse into lists. * tests/gexp.scm ("output list + ungexp-splicing list, combined gexps"): New test.
* gexp: Add tests for 'gexp-outputs'.Ludovic Courtès2015-02-27
| | | | | * tests/gexp.scm (gexp-outputs): New procedure. ("output list", "output list, combined gexps"): New tests.
* ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS.Ludovic Courtès2015-02-26
| | | | | | | | | | 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.
* ui: Factorize command-line + env. var. option parsing.Ludovic Courtès2015-02-26
| | | | | | | | | | | | | | * 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.
* tests: Skip tests that would fail due to the shebang length.Ludovic Courtès2015-02-24
| | | | | | | | | | | | 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'.
* tests: Factorize the network reachability test.Ludovic Courtès2015-02-24
| | | | | | | | | | | * 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.
* import: cpan: Update tests for dependency handling.Eric Bavier2015-02-20
| | | | | | * 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.
* gexp: Add #:graft? parameter to 'gexp->derivation'.Ludovic Courtès2015-02-13
| | | | | | | * 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.
* gexp: Implement 'imported-modules' & co. using 'gexp->derivation'.Ludovic Courtès2015-02-13
| | | | | | | | | | | | | * 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.
* gexp: Add #:allowed-references parameter to 'gexp->derivation'.Ludovic Courtès2015-02-11
| | | | | | | | * 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.
* profiles: Report "pseudo-upgrades" as upgrades, not downgrades.Ludovic Courtès2015-02-09
| | | | | | | | | | 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.
* profiles: Distinguish downgrades from upgrades.Ludovic Courtès2015-02-08
| | | | | | | | | | 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.
* ui: Simplify 'show-manifest-transaction' test.Ludovic Courtès2015-02-08
| | | | | * tests/ui.scm ("show-manifest-transaction"): Remove useless call to 'manifest-transaction-effects'.
* serialization: Check for EOF and incomplete input conditions.Ludovic Courtès2015-02-07
| | | | | | | | | | | | 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.
* tests: Disable grafts when comparing derivations.Ludovic Courtès2015-02-06
| | | | | | | Fixes a regression introduced with the grafting of Patch in 3f11f01. * tests/packages.scm ("reference to non-existent output"): Wrap in 'parameterize'.
* guix package: Make custom profiles actual indirect roots.Ludovic Courtès2015-02-06
| | | | | | | | | | | | | 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.
* tests: Skip 'guix-register' when the socket name length is exceeded.Ludovic Courtès2015-02-02
| | | | | * tests/guix-register.sh: Before running 'guix-daemon', check whether the socket name length exceeds the system limitation.
* tests: Don't dump the list of dead items in the test log.Ludovic Courtès2015-02-02
| | | | * tests/store.scm ("dead-paths"): Wrap result in '->bool'.
* store: Add 'build-things'.Ludovic Courtès2015-02-02
| | | | | | | | | | * 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.
* tests: Add 'with-derivation-substitute' and use it.Ludovic Courtès2015-02-02
| | | | | | | | | * 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.
* tests: Further factorize substitute mocks.Ludovic Courtès2015-02-02
| | | | | | | | | | | | | * 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.
* tests: Use 'with-store' as appropriate.Ludovic Courtès2015-02-02
| | | | | | | * tests/store.scm ("no substitutes", "substitute query", "substitute", "substitute, corrupt output hash", "substitute --fallback"): Use 'with-store' instead of 'open-connection'.
* lint: Fix argument parsing when several packages are specified.Ludovic Courtès2015-01-28
| | | | | | | | * 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.