summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* syscalls: Add bindings for SIOCGIFNETMASK and SIOCSIFNETMASK.Ludovic Courtès2016-11-161-0/+21
| | | | | | | | | * guix/build/syscalls.scm (SIOCGIFNETMASK, SIOCSIFNETMASK): New variables. (set-network-interface-netmask, network-interface-netmask): New procedures. * tests/syscalls.scm ("network-interface-netmask lo") ("set-network-interface-netmask"): New tests.
* daemon: Add 'built-in-builders' RPC.Ludovic Courtès2016-11-161-0/+4
| | | | | | | | | | | | * nix/libstore/builtins.cc (builtinBuilderNames): New function. * nix/libstore/builtins.hh (builtinBuilderNames): New declaration. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x160. (WorkerOp)[wopBuiltinBuilders]: New value. * nix/nix-daemon/nix-daemon.cc (performOp): Handle it. * guix/store.scm (operation-id)[built-in-builders]: New value. * guix/store.scm (read-arg): Add 'string-list'. (built-in-builders): New procedure. * tests/derivations.scm ("built-in-builders"): New test.
* daemon: Add "builtin:download" derivation builder.Ludovic Courtès2016-11-161-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that 1) the derivation doesn't change when Guix changes; 2) the derivation closure doesn't contain Guix and its dependencies; 3) we don't have to rely on ugly chroot hacks. Adapted from Nix commit 0a2bee307b20411f5b0dda0c662b1f9bb9e0e131. * nix/libstore/build.cc (DerivationGoal::runChild): Add special case for 'isBuiltin(drv)'. Disable chroot when 'isBuiltin(drv)'. * nix/libstore/builtins.cc, nix/libstore/builtins.hh, nix/scripts/download.in, guix/scripts/perform-download.scm: New files. * guix/ui.scm (show-guix-help)[internal?]: Add 'perform-download'. * nix/local.mk (libstore_a_SOURCES): Add builtins.cc. (libstore_headers): Add builtins.hh. (nodist_pkglibexec_SCRIPTS): Add 'scripts/download'. * config-daemon.ac: Emit 'scripts/download'. * Makefile.am (MODULES): Add 'guix/scripts/perform-download.scm'. * tests/derivations.scm ("unknown built-in builder") ("'download' built-in builder") ("'download' built-in builder, invalid hash") ("'download' built-in builder, not found") ("'download' built-in builder, not fixed-output"): New tests. Co-authored-by: Eelco Dolstra <eelco.dolstra@logicblox.com>
* tests: Move HTTP server to (guix tests http).Ludovic Courtès2016-11-161-97/+17
| | | | | | | | | | | | | * tests/lint.scm (%http-server-port, %local-url) (%http-server-socket, http-write, %http-server-lock) (%http-server-ready, http-open, stub-http-server) (call-with-http-server, with-http-server): Move to (guix tests http). Adjust tests for %HTTP-SERVER-SOCKET as a promise and %LOCAL-URL as a parameter. * guix/tests/http.scm: New file. * Makefile.am (dist_noinst_DATA): Add it. (GOBJECTS): Add .go files for all of $(dist_noinst_DATA). (make-go): Depend on $(dist_noinst_DATA).
* guix download: Add '-o' option.Ludovic Courtès2016-11-161-1/+8
| | | | | | | | | | | * guix/scripts/download.scm (download-to-file, download-to-store*): New procedures. (%default-options): Add 'download-proc'. (show-help): Adjust description and document '-o'. (%options): Add '-o'. (guix-download): Remove 'store' variable. Add 'fetch' and define 'path' to as its result. * tests/guix-download.sh: Add test.
* tests: Don't check file-systems in container tests.Andy Patterson2016-11-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | Hello, The containers test was hanging for me, and this patch fixed the problem. -- Andy From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00 2001 From: Andy Patterson <ajpatter@uwaterloo.ca> Date: Sat, 12 Nov 2016 22:10:01 -0500 Subject: [PATCH] tests: Don't check file-systems in container tests. * tests/containers.scm ("call-with-container, mnt namespace"): Don't check file-system in 'call-with-container' call. * tests/containers.scm ("call-with-container, mnt namespace, wrong bindmount"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Merge branch 'core-updates'Ludovic Courtès2016-11-132-55/+37
|\
| * tests: Fix 'fold-packages' for hidden packages.Ludovic Courtès2016-11-081-2/+2
| | | | | | | | | | | | * tests/packages.scm ("fold-packages, hidden package"): Expect GUILE-2.0, not GUILE-2.0/FIXED. This is a followup to c62a31ca802c2b225279c4b0360a4cfc2723ad28.
| * Merge branch 'master' into core-updatesLeo Famulari2016-10-291-1/+2
| |\
| * \ Merge branch 'master' into core-updatesMark H Weaver2016-10-272-3/+6
| |\ \
| * \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-195-15/+104
| |\ \ \
| * \ \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-173-16/+174
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-121-0/+32
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into core-updatesLeo Famulari2016-10-052-0/+42
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'master' into core-updatesLeo Famulari2016-10-031-3/+3
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into core-updatesLudovic Courtès2016-09-307-0/+187
| |\ \ \ \ \ \ \ \
| * | | | | | | | | utils: 'wrap-program' produces only one wrapper file.Ludovic Courtès2016-09-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/build/utils.scm (wrap-program)[wrapper-file-name] [next-wrapper-number, wrapper-target]: Remove. [wrapped-file, already-wrapped?]: New variables. [last-line]: New procedure. Use it to append to PROG when a wrapper already exists. * tests/build-utils.scm ("wrap-program, one input, multiple calls"): Adjust the list of files to delete.
| * | | | | | | | | Merge branch 'master' into core-updatesLudovic Courtès2016-09-025-5/+107
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | tests: Test 'wrap-program' without building a package.Ludovic Courtès2016-09-021-53/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/build-utils.scm (%store): Remove. ("wrap-program, one input, multiple calls"): Rewrite without resorting to packages and derivations.
* | | | | | | | | | | container: Pass a list of <file-system> objects as things to mount.Ludovic Courtès2016-11-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/build/linux-container.scm (mount-file-systems): 'mounts' is now a list of <file-system> objects instead of a list of lists ("specs"). Add call to 'file-system->spec' as the argument to 'mount-file-system'. (run-container, call-with-container): Adjust docstring accordingly. * gnu/system/file-systems.scm (spec->file-system): New procedure. * gnu/system/linux-container.scm (container-script)[script]: Call 'spec->file-system' inside gexp. * guix/scripts/environment.scm (launch-environment/container): Remove call to 'file-system->spec'. * tests/containers.scm ("call-with-container, mnt namespace") ("call-with-container, mnt namespace, wrong bind mount"): Pass a list of <file-system> objects.
* | | | | | | | | | | tests: Adjust 'url-fetch' mocks to TLS changes.Ludovic Courtès2016-11-102-2/+6
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to bc3c41ce36349ed4ec758c70b48a7059e363043a. * tests/cpan.scm ("cpan->guix-package"): Add #:verify-certificate? parameter in 'url-fetch' mock. * tests/cran.scm ("description->package"): Likewise.
* | | | | | | | | | guix hash: Interpret '-' as standard input.Ludovic Courtès2016-10-281-1/+2
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/hash.scm (guix-hash)[file-hash]: Special-case "-". * tests/guix-hash.sh: Add test. * doc/guix.texi (Invoking guix hash): Document it.
* | | | | | | | | tests: Adjust pypi test to recent importer change.Ludovic Courtès2016-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to b5c347ad3d83ee580c111bd14c80b469b0dcb294. * tests/pypi.scm ("pypi->guix-package"): Expect 'propagated-inputs', not 'inputs'. ("pypi->guix-package, wheels"): Likewise.
* | | | | | | | | tests: Skip 'pivot-root' test on Linux > 4.7.5.Ludovic Courtès2016-10-271-1/+4
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/syscalls.scm ("pivot-root"): Skip when 'uname' returns a 'utsname:release' > 4.7.5.
* | | | | | | | 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.