summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* guix graph: Add '--path'.Ludovic Courtès2020-05-11
| | | | | | | | | * guix/scripts/graph.scm (display-path): New procedure. (%options, show-help): Add '--path'. (guix-graph): Handle it. * tests/guix-graph.sh: Add tests. * doc/guix.texi (Invoking guix graph): Document it. (Invoking guix size): Mention it.
* graph: Add 'shortest-path'.Ludovic Courtès2020-05-11
| | | | | | | * guix/graph.scm (shortest-path): New procedure. * tests/graph.scm ("shortest-path, packages + derivations") ("shortest-path, reverse packages") ("shortest-path, references"): New tests.
* graph: reference/referrer node types work with graph traversal.Ludovic Courtès2020-05-11
| | | | | | | | | | | | The graph traversal procedures in (guix graph) assume that nodes can be compared with 'eq?', which was not the case for nodes of %REFERENCE-NODE-TYPE and %REFERRER-NODE-TYPE (strings). * guix/scripts/graph.scm (intern): New procedure. (ensure-store-items, references*) (%reference-node-type, non-derivation-referrers) (%referrer-node-type): Use it on all store items. * tests/graph.scm ("node-transitive-edges, references"): New test.
* tests: Test 'guix show' with multiple packages.Ludovic Courtès2020-05-11
| | | | * tests/guix-package-aliases.sh: Test 'guix show' with multiple packages.
* channels: Add mechanism to patch checkouts of the 'guix channel.Ludovic Courtès2020-05-07
| | | | | | | | | | | | | | | * guix/channels.scm (<patch>): New record type. (apply-patches): New procedure. (latest-channel-instance)[dot-git?]: New procedure. Use 'update-cached-checkout' and 'add-to-store' instead of 'latest-repository-commit'. Call 'apply-patches' when CHANNEL is the 'guix channel. (%patches): New variable. * guix/git.scm (url+commit->name): Make public. * tests/channels.scm ("latest-channel-instances includes channel dependencies") ("latest-channel-instances excludes duplicate channel dependencies"): Mock 'update-cached-checkout' instead of 'latest-repository-commit'. Wrap body in 'with-store' and pass the store to 'latest-channel-instances'.
* Merge branch 'master' into core-updatesMarius Bakke2020-05-05
|\
| * openpgp: Add 'string->openpgp-packet'.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | * guix/openpgp.scm (string->openpgp-packet): New procedure. * tests/openpgp.scm ("verify-openpgp-signature, missing key") ("verify-openpgp-signature, good signatures") ("verify-openpgp-signature, bad signature"): Use it.
| * openpgp: 'lookup-key-by-{id,fingerprint}' return the key first.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | | | | | | | Previously, 'lookup-key-by-{id,fingerprint}' would always return the list of packets where the primary key is first. Thus, the caller would need to use 'find' to actually find the requested key. * guix/openpgp.scm (keyring-insert): Always add KEY to PACKETS. (lookup-key-by-id, lookup-key-by-fingerprint): Change to return the key as the first value. (verify-openpgp-signature): Remove now unneeded call to 'find'. * tests/openpgp.scm ("get-openpgp-keyring"): Adjust accordingly.
| * openpgp: 'verify-openpgp-signature' looks up by fingerprint when possible.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | * guix/openpgp.scm (verify-openpgp-signature): Use 'lookup-key-by-fingerprint' when SIG contains a fingerprint. Honor FINGERPRINT in the 'find' predicate. Upon missing-key, return FINGERPRINT if available. * tests/openpgp.scm ("verify-openpgp-signature, missing key"): Adjust expected value accordingly.
| * openpgp: Add 'lookup-key-by-fingerprint'.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | | | | | | | * guix/openpgp.scm (<openpgp-keyring>)[table]: Rename to... [ids]: ... this. [fingerprints]: New field. (keyring-insert, lookup-key-by-fingerprint): New procedures. (%empty-keyring): Adjust. (get-openpgp-keyring): Manipulate KEYRING instead of its vhash, use 'keyring-insert'. * tests/openpgp.scm ("get-openpgp-keyring"): Test 'lookup-key-by-fingerprint'.
| * openpgp: Store the issuer key id and fingerprint in <openpgp-signature>.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | | | * guix/openpgp.scm (<openpgp-signature>)[issuer, issuer-fingerprint]: New fields. (openpgp-signature-issuer, openpgp-signature-issuer-fingerprint): Remove. (verify-openpgp-signature): Use 'openpgp-signature-issuer-key-id'. (get-signature): Initialize 'issuer' and 'issuer-fingerprint'. * tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Adjust accordingly.
| * openpgp: Decode the issuer-fingerprint signature subpacket.Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/openpgp.scm (SUBPACKET-ISSUER-FINGERPRINT): New variable. (openpgp-signature-issuer-fingerprint): New procedure. (key-id-matches-fingerprint?): New procedure. (get-signature): Look for the 'issuer and 'issuer-fingerprint subpackets. Ensure the issuer key ID matches the fingerprint when both are available. (parse-subpackets): Handle SUBPACKET-ISSUER-FINGERPRINT. * tests/openpgp.scm (%rsa-key-fingerprint) (%dsa-key-fingerprint, %ed25519-key-fingerprint): New variables. * tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Check the result of 'openpgp-signature-issuer-fingerprint'.
| * Add (guix openpgp).Ludovic Courtès2020-05-04
| | | | | | | | | | | | | | | | | | * guix/openpgp.scm, tests/openpgp.scm, tests/civodul.key, tests/dsa.key, tests/ed25519.key, tests/rsa.key, tests/ed25519.sec: New files. * Makefile.am (MODULES): Add guix/openpgp.scm. (SCM_TESTS): Add tests/openpgp.scm. (EXTRA_DIST): Add tests/*.key and tests/ed25519.sec.
* | Merge branch 'master' into core-updatesMarius Bakke2020-04-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/backup.scm gnu/packages/emacs-xyz.scm gnu/packages/guile.scm gnu/packages/lisp.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/web.scm gnu/packages/xorg.scm
| * tests: Remove trailing commas in JSON tests.Ludovic Courtès2020-04-27
| | | | | | | | | | | | | | | | | | | | These commas are rejected by Guile-JSON 3.5.0. * tests/crate.scm (test-foo-dependencies) (test-root-dependencies, test-intermediate-1-dependencies) (test-intermediate-2-dependencies): Remove trailing commas. * tests/gem.scm (test-bar-json): Likewise. * tests/pypi.scm (test-json): Likewise.
| * profiles: Add lowerable <profile> record type.Ludovic Courtès2020-04-26
| | | | | | | | | | * guix/profiles.scm (<profile>): New record type. * tests/profiles.scm ("<profile>"): New test.
* | Merge branch 'master' into core-updatesMarius Bakke2020-04-24
|\|
| * pack: 'guix pack -R' wrapper correctly reports exit code.Ludovic Courtès2020-04-24
| | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/40816>. Reported by Jan (janneke) Nieuwenhuizen <janneke@gnu.org>. * gnu/packages/aux-files/run-in-namespace.c (main): In the 'default' case, check 'WIFEXITED (status)' and exit with the corresponding code in that case. Exit with 255 in other cases. * tests/guix-pack-relocatable.sh: Add test.
* | Merge branch 'master' into core-updatesMarius Bakke2020-04-23
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: etc/news.scm gnu/local.mk gnu/packages/bootloaders.scm gnu/packages/linphone.scm gnu/packages/linux.scm gnu/packages/tls.scm gnu/system.scm
| * tests: Update expected values for package->code.Ricardo Wurmus2020-04-20
| | | | | | | | | | | | Reported by janneke on IRC. * tests/print.scm: Update expected package definitions produced by package->code.
* | gnu: commencement: Memoize packages as a function of the system.Ludovic Courtès2020-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous, things like 'ld-wrapper-boot0' would be memoized with (mlambda () …). However, the definition of 'ld-wrapper-boot0' depends on the result of (%boot0-inputs), which is itself a function of (%current-system). Thus, if one first calls: (parameterize ((%current-system "x86_64-linux")) (ld-wrapper-boot0)) then, in all subsequent calls to 'ld-wrapper-boot0', the value of (%current-system) would be ignored because the result is already memoized. Concretely, 'ld-wrapper-boot0' would always have the dependencies it has on x86_64-linux, even though they are different than those on armhf-linux, say ("bash-mesboot" vs. "bootstrap-binaries"). Fixes <https://bugs.gnu.org/40482>. Reported by Marius Bakke <mbakke@fastmail.com>. * gnu/packages/commencement.scm (define/system-dependent): New macro. (linux-libre-headers-boot0, hurd-core-headers-boot0, ld-wrapper-boot0) (gcc-boot0-intermediate-wrapped, gcc-boot0-wrapped, ld-wrapper-boot3): Define using 'define/system-dependent' instead of 'define' + 'mlambda'. Adjust users so they no longer look like procedure calls. * tests/guix-build.sh: Add test.
* | Merge branch 'master' into core-updatesMarius Bakke2020-04-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm
| * tests: Adjust '--with-commit' test for tags.Ludovic Courtès2020-04-04
| | | | | | | | | | | | | | This is a followup to efa578ecaece67366b4b0e2266de7c2faaa4ae54. * tests/guix-build-branch.sh: Adjust '--with-commit=guile-gcrypt=v0.1.0' test to expect the tag ID rather than the commit ID.
| * store: 'with-store' doesn't close the store upon abort.Ludovic Courtès2020-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/40428>. Reported by Marius Bakke <mbakke@fastmail.com> and 白い熊. Regression introduced with the first uses of 'with-build-handler' in commit 62195b9a8fd6846117c5d7698842748300d13e31 and subsequent. * guix/store.scm (call-with-store): Use 'catch #t' instead of 'dynamic-wind'. This ensures STORE remains open when a non-local exit other than an exception occurs, such as an abort to the build handler prompt. * tests/store.scm ("with-build-handler + with-store"): New test.
| * pack: Adjust test to '--dry-run' changes.Ludovic Courtès2020-03-31
| | | | | | | | | | | | This is a followup to 131f50cdc9dbb7183023f4dae759876a9e700bef. * tests/guix-pack.sh: Use '--no-grafts' in conjunction with '-n' and '-d'.
| * guix package: Do not misdiagnose upgrades when there are propagated inputs.Ludovic Courtès2020-03-31
| | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/35872>. Reported by Andy Tai <atai@atai.org>. * guix/profiles.scm (list=?, manifest-entry=?): New procedures. * guix/scripts/package.scm (transaction-upgrade-entry): In the '=' case, use 'manifest-entry=?' to determine whether it's an upgrade. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades, propagated inputs"): New test.
| * guix package: Add 'transaction-upgrade-entry' test.Ludovic Courtès2020-03-31
| | | | | | | | | | * tests/packages.scm ("transaction-upgrade-entry, zero upgrades, equivalent package"): New test.
| * guix package: 'transaction-upgrade-entry' swallows build requests.Ludovic Courtès2020-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced in 131f50cdc9dbb7183023f4dae759876a9e700bef whereby the install/upgrade message would not be displayed: $ guix upgrade -n 2.1 MB would be downloaded: /gnu/store/…-something-1.2 /gnu/store/…-its-dependency-2.3 This is because we'd directly abort from 'transaction-upgrade-entry' to the build handler of 'build-notifier'. * guix/scripts/package.scm (transaction-upgrade-entry): Call 'string=?' expression in 'with-build-handler'. * tests/packages.scm ("transaction-upgrade-entry, grafts"): New test.
* | Merge branch 'master' into core-updatesMarius Bakke2020-03-30
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm
| * store: Add 'map/accumulate-builds'.Ludovic Courtès2020-03-29
| | | | | | | | | | | | | | | | * guix/store.scm (<unresolved>): New record type. (build-accumulator, map/accumulate-builds, mapm/accumulate-builds): New procedures. * tests/store.scm ("map/accumulate-builds", "mapm/accumulate-builds"): New tests.
* | Merge branch 'master' into core-updatesMarius Bakke2020-03-27
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/icu4c.scm gnu/packages/man.scm gnu/packages/python-xyz.scm guix/scripts/environment.scm guix/scripts/pack.scm guix/scripts/package.scm guix/scripts/pull.scm guix/store.scm
| * tests: Adjust to 'show-manifest-transaction' changes.Ludovic Courtès2020-03-25
| | | | | | | | | | | | | | This is a followup to 3e5ab0a7a9399bb098b9ced46bf3cbf4085c6bab. * tests/ui.scm ("show-manifest-transaction"): Update regexp. * tests/guix-package.sh: Adjust Emacs regexp in --with-source test.
| * Remove workaround for 'time-monotonic' in Guile 2.2.2.Ludovic Courtès2020-03-22
| | | | | | | | | | | | | | | | | | | | | | | | This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb. * build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic' definition. * guix/cache.scm: Likewise. * guix/progress.scm: Likewise. * guix/scripts/substitute.scm: Likewise. * guix/scripts/weather.scm: Likewise. * tests/cache.scm: Likewise.
| * store: Add 'with-build-handler'.Ludovic Courtès2020-03-22
| | | | | | | | | | | | | | * guix/store.scm (current-build-prompt): New variable. (call-with-build-handler, invoke-build-handler): New procedures. (with-build-handler): New macro. * tests/store.scm ("with-build-handler"): New test.
* | Merge branch 'master' into core-updatesMarius Bakke2020-03-21
|\|
| * inferior: '&inferior-exception' includes a stack trace.Ludovic Courtès2020-03-19
| | | | | | | | | | | | | | | | * guix/inferior.scm (port->inferior): Bump protocol to (0 1 1). (&inferior-exception)[stack]: New field. (read-repl-response): Recognize 'exception' form for protocol (0 1 1). * tests/inferior.scm ("&inferior-exception"): Check the value returned by 'inferior-exception-stack'.
* | tests: Fix up reference to 'guile-2.2'.Ludovic Courtès2020-03-17
|/ | | | | | | This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade. * tests/inferior.scm ("inferior-package-search-paths"): Refer to 'guile-3.0' instead of 'guile-2.2'.
* gexp: Add 'with-parameters'.Ludovic Courtès2020-03-12
| | | | | | | | | | * guix/gexp.scm (<parameterized>): New record type. (with-parameters): New macro. (compile-parameterized): New gexp compiler. * tests/gexp.scm ("with-parameters for %current-system") ("with-parameters for %current-target-system") ("with-parameters + file-append"): New tests. * doc/guix.texi (G-Expressions): Document it.
* inferior: Distinguish inferior exceptions.Ludovic Courtès2020-03-12
| | | | | | | | | | | | This avoids ambiguities when looking at a backtrace where the exception was actually thrown by an inferior in a very different context. * guix/inferior.scm (&inferior-exception): New condition type. (read-repl-response): Add optional 'inferior' parameter. Raise '&inferior-exception' instead of rethrowing to KEY when receiving an 'exception' message. (read-inferior-response): Pass INFERIOR to 'read-repl-response'. * tests/inferior.scm ("&inferior-exception"): New test.
* import: pypi: Rewrite to use 'define-json-mapping'.Ludovic Courtès2020-03-12
| | | | | | | | | | * guix/import/pypi.scm (non-empty-string-or-false): New procedure. (<pypi-project>, <project-info>, <distribution>): New record types. (pypi-fetch): Call 'json->pypi-project'. (latest-source-release, latest-wheel-release): Use the new record accessors instead of 'assoc-ref*'. (pypi->guix-package, latest-release): Likewise. * tests/pypi.scm (test-json): Add mandatory fields.
* gexp: Default to current target.Mathieu Othacehe2020-03-08
| | | | | | | | | | | * guix/gexp.scm (lower-object): Set target argument to 'current by default and look for the current target system at bind time if needed, (gexp->file): ditto, (gexp->script): ditto, (lower-gexp): make sure lowered extensions are not cross-compiled. * tests/gexp.scm: Add cross-compilation test-cases for gexp->script and gexp->file with a target passed explicitely and with a default target.
* guix build: Allow non-package objects in manifest.Ludovic Courtès2020-03-05
| | | | | | | * guix/scripts/build.scm (options->things-to-build)[manifest->packages]: Remove. Inline map of 'manifest-entry-item'. * tests/guix-build.sh: Add test for "guix build -m" with non-package object.
* swh: Adjust 'origin' test.Ludovic Courtès2020-02-27
| | | | | | | This is a followup to 3d2f29382de2d0ee852745cc002dfe2b5d22e1c2. * tests/swh.scm (%origin): Remove "id". ("lookup-origin"): Remove use of 'origin-id'.
* ui: (size->number "1.M") is correctly parsed.Ludovic Courtès2020-02-23
| | | | | | | Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * guix/ui.scm (size->number)[unit-pos]: Add #\. to CHAR-SET:DIGIT. * tests/ui.scm ("size->number, 1.M"): New test.
* guix build: Add '--manifest' option.Marius Bakke2020-02-14
| | | | | | | | | * guix/scripts/build.scm (show-help): Document --manifest argument. (options->things-to-build): When given a manifest, evaluate all the entries. * tests/guix-build.sh: Add test for --manifest. * doc/guix.texi (Additional Build Options): Mention --manifest. * etc/completion/bash/guix: Complete file name if 'guix build' argument is -m.
* syscalls: Re-enable 'pivot-root' test.Ludovic Courtès2020-02-11
| | | | | | | | | | Fixes <https://bugs.gnu.org/25476>. Reported by Paul Garlick <pgarlick@tourbillion-technology.com>. * tests/syscalls.scm ("pivot-root"): Skip only when PERFORM-CONTAINER-TESTS? is true. Rewrite to use a socket pair instead of a pipe. Synchronize parent and child so that the parent can initialize the child's UID and GID mappings before continuing.
* import: gem: Deal with unavailable licensing info.Ludovic Courtès2020-02-05
| | | | | | | | | | Fixes <https://bugs.gnu.org/39404>. Reported by Seth <lee.seth@tuta.io>. * guix/import/gem.scm (<gem>)[licenses]: Adjust for non-vector licenses. * tests/gem.scm (test-bar-json): Change "licenses" to 'null'. ("gem-recursive-import"): Adjust accordingly.
* tests: Adjust reverse-bag graph test to recent OCaml changes.Ludovic Courtès2020-02-05
| | | | | | | | | | This is a followup to 87858bc526a9d577760f55d05a51cb56630f845b. Partly fixes <https://bugs.gnu.org/39374>. Reported by Ellen Papsch <ellen.papsch@wine-logistix.de>. * tests/graph.scm ("reverse bag DAG"): Adjust test to latest OCaml changes.
* gnu: Add earlyoom-service-type.Maxim Cournoyer2020-01-31
| | | | | | | | * gnu/services/linux.scm: New file. * tests/services/linux.scm: Add test. * Makefile.am (SCM_TESTS): Register test. * doc/guix.texi (Linux Services): Add a new section and document the new service and its configuration.
* guix system: Add workaround in test for Guile 3.0.0.Ludovic Courtès2020-01-17
| | | | | * tests/guix-system.sh: For the 'GRUB-config' test, add workaround for the reported line number in Guile 3.0.0.