aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* Merge branch 'master' into core-updatesMark H Weaver2018-02-16
|\
| * import: utils: 'alist->package' allows false license.Ludovic Courtès2018-02-16
| | | | | | | | | | | | | | | | | | | | Reported by <pkill9@runbox.com>. Fixes <https://bugs.gnu.org/30470>. * guix/import/utils.scm (alist->package): Check whether 'license' is false and set the 'license' field to #f in this case. * tests/import-utils.scm ("alist->package with false license"): New test.
* | Merge branch 'master' into core-updatesMarius Bakke2018-02-01
|\|
| * derivations: Adjust tests for Stow environments.Ludovic Courtès2018-01-30
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/30250>. Reported by Jorge <jorge+list@disroot.org>. * tests/derivations.scm ("add-to-store, flat") ("add-to-store, recursive"): Call 'readlink*'.
* | Merge branch 'master' into core-updatesMark H Weaver2018-01-23
|\|
| * publish: Restore gzip compression in cache-less mode.Ludovic Courtès2018-01-22
| | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/30184>. Regression introduced in 297e04d66010ada31a40f40143d81bf6b62affcc. Reported by Christopher Baines <mail@cbaines.net>. * guix/scripts/publish.scm (nar-response-port): Add 'compression' parameter and honor it. (http-write): Get 'x-nar-compression' from the initial RESPONSE.
| * services: Missing services are automatically instantiated.Ludovic Courtès2018-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies OS configuration: users no longer need to be aware of what a given service depends on. See the discussion at <https://lists.gnu.org/archive/html/guix-devel/2018-01/msg00114.html>. * gnu/services.scm (missing-target-error): New procedure. (service-back-edges): Use it. (instantiate-missing-services): New procedure. * gnu/system.scm (operating-system-services): Call 'instantiate-missing-services'. * tests/services.scm ("instantiate-missing-services") ("instantiate-missing-services, no default value"): New tests. * gnu/services/version-control.scm (cgit-service-type)[extensions]: Add FCGIWRAP-SERVICE-TYPE. * gnu/tests/version-control.scm (%cgit-os): Remove NGINX-SERVICE-TYPE and FCGIWRAP-SERVICE-TYPE instances. * doc/guix.texi (Log Rotation): Remove 'mcron-service-type' in example. (Miscellaneous Services): Remove 'nginx-service-type' and 'fcgiwrap-service-type' in Cgit example.
* | Merge branch 'master' into core-updatesLeo Famulari2018-01-11
|\|
| * publish: Publish build logs.Ludovic Courtès2018-01-07
| | | | | | | | | | | | | | | | * guix/scripts/publish.scm (render-log-file): New procedure. (make-request-handler): Add "log" case. * tests/publish.scm ("/log/NAME") ("/log/NAME not found"): New tests. * doc/guix.texi (Invoking guix publish): Document /log URLs.
| * daemon: Add gzip log compression.Ludovic Courtès2018-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_LOG_COMPRESSION): New macro. (options): Mark "disable-log-compression" as hidden and add "log-compression". (parse_opt): Handle GUIX_OPT_LOG_COMPRESSION. * nix/libstore/build.cc (DerivationGoal): Add 'gzLogFile'. (openLogFile): Initialize it when 'logCompression' is COMPRESSION_GZIP. (closeLogFile, handleChildOutput): Honor 'gzLogFile'. * nix/libstore/globals.hh (Settings)[compressLog]: Remove. [logCompression]: New field. (CompressionType): New enum. * nix/libstore/globals.cc (Settings::Settings): Initialize it. (update): Remove '_get' call for 'compressLog'. * nix/local.mk (guix_daemon_LDADD, guix_register_LDADD): Add -lz. * guix/store.scm (log-file): Handle '.gz' log files. * tests/guix-daemon.sh: Add test with '--log-compression=gzip'. * doc/guix.texi (Invoking guix-daemon): Adjust accordingly. * config-daemon.ac: Check for libz and zlib.h.
* | Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner2017-12-31
|\|
| * guix build: Support '--with-source=PACKAGE@VERSION=URI'.Ludovic Courtès2017-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/build.scm (numeric-extension?, tarball-base-name): New procedures, formerly in 'package-with-source'. (transform-package-source)[new-sources]: Look for '=' in URI. Each element of the list of now a (PKG VERSION SOURCE) tuple. Pass VERSION to 'package-with-source'. (package-with-source): Add 'version' parameter and honor it. * tests/scripts-build.scm ("options->transformation, with-source, PKG=URI") ("options->transformation, with-source, PKG@VER=URI"): New tests. * doc/guix.texi (Package Transformation Options): Document the new forms.
* | Merge branch 'master' into core-updatesMarius Bakke2017-12-19
|\|
| * guix gc: '--verify=foo' is reported as an error.Ludovic Courtès2017-12-18
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/29761>. Reported by Martin Castillo <castilma@uni-bremen.de>. * guix/scripts/gc.scm (argument->verify-options): New procedure. (%options) ["verify"]: Adjust to use it. * tests/guix-gc.sh: Add test.
| * lint: 'check-vulnerabilities' also checks package properties.Efraim Flashner2017-12-10
| | | | | | | | | | | | * guix/scripts/lint.scm (check-vulnerabilities): Also check for CVEs listed as mitigated in the package properties. * tests/lint.scm ("cve: known safe from vulnerability"): New test.
* | graph: Adjust test for glibc:static among the implicit inputs.Ludovic Courtès2017-12-17
|/ | | | | | | | | Fixes <https://bugs.gnu.org/29612>. Reported by Chris Marusich <cmmarusich@gmail.com>. This is a followup to 6dff905e51202bbdebbad8811b6509584d12a796. * tests/graph.scm ("bag-emerged DAG"): Adjust for glibc:static among IMPLICIT.
* gnu, doc, tests: Use ‘bootloader-configuration’ everywhere.Tobias Geerinckx-Rice2017-12-06
| | | | | | | | | | | | | | * doc/guix.texi (Proceeding with the Installation): Replace the old-style ‘grub-configuration’ with the newer ‘bootloader-configuration’ syntax. * gnu/system/examples/vm-image.tmpl: Likewise. * gnu/system/install.scm (installation-os): Likewise. * gnu/tests.scm (%simple-os): Likewise. * gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda, %separate-home-os) (%separate-store-os, %raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise. * gnu/tests/nfs.scm (%base-os): Likewise. * tests/guix-system.scm (OS_BASE, make_user_config): Likewise. * tests/system.scm (%os, %os-with-mapped-device): Likewise.
* tests: Look for multi-digit column numbers in unbound variable test.Eric Bavier2017-12-04
| | | | * tests/guix-system.sh: Match one or more digits in unbound-variable test.
* tests: Avoid double slash in URIs.Ludovic Courtès2017-12-01
| | | | | * tests/publish.scm ("with cache"): Remove extra slash in NAR-URL. This would lead to a 'uri-error' exception on Guile 2.2.3.
* lint: 'patch-file-names' checks for file name length.Ludovic Courtès2017-11-28
| | | | | | | | | Reported at <https://bugs.gnu.org/27943> by Danny Milosavljevic <dannym@scratchpost.org>. * guix/scripts/lint.scm (%distro-directory): New variable. (check-patch-file-names): Add check for the file name length. * tests/lint.scm ("patches: file name too long"): New test.
* syscalls: Adjust utmpx test.Ludovic Courtès2017-11-25
| | | | | | | | | Fixes <https://bugs.gnu.org/29426>. Reported by Adonay Felipe Nogueira <adfeno@hyperbola.info>. * tests/syscalls.scm ("utmpx-entries"): Check the value of (utmpx-entries entry) only for INIT_PROCESS, LOGIN_PROCESS, and USER_PROCESS entries.
* tests: Disable test for freed disk space that fails on Btrfs.Marius Bakke2017-11-21
| | | | | | | | | This is a follow-up to commit 40e89f5be609045bc2666cc16a4ef80bb7f84095. * tests/store.scm ("dead path can be explicitly collected"): Don't check that (> freed 0). * gnu/packages/package-management.scm (guix)[arguments]<#:phases>: Remove workaround for the same problem.
* workers: Add test with exceptions.Ludovic Courtès2017-11-17
| | | | * tests/workers.scm ("exceptions"): New test.
* tests: 'guix-gc.sh' passes even when 'out' or 'drv' are defined as env vars.Ludovic Courtès2017-11-13
| | | | | | | | | This fixes a test failure exhibited by fb17a89912c2a3738dae716e30481c11e1c6f0ac whereby assignments to 'out' in guix-gc.sh would go to the 'out' environment variable, when it exists, which in turn prevents garbage collection of $out. * tests/guix-gc.sh: Add 'unset' invocations.
* tests: Adjust to new unbound-variable error message.Ludovic Courtès2017-11-11
| | | | | | This is a followup to dc856223f5eab57d8a4881782ec0f50abd12afa3. * tests/guix-package.sh: Adjust unbound-variable message regexp.
* tests: Refer to "time@1.8".Ludovic Courtès2017-11-11
| | | | | | This is a followup to dd00e0919fcecd895ff4e5a646cf068f46ff8d12. * tests/guix-build.sh: Refer to "time@1.8".
* tests: Adjust to unbound-variable exception printer.Ludovic Courtès2017-11-10
| | | | | * tests/guix-system.sh: Adjust unbound-variable test for commit dc856223f5eab57d8a4881782ec0f50abd12afa3.
* gnu: Improve error reporting of the use-.*modules macros.Ludovic Courtès2017-11-08
| | | | | | | | | | | Suggested by Julien Lepiller and myglc2 at <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00106.html>. * gnu.scm (%try-use-modules): New procedure. (package-module-hint, service-module-hint): New procedures. (try-use-modules): New macro. (use-package-modules, use-service-modules, use-system-modules): Use it. * tests/guix-system.sh: Test it.
* services: Add 'lookup-service-types'.Ludovic Courtès2017-11-08
| | | | | * gnu/services.scm (lookup-service-types): New procedure. * tests/services.scm ("lookup-service-types"): New test.
* Revert "import: cpan: Use HTTPS for home pages."Tobias Geerinckx-Rice2017-10-30
| | | | | This reverts commit 29f7bf59d5d4d4b848eaedc6766bb4e02cae20d3: HTTPS support at search.cpan.org is unreliable, at best. Don't rely on it.
* import: cpan: Use HTTPS for home pages.Tobias Geerinckx-Rice2017-10-29
| | | | | * guix/import/cpan.scm (cpan-home): Use HTTPS. * tests/cpan.scm ("cpan->guix-package"): Expect it.
* import: cpan: Add trailing "/" on home-page.Eric Bavier2017-10-28
| | | | | | | | This appeases 'guix lint', which otherwise complains about permanent redirects. * guix/import/cpan.scm (cpan-module->sexp): Add trailing "/" on home-page. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
* import: cpan: Propagate imported dependencies.Eric Bavier2017-10-28
| | | | | | | This is most often the need for perl module dependencies. * guix/import/cpan.scm (cpan-module->sexp): 'inputs -> 'propagated-inputs. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
* lint: 'home-page' checker reports permanent redirects.Ludovic Courtès2017-10-12
| | | | | | | | * guix/scripts/lint.scm (probe-uri): Add special case for HTTP 301. (validate-uri): Likewise. * tests/lint.scm ("home-page: 301, invalid") ("home-page: 301 -> 200", "home-page: 301 -> 404") ("source: 301 -> 200", "source: 301 -> 404"): New tests.
* tests: Support multiple HTTP server instances.Ludovic Courtès2017-10-12
| | | | | | | | | | | | | * guix/tests/http.scm (%http-server-socket): Turn into... (open-http-server-socket): ... this procedure. (http-server-can-listen?): New procedure. (http-write, %http-server-lock, %http-server-ready) (http-open, stub-http-server): Move to 'call-with-http-server' body. (call-with-http-server): Add #:headers parameter. (with-http-server): Add an additional pattern with headers. * tests/derivations.scm: Use (http-server-can-listen?) instead of (force %http-server-socket). * tests/lint.scm: Likewise.
* zlib: Fix memory leak due to revealed ports not being GC'd.Ludovic Courtès2017-10-11
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/28784>. This mostly reverts 81a0f1cdf12e7bcc34c1203f034a323fa8f52cf5, which introduced a regression: revealed ports are *never* GC'd (contrary to what Guile's manual suggests). In addition to the revert, 'close-procedure' now explicitly swallows EBADF errors when 'close-port' is called. * guix/zlib.scm (close-procedure): New procedure. (make-gzip-input-port)[gzfile]: Use 'fileno' instead of 'port->fdes'. Use 'close-procedure' instead of 'gzclose'. (make-gzip-output-port): Likewise. * tests/zlib.scm ("compression/decompression pipe"): Use 'port-closed?' to determine whether PARENT has been closed.
* ui: Improve reporting of missing closing parentheses.Ludovic Courtès2017-10-10
| | | | | | | | Suggested by Ricardo Wurmus. Works around <https://bugs.gnu.org/28295>. * guix/ui.scm (report-load-error): Add case for 'read-error'. * tests/guix-system.sh: Test missing-closing-paren errors.
* import: Use a 'file://' URL in 'alist->package' test.Ludovic Courtès2017-10-06
| | | | | * tests/import-utils.scm ("alist->package with simple source"): Use a 'file://' URL.
* uuid: Fix typo in 'uuid=?' test.Ludovic Courtès2017-10-06
| | | | * tests/uuid.scm ("uuid=?"): Change to 'test-assert'.
* publish: Cache uncompressed nars as well.Ludovic Courtès2017-10-05
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/28664>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/scripts/publish.scm (bake-narinfo+nar): When COMPRESSION is 'none, write NAR instead of doing nothing. (make-request-handler): Use 'render-nar/cached' for /nar URLs with no compression. * tests/publish.scm ("with cache", "with cache, uncompressed"): Adjust expected result accordingly.
* uuid: Add 'uuid=?' and use it.Ludovic Courtès2017-10-05
| | | | | | | * gnu/system/uuid.scm (uuid=?): New procedure. * tests/uuid.scm ("uuid=?"): New test. * gnu/build/file-systems.scm (partition-uuid-predicate) (luks-partition-uuid-predicate): Use it instead of 'bytevector=?'.
* import: Add generic data to package converter.Ricardo Wurmus2017-09-28
| | | | | | * guix/import/utils.scm (build-system-modules, lookup-build-system-by-name, specs->package-lists, source-spec->object, alist->package): New procedures. * tests/import-utils.scm: Add tests for alist->package.
* import: Add package->code.Ricardo Wurmus2017-09-28
| | | | | | | * guix/import/print.scm: New file. * tests/print.scm: New file. * Makefile.am (SCM_TESTS): Add new test file. (MODULES): Add print.scm.
* uuid: Add a parser for FAT32 UUIDs.Ludovic Courtès2017-09-22
| | | | | | | * gnu/system/uuid.scm (%fat32-uuid-rx): New variable. (string->fat32-uuid): New procedure. (%uuid-parsers): Add it. * tests/uuid.scm ("uuid, FAT32, format preserved"): New test.
* guix system: Add 'search' command.Ludovic Courtès2017-09-16
| | | | | | | | | | | | | | * guix/scripts/system.scm (resolve-subcommand): New procedure. (process-command): Handle 'search'. (guix-system): Likewise. (show-help): Augment. * guix/scripts/system/search.scm: New file. * po/guix/POTFILES.in: Add it. * Makefile.am (MODULES): Add it. * guix/ui.scm (%text-width): Export. * doc/guix.texi (Invoking guix system): Document it. (Service Types and Services): Mention 'guix system search'. * tests/guix-system.sh: Test it.
* uuid: Move tests to 'tests/uuid.scm'.Ludovic Courtès2017-09-14
| | | | | | | * tests/file-systems.scm ("uuid->string", "string->uuid") ("uuid", "uuid, syntax error"): Move to... * tests/uuid.scm: ... here. New file. ("uuid, ISO-9660, format preserved"): New test.
* uuid: Adjust tests.Ludovic Courtès2017-09-14
| | | | | | | This is a followup to 9b336338cdc0e46a3bf7a2913c2f61cd2410c4d6. * tests/file-systems.scm ("uuid"): Add call to 'uuid-bytevector'. ("uuid, syntax error"): Add 'dce to the expected form.
* import: cpan: Adjust expected license in tests.Ludovic Courtès2017-09-14
| | | | | | This is a followup to 01ef804d69b2e57dd7b1d3d13e66e3f67e7c548a. * tests/cpan.scm ("cpan->guix-package"): Expect 'perl-license'.
* substitute: Download from unauthorized sources that provide the right content.Ludovic Courtès2017-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows substitutes to be downloaded from unauthorized servers, as long as they advertise the same hash and references as one of the authorized servers. * guix/scripts/substitute.scm (assert-valid-narinfo): Remove. (valid-narinfo?): Add #:verbose?. Handle each case of 'signature-case'. (equivalent-narinfo?): New procedure. (lookup-narinfos/diverse): Add 'authorized?' parameter and honor it. [select-hit]: New procedure. (lookup-narinfo): Add 'authorized?' parameter and pass it. (process-query): Adjust callers accordingly. (process-substitution): Remove call to 'assert-valid-narinfo'. Check whether 'lookup-narinfo' returns true and call 'leave' if not. * tests/substitute.scm (%main-substitute-directory) (%alternate-substitute-directory): New variables. (call-with-narinfo): Make 'narinfo-directory' a parameter. Call 'mkdir-p' to create it. Change unwind handler to check whether CACHE-DIRECTORY exists before deleting it. (with-narinfo*): New macro. ("substitute, no signature") ("substitute, invalid hash") ("substitute, unauthorized key"): Change expected error message to "no valid substitute". ("substitute, unauthorized narinfo comes first") ("substitute, unsigned narinfo comes first") ("substitute, first narinfo is unsigned and has wrong hash") ("substitute, first narinfo is unsigned and has wrong refs") ("substitute, unsigned narinfo comes first") ("substitute, two invalid narinfos"): New tests. * doc/guix.texi (Substitutes): Explain the new behavior.
* substitute: Make substitute URLs a SRFI-39 parameter.Ludovic Courtès2017-09-11
| | | | | | | | * guix/scripts/substitute.scm (%cache-urls): Rename to... (%default-substitute-urls): ... this. (substitute-urls): New variable. (guix-substitute): Use it instead of %CACHE-URLS. * tests/substitute.scm: Likewise.