summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2016-11-16syscalls: Add bindings for SIOCGIFNETMASK and SIOCSIFNETMASK....* 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. Ludovic Courtès
2016-11-16daemon: Add 'built-in-builders' RPC....* 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. Ludovic Courtès
2016-11-16daemon: Add "builtin:download" derivation builder....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> Ludovic Courtès
2016-11-16tests: Move HTTP server to (guix tests http)....* 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). Ludovic Courtès
2016-11-16guix download: Add '-o' option....* 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. Ludovic Courtès
2016-11-13tests: Don't check file-systems in container tests....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> Andy Patterson
2016-11-13Merge branch 'core-updates'Ludovic Courtès
2016-11-10container: Pass a list of <file-system> objects as things to mount....* 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. Ludovic Courtès
2016-11-10tests: Adjust 'url-fetch' mocks to TLS changes....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. Ludovic Courtès
2016-11-08tests: Fix 'fold-packages' for hidden packages....* tests/packages.scm ("fold-packages, hidden package"): Expect GUILE-2.0, not GUILE-2.0/FIXED. This is a followup to c62a31ca802c2b225279c4b0360a4cfc2723ad28. Ludovic Courtès
2016-10-29Merge branch 'master' into core-updatesLeo Famulari
2016-10-28guix hash: Interpret '-' as standard input....* guix/scripts/hash.scm (guix-hash)[file-hash]: Special-case "-". * tests/guix-hash.sh: Add test. * doc/guix.texi (Invoking guix hash): Document it. Ludovic Courtès
2016-10-27Merge branch 'master' into core-updatesMark H Weaver
2016-10-27tests: Adjust pypi test to recent importer change....This is a followup to b5c347ad3d83ee580c111bd14c80b469b0dcb294. * tests/pypi.scm ("pypi->guix-package"): Expect 'propagated-inputs', not 'inputs'. ("pypi->guix-package, wheels"): Likewise. Ludovic Courtès
2016-10-27tests: Skip 'pivot-root' test on Linux > 4.7.5....* tests/syscalls.scm ("pivot-root"): Skip when 'uname' returns a 'utsname:release' > 4.7.5. Ludovic Courtès
2016-10-19Merge branch 'master' into core-updatesMark H Weaver
2016-10-19tests: Make sure child process of 'pivot-root' test exits....* tests/syscalls.scm ("pivot-root"): Use 'test-equal'. Wrap child body in 'dynamic-wind'. Ludovic Courtès
2016-10-19tests: Fix typo in 'with-graft' transformation test....This is a followup to 645b9df858683dc05ffa04c9eb2fdc45ccef4a65. * tests/scripts-build.scm ("options->transformation, with-graft"): Use 'with-graft', not 'with-input'. Ludovic Courtès
2016-10-19lint: Suggest @code instead of quotes....* 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. Ludovic Courtès
2016-10-19container: Allow 'container-excursion' to the same namespaces....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. Ludovic Courtès
2016-10-17grafts: Apply the right grafts in the presence of multiple outputs....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. Ludovic Courtès
2016-10-17guix build: Add '--with-graft'....* 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. Ludovic Courtès
2016-10-17Merge branch 'master' into core-updatesMark H Weaver
2016-10-15graph: Add '%referrer-node-type'....* 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. Ludovic Courtès
2016-10-14grafts: 'graft-derivation' does now introduce grafts that shadow other grafts....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. Ludovic Courtès
2016-10-14packages: 'package-grafts' applies grafts on replacement....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. Ludovic Courtès
2016-10-12Merge branch 'master' into core-updatesMark H Weaver
2016-10-07utils: Support defaults in substitute-keyword-arguments....* 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. Eric Bavier
2016-10-07utils: Fix default-keyword-arguments....* guix/utils.scm (default-keyword-arguments): Properly test for present keywords. * tests/utils.scm (default-keyword-arguments): New test. Eric Bavier
2016-10-05Merge branch 'master' into core-updatesLeo Famulari
2016-10-03lint: 'cve' checker reports the replacement's vulnerabilities....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. Ludovic Courtès
2016-10-03grafts: Allow the replacement to have a different name....* 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. Ludovic Courtès
2016-10-03Merge branch 'master' into core-updatesLeo Famulari
2016-10-03tests: Adjust 'guix build -S' test for source-less packages....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. Ludovic Courtès
2016-09-30Merge branch 'master' into core-updatesLudovic Courtès
2016-09-28import: utils: Refactor license->symbol....* guix/import/utils.scm (license->symbol): Work for all licenses. * tests/import-utils.scm (license->symbol): Add test. David Craven
2016-09-09gexp: Add 'file-append'....* 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'. Ludovic Courtès
2016-09-07utils: 'wrap-program' produces only one wrapper file....* 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. Ludovic Courtès
2016-09-07guix hash: Add --exclude-vcs option....* 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> Jan Nieuwenhuizen
2016-09-06packages: Add 'package-superseded' and associated support....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. Ludovic Courtès
2016-09-06guix package: Build up the transaction incrementally....* 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. Ludovic Courtès
2016-09-06profiles: Add manifest-transaction helper procedures....* guix/profiles.scm (manifest-transaction-install-entry) (manifest-transaction-remove-pattern) (manifest-transaction-null?): New procedures. * tests/profiles.scm ("manifest-transaction-null?"): New test. Ludovic Courtès
2016-09-05Add (guix modules)....* 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'. Ludovic Courtès
2016-09-02Merge branch 'master' into core-updatesLudovic Courtès
2016-09-02tests: Test 'wrap-program' without building a package....* tests/build-utils.scm (%store): Remove. ("wrap-program, one input, multiple calls"): Rewrite without resorting to packages and derivations. Ludovic Courtès
2016-09-01packages: Add 'package-input-rewriting'....* 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. Ludovic Courtès
2016-09-01tests: hackage: Fix mock urls....Followup to 18f747350437136b203ef6400176d1fb07b131ea. * tests/hackage.scm (hackage->guix-package): Use 'https' in mock urls. Efraim Flashner
2016-08-31tests: cpan: Fix mock urls....Followup to 7a62263ee5. * tests/cpan.scm (cpan->guix-package): Use "https" in mock urls. Eric Bavier
2016-08-31services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'....* 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. Ludovic Courtès
2016-08-31guix system: Do not unload services depended on....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. Ludovic Courtès