summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* profiles: Store search paths in manifests.Ludovic Courtès2015-05-021-0/+22
| | | | | | | | | | | | | | | | | | | Discussed in <http://bugs.gnu.org/20255>. * guix/packages.scm (sexp->search-path-specification): New variable. * guix/profiles.scm (<manifest-entry>)[search-paths]: New field. (package->manifest-entry): Initialize it. (manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...). Emit (search-paths ...). Increment version. (find-package): New procedure. (sexp->manifest)[infer-search-paths]: New procedure. Use it to initialize the 'search-paths' field for versions 0 and 1. Add case for version 2. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Remove. Use 'manifest-entry-search-paths' instead of 'manifest-entry->package' plus 'package-native-search-paths'. * tests/profiles.scm ("profile-manifest, search-paths"): New test.
* Merge branch 'master' into core-updates.Andreas Enge2015-04-261-1/+5
|\
| * tests: Select appropriate bootstrap guile version for current system.Mark H Weaver2015-04-221-1/+5
| | | | | | | | | | * tests/packages.scm ("package-source-derivation, snippet"): Select appropriate guile-2.0.x.tar.xz tarball based on the value of (%current-system).
* | gremlin: Add support for the expansion of $ORIGIN in RUNPATH.Ludovic Courtès2015-04-231-0/+12
|/ | | | | | | | * guix/build/gremlin.scm (expand-variable, expand-origin): New procedures. (validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field of DYNINFO. * tests/gremlin.scm ("expand-origin"): New test.
* guix package: -A and -s take supported systems into account.Ludovic Courtès2015-04-191-0/+10
| | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query] <list-available>: Restrict results to packages matching 'supported-package?". * guix/ui.scm (package->recutils): Print "systems:". * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Adjust description of '--list-available' accordingly.
* packages: Add 'supported-package?'.Ludovic Courtès2015-04-191-0/+8
| | | | | | | * guix/packages.scm (supported-package?): New procedure. * tests/packages.scm ("supported-package?"): New test. * build-aux/hydra/gnu-system.scm (package->job): Use it instead of 'package-transitive-supported-systems'.
* Merge branch 'master' into core-updatesMark H Weaver2015-04-172-9/+3
|\ | | | | | | | | | | Conflicts: gnu-system.am gnu/packages/gstreamer.scm
| * profiles: Generalize "hooks" for 'profile-derivation'.Ludovic Courtès2015-04-152-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries manifest)) test. (ca-certificate-bundle): Likewise. (ghc-package-cache-file): Turn 'if' into 'and', and remove second arm. (%default-profile-hooks): New variable. (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and #:ca-certificate-bundle?. Add #:hooks. Iterate over HOOKS. Adjust 'inputs' accordingly. * guix/scripts/package.scm (guix-package): Adjust 'profile-derivation' call accordingly. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation", "profile-derivation, inputs"): Likewise.
* | lint: Add a 'derivation' checker.Ludovic Courtès2015-04-131-0/+10
| | | | | | | | | | | | * guix/scripts/lint.scm (check-derivation): New procedure. (%checkers): Add 'derivation' checker. * tests/lint.scm ("derivation: invalid arguments"): New test.
* | packages: 'package-transitive-supported-systems' accounts for implicit inputs.Ludovic Courtès2015-04-111-9/+32
| | | | | | | | | | | | | | | | | | | | Reported by Federico Beffa. * guix/packages.scm (package-transitive-supported-systems): Use bag-direct-inputs + package->bag rather than package-direct-inputs. * tests/packages.scm ("package-transitive-supported-systems"): Add explicit 'build-system' field to each 'dummy-package' form. ("package-transitive-supported-systems, implicit inputs"): New test.
* | lint: Report patches that cannot be found.Ludovic Courtès2015-04-101-0/+15
| | | | | | | | | | * guix/scripts/lint.scm (check-patch-file-names): Wrap body in 'guard'. * tests/lint.scm ("patches: not found"): New test.
* | lint: Rename 'check-patches' to 'check-patch-file-names'.Ludovic Courtès2015-04-101-1/+1
| | | | | | | | | | | | | | * guix/scripts/lint.scm (check-patches): Rename to... (check-patch-file-names): ... this. Rename 'filename' to 'file'. (%checkers): Adjust accordingly. * tests/lint.scm ("patches: file names"): Likewise.
* | Merge branch 'master' into core-updatesLudovic Courtès2015-04-094-0/+145
|\|
| * profiles: Generate GHC's package database cache.Federico Beffa2015-04-082-0/+3
| | | | | | | | | | | | | | | | | | | | * 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-081-0/+134
| | | | | | | | | | * 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-081-0/+8
| | | | | | | | | | * tests/guix-package-net.sh: Reinstate networking and shebang test that inadvertently vanished in commit 57b8623.
* | Merge branch 'master' into core-updates宋文武2015-04-085-130/+313
|\|
| * tests: Move 'guix package' tests that require networking to a separate file.Ludovic Courtès2015-04-062-132/+176
| | | | | | | | | | | | | | * 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-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-061-1/+5
| | | | | | | | | | | | | | | | 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-041-0/+114
| | | | | | | | | | | | | | | | | | * 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-041-0/+10
| | | | | | | | | | | | | | | | * 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.
* | Merge branch 'master' into core-updatesLudovic Courtès2015-03-315-5/+87
|\|
| * Add (guix build gremlin).Ludovic Courtès2015-03-311-0/+57
| | | | | | | | | | | | * 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-311-2/+1
| | | | | | | | * tests/lint.scm: Change module name to 'test-lint'.
| * gexp: Add 'local-file'.Ludovic Courtès2015-03-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-262-3/+3
| | | | | | | | | | | | | | | | * 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.
* | Merge branch 'master' into core-updatesLudovic Courtès2015-03-254-35/+72
|\|
| * substitute: Rename cache directory from "substitute-binary" to "substitute".Ludovic Courtès2015-03-252-2/+2
| | | | | | | | | | | | | | * 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-252-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-251-0/+14
| | | | | | | | | | | | | | * 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-221-0/+6
| | | | | | | | | | | | | | | | * 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-221-0/+17
| | | | | | | | | | | | * guix/gexp.scm (lower-references): Add <gexp-input> case. * tests/gexp.scm ("gexp->derivation #:allowed-references, specific output"): New test.
* | packages: Rewrite 'patch-and-repack' using gexps.Ludovic Courtès2015-03-181-4/+1
|/ | | | | | | | | | | | | | | * guix/packages.scm (patch-and-repack): Remove 'store' parameter and change default value of #:inputs to (%standard-patch-inputs). [lookup-input, instantiate-patch]: New procedures. [patch-inputs]: Remove. [builder]: Rename to... [build]: ... this. Use gexps instead of sexps. (patch-and-repack*): Remove. (origin->derivation): Use 'patch-and-repack' instead of 'patch-and-repack*'. * tests/packages.scm ("package-source-derivation, snippet")[source](snippet): Remove references to '%build-inputs' and '%outputs'.
* gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp.Ludovic Courtès2015-03-171-12/+2
| | | | | | | | | | | * 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-171-0/+10
| | | | | | | | | | | | * 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-171-0/+9
| | | | | | | | | | | * 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-171-4/+8
| | | | | | * 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-091-1/+36
| | | | | | | | | | 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-051-0/+33
| | | | | | * 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-051-1/+1
| | | | | * 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-051-0/+37
| | | | | | | * 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-042-2/+4
| | | | | | | | | | | 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-021-0/+7
| | | | | | | | 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-271-0/+10
| | | | | | | * 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-271-0/+16
| | | | | * 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-261-0/+9
| | | | | | | | | | 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-261-0/+31
| | | | | | | | | | | | | | * 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-243-4/+15
| | | | | | | | | | | | 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-244-14/+7
| | | | | | | | | | | * 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.