aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* store: 'open-connection' no longer raises '&nar-error' for protocol errors.Ludovic Courtès2016-12-08
| | | | | | * guix/store.scm (open-connection): Guard body against 'nar-error?' and re-raise as '&nix-connection-error'. * tests/store.scm ("connection handshake error"): New test.
* Merge branch 'master' into python-build-systemLeo Famulari2016-11-25
|\
| * syscalls: Add 'add-network-route/gateway' and 'delete-network-route'.Ludovic Courtès2016-11-21
| | | | | | | | | | | | | | | | | | * guix/build/syscalls.scm (SIOCADDRT, SIOCDELRT): New variables. (%rtentry): New C struct. (RTF_UP, RTF_GATEWAY, %sockaddr-any): New variables. (add-network-route/gateway, delete-network-route): New procedures. * tests/syscalls.scm ("add-network-route/gateway") ("delete-network-route"): New tests.
| * lint: Add 'mirror-url' checker.Ludovic Courtès2016-11-19
| | | | | | | | | | | | | | | | | | | | * guix/scripts/lint.scm (origin-uris): New procedure. (check-source): Use it. (check-mirror-url): New procedure. (%checkers): Add 'mirror-url' checker. * tests/lint.scm ("mirror-url") ("mirror-url: one suggestion"): New tests. * doc/guix.texi (Invoking guix lint): Document it.
| * store: Add 'references*'.Ludovic Courtès2016-11-19
| | | | | | | | | | | | | | | | | | | | | | * guix/store.scm (references*): New procedure. * guix/profiles.scm (manifest-lookup-package)[references*]: Remove. * guix/scripts/system.scm (references*): Remove. * tests/gexp.scm ("gexp->file", "gexp->file + file-append") ("gexp->derivation", "gexp->derivation, cross-compilation") ("gexp->derivation, ungexp + ungexp-native") ("scheme-file", "text-file*", "mixed-text-file"): Remove 'references*' instead of (store-lift references).
| * syscalls: Add bindings for SIOCGIFNETMASK and SIOCSIFNETMASK.Ludovic Courtès2016-11-16
| | | | | | | | | | | | | | | | | | * 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-16
| | | | | | | | | | | | | | | | | | | | | | | | * 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-16
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | guix: Add lint-checker for packages which should be no inputs at all.Hartmut Goebel2016-11-15
|/ | | | | | | | | | | | | | | | | Also refactor some common code into a new function. Examples for these pacakges are python(2)-setuptools and python(2)-pip, which are installed together with python itself. * guix/scripts/lint.scm (warn-if-package-has-input): New procedure. (check-inputs-should-be-native package): Use it; rename and clean-up variables. (check-inputs-should-not-be-an-input-at-all): New procedure. (%checkers) Add it. * doc/guix.texi (Python Modules): Document it. * tests/lint.scm: ("inputs: python-setuptools should not be an input at all (input)", "inputs: python-setuptools should not be an input at all (native-input)" "inputs: python-setuptools should not be an input at all (propagated-input)"): Add tests.
* tests: Don't check file-systems in container tests.Andy Patterson2016-11-13
| | | | | | | | | | | | | | | | | | | | | | 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-13
|\
| * tests: Fix 'fold-packages' for hidden packages.Ludovic Courtès2016-11-08
| | | | | | | | | | | | * 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-29
| |\
| * \ Merge branch 'master' into core-updatesMark H Weaver2016-10-27
| |\ \
| * \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-19
| |\ \ \
| * \ \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-17
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into core-updatesMark H Weaver2016-10-12
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into core-updatesLeo Famulari2016-10-05
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'master' into core-updatesLeo Famulari2016-10-03
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into core-updatesLudovic Courtès2016-09-30
| |\ \ \ \ \ \ \ \
| * | | | | | | | | utils: 'wrap-program' produces only one wrapper file.Ludovic Courtès2016-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-02
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | tests: Test 'wrap-program' without building a package.Ludovic Courtès2016-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-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-10
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-28
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-27
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-07
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | * 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-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-03
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-03
| |_|/ |/| | | | | | | | | | | | | | | | | 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-28
| | | | | | | | | | | | | | | * 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-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-06
| | | | | | | | | | | | | | | | | | | | | * guix/profiles.scm (manifest-transaction-install-entry) (manifest-transaction-remove-pattern) (manifest-transaction-null?): New procedures. * tests/profiles.scm ("manifest-transaction-null?"): New test.