summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2016-03-01grafts: Graft recursively....Fixes <http://bugs.gnu.org/22139>. * guix/grafts.scm (graft-derivation): Rename to... (graft-derivation/shallow): ... this. (graft-origin-file-name, item->deriver, non-self-references) (cumulative-grafts, graft-derivation): New procedures * tests/grafts.scm ("graft-derivation, grafted item is a direct dependency"): Clarify title. Use 'grafted' instead of 'graft' to refer to the grafted derivation. ("graft-derivation, grafted item is an indirect dependency") ("graft-derivation, no dependencies on grafted output"): New tests. * guix/packages.scm (input-graft): Change to take a package instead of an input. (input-cross-graft): Likewise. (fold-bag-dependencies): New procedure. (bag-grafts): Rewrite in terms of 'fold-bag-dependencies'. * tests/packages.scm ("package-derivation, indirect grafts"): Comment out. * doc/guix.texi (Security Updates): Mention run-time dependencies and recursive grafting. Ludovic Courtès
2016-02-27grafts: Consider all the outputs in the graft mapping....Before that, outputs of a derivation could be left referring to the ungrafted version of the derivation. * guix/grafts.scm (graft-derivation)[outputs]: Change to a list of name/file pairs. * guix/grafts.scm (graft-derivation)[build]: Add 'old-outputs' variable and use it when computing 'mapping'. Use 'mapping' directly. * tests/grafts.scm ("graft-derivation, multiple outputs"): New test. Ludovic Courtès
2016-02-26store: 'path-info-deriver' is #f when there is no deriver....* guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test. Ludovic Courtès
2016-02-25publish: Do not publish nars for invalid store items....Before that, /nar requests could succeed if the requested store item exists but is invalid (although such requests were unlikely because the corresponding narinfo request would have failed.) * guix/scripts/publish.scm (render-nar): Add 'store' parameter. Use 'valid-path?' instead of 'file-exists?'. (make-request-handler): Adjust 'render-nar' call accordingly. * tests/publish.scm ("/nar/invalid"): New test. Ludovic Courtès
2016-02-22grafts: 'name' parameter of 'graft-derivation' is now optional....* guix/grafts.scm (graft-derivation): Name 'name' a keyword parameter. * guix/packages.scm (package-derivation, package-cross-derivation): Adjust accordingly. * tests/grafts.scm ("graft-derivation"): Likewise. * tests/packages.scm ("package-derivation, indirect grafts"): Likewise. Ludovic Courtès
2016-02-22derivations: Move grafts to (guix grafts)....* guix/derivations.scm (<graft>, graft-derivation, %graft?) (set-grafting): Move to... * guix/grafts.scm: ... here. New file. * guix/gexp.scm, guix/packages.scm, tests/packages.scm, guix/scripts/build.scm: Use it. * Makefile.am (MODULES): Add it. (SCM_TESTS): Add tests/grafts.scm. * tests/derivations.scm ("graft-derivation"): Move to... * tests/grafts.scm: ... here. New file. Ludovic Courtès
2016-02-12scripts: environment: Build environments as profiles....Fixes <http://bugs.gnu.org/19816>. * guix/scripts/environment.scm (evaluate-input-search-paths) (build-inputs): Delete. (evaluate-profile-search-paths, strip-input-name) (package-or-package+output?, package-environment-inputs) (build-environment, inputs->profile-derivations): New procedures. (create-environment, show-search-paths, launch-environment) (launch-environment/container): Replace 'inputs' argument with 'profile' argument. (package+propagated-inputs): Strip off names off of input tuples. (options/resolve-packages): Handle input tuples that specify an output in expressions. (guix-environment): Convert inputs into a profile to use in the environment. Remove non-package inputs such as origins from environment inputs. * doc/guix.texi ("invoking guix environment"): Document package+output tuples for --expression option. * tests/guix-environment.sh: Update tests. * tests/guix-environment-container.sh: Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org> David Thompson
2016-02-12store: Add monadic access to '%current-system'....* guix/store.scm (current-system, set-current-system): New procedures. * tests/store.scm ("current-system"): New test. Ludovic Courtès
2016-02-01guix build: Add '--with-input'....* guix/scripts/build.scm (transform-package-inputs): New procedure. (%transformations): Add it. (%transformation-options, show-transformation-options-help): Add --with-input. * tests/scripts-build.scm ("options->transformation, with-input"): ("options->transformation, with-input, no matches"): New tests. * tests/guix-build.sh: Add tests. * doc/guix.texi (Package Transformation Options): Document it. Ludovic Courtès
2016-02-01guix build: Transformations operate on single objects....* guix/scripts/build.scm (transform-package-source): Return a procedure that expects a single object rather than a list of packages. (options->transformation): Rewrite to precompute the list of applicable transformations and to return a procedure that expects a single object rather than a list of objects. (options->derivations): Adjust accordingly. * tests/scripts-build.scm: New file. * Makefile.am (SCM_TESTS): Add it. Ludovic Courtès
2016-01-29services: Rename 'dmd' services to 'shepherd'....* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service) (dmd-service-type, <dmd-service>, dmd-service, dmd-service?) (make-dmd-service, dmd-service-documentation, dmd-service-provision) (dmd-service-requirement, dmd-service-respawn, dmd-service-start) (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules) (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file) (dmd-service-back-edges): Rename to... (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type) (<shepherd-service>, shepherd-service, shepherd-service?) (make-shepherd-service, shepherd-service-documentation) (shepherd-service-provision, shepherd-service-requirement) (shepherd-service-respawn, shepherd-service-start) (shepherd-service-stop, shepherd-service-auto-start?) (shepherd-service-modules, shepherd-service-imported-modules) (shepherd-service-file-name, shepherd-service-file) (shepherd-service-back-edges): ...this * gnu/services.scm: Adjust comments. * gnu/services/avahi.scm (avahi-dmd-service): Rename to... (avahi-shepherd-service): ... this. * gnu/services/base.scm (%root-file-system-dmd-service) (file-system->dmd-service-name, mapped-device->dmd-service-name) (dependency->dmd-service-name, file-system-dmd-service) (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service) (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to... (%root-file-system-shepherd-service) (file-system->shepherd-service-name, mapped-device->shepherd-service-name) (dependency->shepherd-service-name, file-system-shepherd-service) (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service) (guix-publish-shepherd-service, udev-shepherd-service) (gpm-shepherd-service): ... this. * gnu/services/databases.scm (postgresql-dmd-service): Rename to... (postgresql-shepherd-service): ... this. * gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service): Rename to... (upower-shepherd-service, elogind-shepherd-service): ... this. * gnu/services/dbus.scm (dbus-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/lirc.scm (lirc-dmd-service): Rename to... (lirc-shepherd-service): ... this. * gnu/services/mail.scm (dovecot-dmd-service): Rename to... (dovecot-shepherd-service): ... this. * gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service) (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/ssh.scm (lsh-dmd-service): Rename to... (lsh-shepherd-service): ... this. * gnu/services/web.scm (nginx-dmd-service): Rename to... (nginx-shepherd-service): ... this. * gnu/services/xorg.scm (slim-dmd-service): Rename to... (slim-shepherd-service): ... this. * gnu/system.scm (essential-services): Use '%shepherd-root-service'. * gnu/system/install.scm (cow-store-service-type): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type) (export-dmd-graph): Likewise. * tests/guix-system.sh: Likewise. * tests/services.scm ("dmd-service-back-edges"): Rename to... ("shepherd-service-back-edges"): Adjust accordingly. * doc/guix.texi: Likewise. * doc/images/service-graph.dot: Use 'shepherd' service name. Alex Kost
2016-01-29Rename (gnu services dmd) to (gnu services shepherd)....* gnu/services/dmd.scm: Rename to... * gnu/services/shepherd.scm: ... this. * gnu/system.scm: Use it. * gnu/system/install.scm: Likewise. * gnu/services/xorg.scm: Likewise. * gnu/services/web.scm: Likewise. * gnu/services/ssh.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/services/mail.scm: Likewise. * gnu/services/lirc.scm: Likewise. * gnu/services/desktop.scm: Likewise. * gnu/services/dbus.scm: Likewise. * gnu/services/databases.scm: Likewise. * gnu/services/base.scm: Likewise. * gnu/services/avahi.scm: Likewise. * guix/scripts/system.scm: Likewise. * tests/services.scm: Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Shepherd Services): Adjust accordingly. * gnu-system.am (GNU_SYSTEM_MODULES): Likewise. * po/guix/POTFILES.in: Likewise. Alex Kost
2016-01-28packages: Use '@' in package record printers....* guix/packages.scm <package>: Use '@' in record printer. * guix/import/cabal.scm <cabal-package>: Likewise * guix/import/elpa.scm <elpa-package>: Likewise. * tests/packages.scm: Adapt to it. Mathieu Lirzin
2016-01-28tests: Use 'dummy-origin' for lint tests when possible....* guix/tests/lint.scm ("patches: file names", "patches: not found"): Use 'dummy-origin'. 'sha256' field was wrongly set to a string instead of a bytevector. Mathieu Lirzin
2016-01-24Merge branch 'master' into core-updatesMark H Weaver
2016-01-22tests: Prevent 'http_proxy' from breaking Web server tests....* tests/lint.scm: Add call to 'unsetenv' to remove 'http_proxy'. * tests/publish.scm: Likewise. Ludovic Courtès
2016-01-22system: grub: Search root device by label or UUID if possible....Fixes <http://bugs.gnu.org/22281>. Reported by Christopher Allan Webber <cwebber@dustycloud.org>. * gnu/system/grub.scm (eye-candy): Add 'root-fs' parameter. Replace 'search --file' command in the output with whatever 'grub-root-search' returns. (grub-root-search): New procedure. (grub-configuration-file): Add 'store-fs' parameter. Use 'grub-root-search' instead of hard-coded 'search --file' commands. * gnu/system.scm (store-file-system, operating-system-store-file-system): New procedures. (operating-system-grub.cfg): Use it, and adjust call to 'grub-configuration-file'. * tests/system.scm: New file. * Makefile.am (SCM_TESTS): Add it. Ludovic Courtès
2016-01-20tests: Move beatify-description tests to import-tests....Fixes <http://bugs.gnu.org/22391>. * tests/cran.scm (beautify-description: use double spacing, beautify-description: transform fragment into sentence). Move from here ... * tests/import-utils.scm: ... to here. New file. * Makefile.am (SCM_TESTS): Add import-utils. Ben Woodcroft
2016-01-20import: gem: Beautify only the description, not the synopsis....* guix/import/gem.scm (make-gem-sexp): Add synopsis argument. (gem->guix-package): Pass unbeautified synopsis to make-gem-sexp. * tests/gem.scm: Adapt it. Ben Woodcroft
2016-01-20import: Add Bioconductor importer and updater....* guix/import/cran.scm (%bioconductor-updater, latest-bioconductor-release, bioconductor-package?): New procedures. (cran->guix-package): Support repositories other than CRAN. (%bioconductor-url, %bioconductor-svn-url): New variables. (description->package): Update signature to distinguish between packages from different repositories. (latest-release): Rename procedure ... (latest-cran-release): ... to this. (cran-package?): Do not assume all R packages are available on CRAN. * tests/cran.scm: Update tests. * guix/scripts/import/cran.scm: Add "--archive" option and default to CRAN. * guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater". * doc/guix.texi: Document Bioconductor importer and updater. Ricardo Wurmus
2016-01-19derivations: Add test in keep-going mode....* tests/derivations.scm ("derivation fails but keep going"): New test. Ludovic Courtès
2016-01-19Merge branch 'master' into core-updatesMark H Weaver
2016-01-18derivations: Add test for #:leaked-env-vars....* tests/derivations.scm ("derivation #:leaked-env-vars"): New test. Ludovic Courtès
2016-01-13tests: Use sed instead of grep as a package with no dependencies....* tests/graph.scm ("node-edges"): Choose SED instead of GREP as the example. Ludovic Courtès
2016-01-06utils: Add 'ensure-keyword-arguments'....* guix/utils.scm (delkw, ensure-keyword-arguments): New procedures. * tests/utils.scm ("ensure-keyword-arguments"): New test. Ludovic Courtès
2016-01-05guix package: Allow multiple '--search' flags....* guix/scripts/package.scm (find-packages-by-description): Change 'rx' parameter to 'regexps'. [matches-all?, matches-one?]: New procedures. Use them. (process-query): Collect regexps from all 'search' queries, and pass them to 'find-packages-by-description'. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Document it. Ludovic Courtès
2016-01-02graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile....Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile). Ludovic Courtès
2016-01-02graph: %BAG-EMERGED-NODE-TYPE filters out origins....Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da. Ludovic Courtès
2015-12-30guix build: Augment %PATCH-PATH when -L is passed....Fixes <http://bugs.gnu.org/22259>. Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>. * guix/scripts/build.scm (%standard-build-options) <-L>: Augment %PATCH-PATH. * tests/guix-package.sh: Add test. Ludovic Courtès
2015-12-20profiles: Honor search paths of propagated inputs....Fixes <http://bugs.gnu.org/22073>. Reported by Federico Beffa <beffa@ieee.org>. * guix/profiles.scm (package->manifest-entry): Use 'package-transitive-native-search-paths' when computing 'search-paths' field. * tests/profiles.scm ("package->manifest-entry, search paths"): New test. Ludovic Courtès
2015-12-20packages: Add 'package-transitive-native-search-paths'....* guix/packages.scm (package-transitive-native-search-paths): New procedure. * tests/packages.scm ("package-transitive-native-search-paths"): New test. Ludovic Courtès
2015-12-14gexp: 'local-file' resolves relative file names....* guix/gexp.scm (<local-file>): Rename constructor to '%%local-file'. Add 'absolute' field. (%local-file, extract-directory, absolute-file-name): New procedures. (current-source-directory): New macro. (local-file): Adjust call to '%local-file'. (local-file-absolute-file-name): New procedure. (local-file-compiler): Force the 'absolute' field. * tests/guix-system.sh: Test whether 'local-file' canonicalization works. * doc/guix.texi (G-Expressions): Adjust. Ludovic Courtès
2015-12-13graph: Add synthetic test....* tests/graph.scm ("node-transitive-edges, no duplicates"): New test. Ludovic Courtès
2015-12-11import: cran: Parse DESCRIPTION instead of HTML....* guix/import/cran.scm (description->alist, listify, beautify-description, description->package): New procedures. (table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove proceduces. (latest-release): Use parsed DESCRIPTION instead of SXML. * tests/cran.scm: Rewrite to match importer. Ricardo Wurmus
2015-12-09derivations: Determine what's built in 'check' mode....* guix/derivations.scm (substitution-oracle): Add #:mode parameter and honor it. (derivation-prerequisites-to-build): Likewise. [derivation-built?]: Take it into account. * guix/ui.scm (show-what-to-build): Add #:mode parameter. Pass it to 'substitute-oracle' and 'derivations-prerequisites-to-build'. * tests/derivations.scm ("derivation-prerequisites-to-build in 'check' mode"): New test. Ludovic Courtès
2015-12-08store: Allow clients to request multiple builds....* guix/store.scm (set-build-options): Add #:rounds parameter and honor it. * tests/store.scm ("build multiple times"): New test. Ludovic Courtès
2015-12-07gnu-maintenance: Add tests for 'release-file?'....* tests/gnu-maintenance.scm: New file. * Makefile.am (SCM_TESTS): Add it. * guix/gnu-maintenance.scm (release-file?): Export. Ludovic Courtès
2015-12-03store: Add mode parameter to 'build-paths'....* guix/store.scm (%protocol-version): Set minor to 15. (build-mode): New enumerate type. (build-things): Add 'mode' parameter; pass it to the RPC. * tests/store.scm ("build-things, check mode"): New check. Ludovic Courtès
2015-11-28lint: Do not report already-patched vulnerabilities....* guix/scripts/lint.scm (patch-file-name): New procedure. (check-vulnerabilities): Use it to filter out patched vulnerabilities. * tests/lint.scm ("cve: one patched vulnerability"): New test. Ludovic Courtès
2015-11-26lint: Add "cve" checker....Fixes <http://bugs.gnu.org/21289>. * guix/scripts/lint.scm (package-name->cpe-name, package-vulnerabilities) (check-vulnerabilities): New procedures. * guix/scripts/lint.scm (%checkers): Add "cve" checker. * tests/lint.scm ("cve", "cve: one vulnerability"): New tests. * doc/guix.texi (Invoking guix lint): Mention it. Ludovic Courtès
2015-11-26Add (guix cve)....* guix/cve.scm, tests/cve-sample.xml, tests/cve.scm: New files. * Makefile.am (MODULES): Add guix/cve.scm. (SCM_TESTS): Add tests/cve.scm. (EXTRA_DIST): Add tests/cve-sample.scm. Ludovic Courtès
2015-11-26import: hackage: Add new tests....* tests/hackage.scm (eval-test-with-cabal): Add optional argument. (test-cabal-3): New variable and test. (test-read-cabal-1): Exercise more parsing variants. Federico Beffa
2015-11-26utils: Add 'canonical-newline-port'....* guix/utils.scm (canonical-newline-port): New procedure. * tests/utils.scm ("canonical-newline-port"): New test. Federico Beffa
2015-11-24services: dmd: Error out upon unmet dmd requirements....* gnu/services/dmd.scm (assert-no-duplicates): Rename to... (assert-valid-graph): ... this. [provisions]: New variable. [assert-satisfied-requirements]: New procedure. Use it. * tests/guix-system.sh: Add test with unmet dmd requirements. Ludovic Courtès
2015-11-23graph: Add '%bag-with-origins-node-type'....* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès
2015-11-23guix download: Fail when more than one URL is passed....* guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test. Ludovic Courtès
2015-11-21environment: Correctly handle abnormal exits....Fixes <http://bugs.gnu.org/21958>. * guix/scripts/environment.scm (status->exit-code): New procedure. (exit/status, primitive-exit/status): Use it. * tests/guix-environment-container.sh: Add test. Ludovic Courtès
2015-11-21tests: Skip 'guix-container-environment.sh' when support is missing....Fixes <http://bugs.gnu.org/21410>. Reported by Alex Vong <alexvong1995@gmail.com>. * tests/guix-environment-container.sh: Exit with 77 when '((@@ (guix scripts environment) assert-container-features))' fails. Ludovic Courtès
2015-11-21graph: Add procedures to query a node's edges....* guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests. Ludovic Courtès
2015-11-21Add (guix graph)....* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it. Ludovic Courtès