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