summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Make sure child process of 'pivot-root' test exits.Ludovic Courtès2016-10-191-15/+20
| | | | | * tests/syscalls.scm ("pivot-root"): Use 'test-equal'. Wrap child body in 'dynamic-wind'.
* tests: Fix typo in 'with-graft' transformation test.Ludovic Courtès2016-10-191-1/+1
| | | | | | | This is a followup to 645b9df858683dc05ffa04c9eb2fdc45ccef4a65. * tests/scripts-build.scm ("options->transformation, with-graft"): Use 'with-graft', not 'with-input'.
* lint: Suggest @code instead of quotes.Ludovic Courtès2016-10-191-0/+8
| | | | | | | | * guix/scripts/lint.scm (%quoted-identifier-rx): New variable. (check-description-style)[check-quotes]: New procedure. Use it. * tests/lint.scm ("description: suggest ornament instead of quotes"): New test.
* container: Allow 'container-excursion' to the same namespaces.Ludovic Courtès2016-10-191-0/+9
| | | | | | | | | | | Before that, 'container-excursion' would call 'setns' even when the target namespace is the one the caller is already in, which would fail. * gnu/build/linux-container.scm (container-excursion): Introduce 'source' and 'target'. Compare the result of 'readlink' on these instead of comparing file descriptors to decide whether to call 'setns'. * tests/containers.scm ("container-excursion, same namespace"): New test.
* grafts: Apply the right grafts in the presence of multiple outputs.Ludovic Courtès2016-10-171-0/+48
| | | | | | | | | Fixes <http://bugs.gnu.org/24712>. * guix/grafts.scm (cumulative-grafts): Add grafts for all the outputs of DRV. * tests/grafts.scm ("graft-derivation, replaced derivation has multiple outputs"): New test.
* guix build: Add '--with-graft'.Ludovic Courtès2016-10-171-0/+19
| | | | | | | | | | * guix/scripts/build.scm (transform-package-inputs/graft): New procedure. (%transformations): Add 'with-graft'. (%transformation-options): Likewise. (show-transformation-options-help): Document it. * tests/scripts-build.scm ("options->transformation, with-graft"): New test. * doc/guix.texi (Package Transformation Options): Document it.
* graph: Add '%referrer-node-type'.Ludovic Courtès2016-10-151-0/+22
| | | | | | | | | | * guix/scripts/graph.scm (ensure-store-items): New procedure. (%reference-node-type)[convert]: Use it. (non-derivation-referrers): New procedure. (%referrer-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("referrer DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it.
* grafts: 'graft-derivation' does now introduce grafts that shadow other grafts.Ludovic Courtès2016-10-141-0/+62
| | | | | | | | Partly fixes <http://bugs.gnu.org/24418>. * guix/grafts.scm (cumulative-grafts)[graft-origin?]: New procedure. [dependency-grafts]: Use it in new 'if' around recursive call. * tests/grafts.scm ("graft-derivation, grafts are not shadowed"): New test.
* packages: 'package-grafts' applies grafts on replacement.Ludovic Courtès2016-10-141-16/+90
| | | | | | | | | | Partly fixes <http://bugs.gnu.org/24418>. * guix/packages.scm (input-graft): Compute 'new' with #:graft? #t. (input-cross-graft): Likewise. * tests/packages.scm ("package-grafts, indirect grafts, cross"): Comment out. ("replacement also grafted"): New test.
* utils: Support defaults in substitute-keyword-arguments.Eric Bavier2016-10-071-0/+20
| | | | | | | * guix/utils.scm (collect-default-args, expand-default-args): New syntax. (substitute-keyword-arguments): Allow default value declarations. * tests/utils.scm (substitute-keyword-arguments): New test.
* utils: Fix default-keyword-arguments.Eric Bavier2016-10-071-0/+12
| | | | | | * guix/utils.scm (default-keyword-arguments): Properly test for present keywords. * tests/utils.scm (default-keyword-arguments): New test.
* lint: 'cve' checker reports the replacement's vulnerabilities.Ludovic Courtès2016-10-031-0/+23
| | | | | | | | | | | Before, 'guix lint -c cve' would report the vulnerabilities of the original package while pretending they are the vulnerabilities of the replacement. * guix/scripts/lint.scm (check-vulnerabilities): Consider the package replacement before calling 'package-vulnerabilities'. * tests/lint.scm ("cve: vulnerability fixed in replacement version"): New test.
* grafts: Allow the replacement to have a different name.Ludovic Courtès2016-10-031-0/+19
| | | | | | | | | | | | | | * guix/build/graft.scm (replace-store-references): REPLACEMENT is now the full string, not just the hash. (rewrite-directory)[hash-mapping](valid-suffix?): Remove. (hash+suffix): Rename to... (hash+rest): ... this. Change to return the whole string as the second element of the list. Adjust 'match-lambda' expression accordingly; check whether the string length of the origin and replacement match. * tests/grafts.scm ("graft-derivation, grafted item uses a different name"): New test. * doc/guix.texi (Security Updates): Update sentence on the name/version restriction.
* tests: Adjust 'guix build -S' test for source-less packages.Ludovic Courtès2016-10-031-3/+3
| | | | | | | This is a followup to 8a54c0ec694ad6e22b155d167552b8fd0914e82d. * tests/guix-build.sh: Allow 'guix build -S' to succeed with source-less packages. Check that the result is the empty string.
* import: utils: Refactor license->symbol.David Craven2016-09-281-0/+5
| | | | | * guix/import/utils.scm (license->symbol): Work for all licenses. * tests/import-utils.scm (license->symbol): Add test.
* gexp: Add 'file-append'.Ludovic Courtès2016-09-091-0/+53
| | | | | | | | | | * guix/gexp.scm (<file-append>): New record type. (file-append): New procedure. (file-append-compiler): New gexp compiler. * tests/gexp.scm ("file-append", "file-append, output") ("file-append, nested", "gexp->file + file-append"): New tests. * doc/guix.texi (G-Expressions): Use it in 'nscd' and 'list-files' examples. Document 'file-append'.
* guix hash: Add --exclude-vcs option.Jan Nieuwenhuizen2016-09-071-0/+16
| | | | | | | | | | * guix/scripts/hash.scm (show-help): Add help text for --exclude-vcs option. (%options): Add --exclude-vcs option. (guix-hash): Handle exclude-vcs option. * doc/guix.texi ("Invoking guix hash"): Update doc. * tests/guix-hash.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* packages: Add 'package-superseded' and associated support.Ludovic Courtès2016-09-062-0/+36
| | | | | | | | | | | | | | This provides a way to mark a package as superseded by another one. Upgrades replace superseded packages with their replacement. * guix/packages.scm (package-superseded, deprecated-package): New procedures. * gnu/packages.scm (%find-package): Check for 'package-superseded'. * guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New procedure. Call it when 'package-superseded' is true. * tests/guix-build.sh: Add test for a superseded package. * tests/packages.scm ("package-superseded") ("transaction-upgrade-entry, superseded package"): New tests.
* guix package: Build up the transaction incrementally.Ludovic Courtès2016-09-061-0/+29
| | | | | | | | | | | | | | * guix/scripts/package.scm (upgraded-manifest-entry): Rename to... (transaction-upgrade-entry): ... this. Add 'transaction' parameter and return a transaction. (options->installable): Likewise. [to-upgrade]: Rename to... [upgraded]: ... this, and change to be a transaction. Return a transaction. (options->removable): Likewise. (process-actions): Adjust accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades") ("transaction-upgrade-entry, one upgrade"): New tests.
* profiles: Add manifest-transaction helper procedures.Ludovic Courtès2016-09-061-0/+3
| | | | | | | * guix/profiles.scm (manifest-transaction-install-entry) (manifest-transaction-remove-pattern) (manifest-transaction-null?): New procedures. * tests/profiles.scm ("manifest-transaction-null?"): New test.
* Add (guix modules).Ludovic Courtès2016-09-051-0/+45
| | | | | | | * guix/modules.scm, tests/modules.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them. * doc/guix.texi (G-Expressions): Add an example of 'source-module-closure'.
* packages: Add 'package-input-rewriting'.Ludovic Courtès2016-09-011-0/+25
| | | | | | | * guix/packages.scm (package-input-rewriting): New procedure. * tests/packages.scm ("package-input-rewriting"): New test. * doc/guix.texi (Defining Packages): Document it. (Package Transformation Options): Add cross-reference.
* tests: hackage: Fix mock urls.Efraim Flashner2016-09-011-1/+1
| | | | | | Followup to 18f747350437136b203ef6400176d1fb07b131ea. * tests/hackage.scm (hackage->guix-package): Use 'https' in mock urls.
* tests: cpan: Fix mock urls.Eric Bavier2016-08-311-2/+2
| | | | | | Followup to 7a62263ee5. * tests/cpan.scm (cpan->guix-package): Use "https" in mock urls.
* services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'.Ludovic Courtès2016-08-312-68/+69
| | | | | | | | | | * guix/scripts/system.scm (service-upgrade): Move to... * gnu/services/shepherd.scm (shepherd-service-upgrade): ... here. * tests/system.scm ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new", "service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): Move to... * tests/services.scm: ... here. Adjust to 'service-upgrade' rename.
* guix system: Do not unload services depended on.Ludovic Courtès2016-08-311-0/+32
| | | | | | | | | | | | Reported by Mark H Weaver <mhw@netris.org> at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01470.html>. * guix/scripts/system.scm (service-upgrade)[live-service-required?]: New procedure. [obsolete?]: Use it. * tests/system.scm ("service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): New tests.
* guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.Ludovic Courtès2016-08-311-2/+3
| | | | | | | | | | | | * guix/scripts/system.scm (service-upgrade)[essential?]: SERVICE is now a <live-service>. [lookup-target, lookup-live, running?, stopped, obsolete?]: New procedures. [to-load, to-unload]: Use them. TO-UNLOAD is now a list of <live-service>. (call-with-service-upgrade-info): Extract symbols from TO-UNLOAD. * tests/system.scm ("service-upgrade: one unchanged, one upgraded, one new"): Adjust accordingly.
* services: shepherd: Add 'shepherd-service-lookup-procedure'.Ludovic Courtès2016-08-311-1/+10
| | | | | | | * gnu/services/shepherd.scm (shepherd-service-lookup-procedure): New procedure. (shepherd-service-back-edges)[provision->service]: Use it. * tests/services.scm ("shepherd-service-lookup-procedure"): New test.
* guix system: Extract and test the service upgrade procedure.Ludovic Courtès2016-08-311-0/+34
| | | | | | | | | * guix/scripts/system.scm (service-upgrade): New procedure, with code from... (call-with-service-upgrade-info): ... here. Use it. * tests/system.scm (live-service, service-upgrade): New variables. ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new"): New tests.
* guix: lint: Check descriptions for trademark signs.Eric Bavier2016-08-281-1/+15
| | | | | | | * guix/scripts/lint.scm (check-description-style): Emit a warning if trademark signs found in description. * tests/lint.scm (description: may not contain trademark signs): Add test.
* tests: Fix 'guix environment --container' test in the presence of tmpfs.Ludovic Courtès2016-08-291-1/+1
| | | | | | | | Reported by Ting-Wei Lan <lantw44@gmail.com>. This is a followup to 1250034d5aff14fe236aad9900233a2b6f8563bb. * tests/guix-environment-container.sh (mount_test_code): Reverse order of 'string-prefix?' arguments.
* import: Importers return prefixed licenses.David Craven2016-08-282-3/+3
| | | | | | | | | * guix/import/utils.scm (define-module): Import licenses with license: prefix. (string->licenses): Use prefixed licenses. (license->symbol): Return symbols with the prefix license:. * guix/tests/pypi.scm (pypi->guix-package): Update test cases. * guix/tests/gem.scm (gem->guix-package): Update test case.
* Merge branch 'core-updates'Mark H Weaver2016-08-041-3/+8
|\
| * tests: 'guix-environment-container.sh' works when run from a tmpfs.Ludovic Courtès2016-07-311-3/+8
| | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22004>. Reported by Ting-Wei Lan <lantw44@gmail.com>. * tests/guix-environment-container.sh (mount_test_code): Add 'match' clause to ignore "/"; augment clause that ignores specific file system types such that it does not ignore parent mount points.
* | Revert "Merge branch 'core-updates'"Mark H Weaver2016-08-041-8/+3
| | | | | | | | This reverts commit 455859a50f88f625d13fc2f304111f02369b366b.
* | tests: Make sure threads use separate output ports.Ludovic Courtès2016-08-021-6/+18
| | | | | | | | | | | | * tests/publish.scm (with-separate-output-ports): New macro. <top level>: Use it when spawning new thread. ("/*.narinfo with compression"): Likewise.
* | tests: Work around Guile bug with unbuffered custom binary input ports.Ludovic Courtès2016-08-021-1/+2
| | | | | | | | | | | | | | | | Reported by Chris Marusich <cmmarusich@gmail.com> at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24060#19> * tests/publish.scm (http-get-port): Remove 'setvbuf' call for the response port.
* | Merge branch 'core-updates'Ludovic Courtès2016-08-011-3/+8
| |
* | publish: Do not compress already-compressed files.Ludovic Courtès2016-08-011-0/+14
|/ | | | | | | * guix/scripts/publish.scm (narinfo-string): Force %NO-COMPRESSION when STORE-PATH matches 'compressed-file?'. * guix/utils.scm (compressed-file?): New procedure. * tests/publish.scm ("/*.narinfo for a compressed file"): New test.
* tests: Improve synchronization in 'tests/guix-register.sh'.Ludovic Courtès2016-07-291-3/+15
| | | | | | | * tests/guix-register.sh: When launching guix-daemon, add retry loop around 'open-connection'. This fixes test failures that could occur under heavy load where the daemon's socket file wouldn't be ready yet when the client connects.
* gnu: commencement: 'guile-final' is now "hidden".Ludovic Courtès2016-07-281-0/+14
| | | | | | | | | | | This way, we no longer have this annoying warning: $ guix build guile -n guix build: warning: ambiguous package specification `guile' guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:128:2 * gnu/packages/commencement.scm (guile-final): Use 'hidden-package'. * tests/packages.scm ("fold-packages, hidden package"): New test.
* packages: Add 'hidden-package'.Ludovic Courtès2016-07-281-0/+4
| | | | | | * guix/packages.scm (hidden-package, hidden-package?): New procedures. * gnu/packages.scm (fold-packages): Filter out 'hidden-package?'. * tests/packages.scm ("hidden-package"): New test.
* tests: Use unbuffered input ports when decompressing from 'guix publish'.Ludovic Courtès2016-07-271-2/+10
| | | | | | | | Fixes <http://bugs.gnu.org/24060>. Reported by Chris Marusich <cmmarusich@gmail.com>. * tests/publish.scm (http-get-port): Explicitly call 'open-socket-for-uri' and add calls to 'setvbuf'.
* profiles: Output in 'package->manifest-entry' defaults to "out".Ludovic Courtès2016-07-261-0/+10
| | | | | | | | | | | Fixes <http://bugs.gnu.org/24029>. Reported by Dylan Jeffers <sapientech@openmailbox.org>. * guix/profiles.scm (package->manifest-entry): Change #:output to default to "out". (packages->manifest): Add 'package?' in second 'match' clause. * tests/profiles.scm ("package->manifest-entry defaults to \"out\""): New test.
* environment: Set 'GUIX_ENVIRONMENT' to the profile.Ludovic Courtès2016-07-261-0/+4
| | | | | | | * guix/scripts/environment.scm (create-environment): Set 'GUIX_ENVIRONMENT' to PROFILE. * tests/guix-environment.sh: Test it. * doc/guix.texi (Invoking guix environment): Document it.
* import: pypi: Correctly handle new-style URLs.Ludovic Courtès2016-07-261-0/+16
| | | | | | | | | Fixes <http://bugs.gnu.org/23997>. * guix/import/pypi.scm (guix-package->pypi-name): Rewrite using 'basename' and 'hyphen-package-name->name+version'. * tests/pypi.scm ("guix-package->pypi-name, old URL style") ("guix-package->pypi-name, new URL style"): New tests.
* lint: 'inputs-should-be-native' checks for intltool, itstool and glib:bin.David Craven2016-07-241-1/+11
| | | | | | | | * guix/scripts/lint.scm (check-inputs-should-be-native): Warn when intltool, itstool or glib:bin isn't a native-input. * tests/lint.scm (inputs: glib:bin is probably a native input): Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* publish: Handle '/file' URLs, for content-addressed files.Ludovic Courtès2016-07-201-0/+34
| | | | | | | | | | * guix/scripts/publish.scm (render-content-addressed-file): New procedure. (http-write): Add 'application/octet-stream' case. (make-request-handler): Add /file/NAME/sha256/HASH URLs. * tests/publish.scm ("/file/NAME/sha256/HASH") ("/file/NAME/sha256/INVALID-NIX-BASE32-STRING") ("/file/NAME/sha256/INVALID-HASH"): New tests. * doc/guix.texi (Invoking guix publish): Mention the /file URLs.
* tests: Adjust to Shepherd error message change.Ludovic Courtès2016-07-201-2/+2
| | | | | | | This is a followup to commit 2c2ec261a8d3c37e5147038f47ad24c57cde4134. * tests/guix-system.sh: Adjust expected error message for Shepherd services that are not provided.
* publish: Add '--compression'.Ludovic Courtès2016-07-191-7/+52
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add '--compression'. (<compression>): New record type. (%no-compression, %default-gzip-compression): New variables. (%default-options): Add 'compression' key. (narinfo-string): Add #:compression parameter and honor it. (render-narinfo): Likewise. (render-nar): Likewise. <top level>: Add call to 'declare-header!'. (swallow-zlib-error): New macro. (nar-response-port): New procedure. (http-write): Add call to 'force-output'. Use 'nar-response-port' instead of 'response-port'. Use 'swallow-zlib-error'. (make-request-handler): Add #:compression parameter and honor it. Add "nar/gzip" URL handler. (run-publish-server): Add #:compression parameter and honor it. (guix-publish): Honor --compression. * tests/publish.scm (http-get-port, wait-until-ready): New procedures. <top level>: Run main server with "-C0". Call 'wait-until-ready'. ("/nar/gzip/*", "/*.narinfo with compression"): New tests. * doc/guix.texi (Invoking guix publish): Document it.