summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | tests: cpan: Fix mock urls.Eric Bavier2016-08-311-2/+2
| | | | | | | | | | | | Followup to 7a62263ee5. * tests/cpan.scm (cpan->guix-package): Use "https" in mock urls.
* | services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'.Ludovic Courtès2016-08-312-68/+69
| | | | | | | | | | | | | | | | | | | | * 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.
* | guix system: Do not unload services depended on.Ludovic Courtès2016-08-311-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.Ludovic Courtès2016-08-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | services: shepherd: Add 'shepherd-service-lookup-procedure'.Ludovic Courtès2016-08-311-1/+10
| | | | | | | | | | | | | | * 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.
* | guix system: Extract and test the service upgrade procedure.Ludovic Courtès2016-08-311-0/+34
|/ | | | | | | | | * 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.
* guix: lint: Check descriptions for trademark signs.Eric Bavier2016-08-281-1/+15
| | | | | | | * 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.
* tests: Fix 'guix environment --container' test in the presence of tmpfs.Ludovic Courtès2016-08-291-1/+1
| | | | | | | | Reported by Ting-Wei Lan <lantw44@gmail.com>. This is a followup to 1250034d5aff14fe236aad9900233a2b6f8563bb. * tests/guix-environment-container.sh (mount_test_code): Reverse order of 'string-prefix?' arguments.
* import: Importers return prefixed licenses.David Craven2016-08-282-3/+3
| | | | | | | | | * guix/import/utils.scm (define-module): Import licenses with license: prefix. (string->licenses): Use prefixed licenses. (license->symbol): Return symbols with the prefix license:. * guix/tests/pypi.scm (pypi->guix-package): Update test cases. * guix/tests/gem.scm (gem->guix-package): Update test case.
* Merge branch 'core-updates'Mark H Weaver2016-08-041-3/+8
|\
| * tests: 'guix-environment-container.sh' works when run from a tmpfs.Ludovic Courtès2016-07-311-3/+8
| | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22004>. Reported by Ting-Wei Lan <lantw44@gmail.com>. * tests/guix-environment-container.sh (mount_test_code): Add 'match' clause to ignore "/"; augment clause that ignores specific file system types such that it does not ignore parent mount points.
* | Revert "Merge branch 'core-updates'"Mark H Weaver2016-08-041-8/+3
| | | | | | | | This reverts commit 455859a50f88f625d13fc2f304111f02369b366b.
* | tests: Make sure threads use separate output ports.Ludovic Courtès2016-08-021-6/+18
| | | | | | | | | | | | * tests/publish.scm (with-separate-output-ports): New macro. <top level>: Use it when spawning new thread. ("/*.narinfo with compression"): Likewise.
* | tests: Work around Guile bug with unbuffered custom binary input ports.Ludovic Courtès2016-08-021-1/+2
| | | | | | | | | | | | | | | | Reported by Chris Marusich <cmmarusich@gmail.com> at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24060#19> * tests/publish.scm (http-get-port): Remove 'setvbuf' call for the response port.
* | Merge branch 'core-updates'Ludovic Courtès2016-08-011-3/+8
| |
* | publish: Do not compress already-compressed files.Ludovic Courtès2016-08-011-0/+14
|/ | | | | | | * guix/scripts/publish.scm (narinfo-string): Force %NO-COMPRESSION when STORE-PATH matches 'compressed-file?'. * guix/utils.scm (compressed-file?): New procedure. * tests/publish.scm ("/*.narinfo for a compressed file"): New test.
* tests: Improve synchronization in 'tests/guix-register.sh'.Ludovic Courtès2016-07-291-3/+15
| | | | | | | * tests/guix-register.sh: When launching guix-daemon, add retry loop around 'open-connection'. This fixes test failures that could occur under heavy load where the daemon's socket file wouldn't be ready yet when the client connects.
* gnu: commencement: 'guile-final' is now "hidden".Ludovic Courtès2016-07-281-0/+14
| | | | | | | | | | | This way, we no longer have this annoying warning: $ guix build guile -n guix build: warning: ambiguous package specification `guile' guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:128:2 * gnu/packages/commencement.scm (guile-final): Use 'hidden-package'. * tests/packages.scm ("fold-packages, hidden package"): New test.
* packages: Add 'hidden-package'.Ludovic Courtès2016-07-281-0/+4
| | | | | | * guix/packages.scm (hidden-package, hidden-package?): New procedures. * gnu/packages.scm (fold-packages): Filter out 'hidden-package?'. * tests/packages.scm ("hidden-package"): New test.
* tests: Use unbuffered input ports when decompressing from 'guix publish'.Ludovic Courtès2016-07-271-2/+10
| | | | | | | | Fixes <http://bugs.gnu.org/24060>. Reported by Chris Marusich <cmmarusich@gmail.com>. * tests/publish.scm (http-get-port): Explicitly call 'open-socket-for-uri' and add calls to 'setvbuf'.
* profiles: Output in 'package->manifest-entry' defaults to "out".Ludovic Courtès2016-07-261-0/+10
| | | | | | | | | | | Fixes <http://bugs.gnu.org/24029>. Reported by Dylan Jeffers <sapientech@openmailbox.org>. * guix/profiles.scm (package->manifest-entry): Change #:output to default to "out". (packages->manifest): Add 'package?' in second 'match' clause. * tests/profiles.scm ("package->manifest-entry defaults to \"out\""): New test.
* environment: Set 'GUIX_ENVIRONMENT' to the profile.Ludovic Courtès2016-07-261-0/+4
| | | | | | | * guix/scripts/environment.scm (create-environment): Set 'GUIX_ENVIRONMENT' to PROFILE. * tests/guix-environment.sh: Test it. * doc/guix.texi (Invoking guix environment): Document it.
* import: pypi: Correctly handle new-style URLs.Ludovic Courtès2016-07-261-0/+16
| | | | | | | | | Fixes <http://bugs.gnu.org/23997>. * guix/import/pypi.scm (guix-package->pypi-name): Rewrite using 'basename' and 'hyphen-package-name->name+version'. * tests/pypi.scm ("guix-package->pypi-name, old URL style") ("guix-package->pypi-name, new URL style"): New tests.
* lint: 'inputs-should-be-native' checks for intltool, itstool and glib:bin.David Craven2016-07-241-1/+11
| | | | | | | | * guix/scripts/lint.scm (check-inputs-should-be-native): Warn when intltool, itstool or glib:bin isn't a native-input. * tests/lint.scm (inputs: glib:bin is probably a native input): Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* publish: Handle '/file' URLs, for content-addressed files.Ludovic Courtès2016-07-201-0/+34
| | | | | | | | | | * guix/scripts/publish.scm (render-content-addressed-file): New procedure. (http-write): Add 'application/octet-stream' case. (make-request-handler): Add /file/NAME/sha256/HASH URLs. * tests/publish.scm ("/file/NAME/sha256/HASH") ("/file/NAME/sha256/INVALID-NIX-BASE32-STRING") ("/file/NAME/sha256/INVALID-HASH"): New tests. * doc/guix.texi (Invoking guix publish): Mention the /file URLs.
* tests: Adjust to Shepherd error message change.Ludovic Courtès2016-07-201-2/+2
| | | | | | | This is a followup to commit 2c2ec261a8d3c37e5147038f47ad24c57cde4134. * tests/guix-system.sh: Adjust expected error message for Shepherd services that are not provided.
* publish: Add '--compression'.Ludovic Courtès2016-07-191-7/+52
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add '--compression'. (<compression>): New record type. (%no-compression, %default-gzip-compression): New variables. (%default-options): Add 'compression' key. (narinfo-string): Add #:compression parameter and honor it. (render-narinfo): Likewise. (render-nar): Likewise. <top level>: Add call to 'declare-header!'. (swallow-zlib-error): New macro. (nar-response-port): New procedure. (http-write): Add call to 'force-output'. Use 'nar-response-port' instead of 'response-port'. Use 'swallow-zlib-error'. (make-request-handler): Add #:compression parameter and honor it. Add "nar/gzip" URL handler. (run-publish-server): Add #:compression parameter and honor it. (guix-publish): Honor --compression. * tests/publish.scm (http-get-port, wait-until-ready): New procedures. <top level>: Run main server with "-C0". Call 'wait-until-ready'. ("/nar/gzip/*", "/*.narinfo with compression"): New tests. * doc/guix.texi (Invoking guix publish): Document it.
* Add (guix zlib).Ludovic Courtès2016-07-191-0/+63
| | | | | | | | | | * guix/zlib.scm, tests/zlib.scm: New files. * Makefile.am (MODULES): Add guix/zlib.scm. (SCM_TESTS): Add tests/zlib.scm. * m4/guix.m4 (GUIX_LIBGCRYPT_LIBDIR): New macro. * configure.ac (LIBGCRYPT_LIBDIR): Use it. Define and substitute 'LIBZ'. * guix/config.scm.in (%libz): New variable.
* system: Honor the 'dependencies' field of file systems.Ludovic Courtès2016-07-181-0/+43
| | | | | | | | | | | | | | This allows mapped devices listed in 'dependencies' to be properly taken into account. Reported by Andreas Enge <andreas@enge.fr>. * gnu/system.scm (mapped-device-user): Check whether DEVICE is a member of the 'dependencies' of FS. * tests/system.scm (%luks-device, %os-with-mapped-device): New variables. ("operating-system-user-mapped-devices") ("operating-system-boot-mapped-devices") ("operating-system-boot-mapped-devices, implicit dependency"): New tests.
* records: Improve reporting of invalid field specifiers.Ludovic Courtès2016-07-141-1/+28
| | | | | | | | | Fixes <http://bugs.gnu.org/23969>. Reported by Vincent Legoll <vincent.legoll@gmail.com>. * guix/records.scm (report-invalid-field-specifier): New procedure. * tests/records.scm ("define-record-type* & wrong field specifier"): New test.
* lint: 'validate-uri' reports suspiciously small 200 responses.Ludovic Courtès2016-07-131-11/+41
| | | | | | | | | | | | * guix/scripts/lint.scm (validate-uri): Upon 200 http-response, check the 'response-content-length' and emit a warning when it is <= 1000. * tests/lint.scm (call-with-http-server): Add 'data' parameter. (with-http-server): Likewise. (%long-string): New variable. ("home-page: 200"): Pass %LONG-STRING to 'with-http-server'. ("home-page: 404", "source: 200", "source: 404"): Likewise. ("home-page: 200 but short length"): New test. ("source: 200 but short length"): New test.
* gnu: Remove unneeded 'imported-modules' fields for 'origin'.Ludovic Courtès2016-07-121-1/+0
| | | | | | | | * gnu/packages/engineering.scm (fastcap)[source](modules, imported-modules): Remove. * gnu/packages/wm.scm (awesome)[source](imported-modules): Remove. * tests/packages.scm ("package-source-derivation, snippet"): Remove 'imported-modules' field.
* gexp: Remove more uses of #:modules.Ludovic Courtès2016-07-122-26/+26
| | | | | | | | * guix/scripts/system.scm (switch-to-system): Adjust comment. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Use 'with-imported-modules' instead of #:modules. * tests/grafts.scm ("graft-derivation, preserve empty directories"): Likewise.
* gexp: Add 'with-imported-modules' macro.Ludovic Courtès2016-07-121-4/+60
| | | | | | | | | | | | | | | | | | | | | * guix/gexp.scm (<gexp>)[modules]: New field. (gexp-modules): New procedure. (gexp->derivation): Use it and append the result to %MODULES. Update docstring to mark #:modules as deprecated. (current-imported-modules, with-imported-modules): New macros. (gexp): Pass CURRENT-IMPORTED-MODULES as second argument to 'gexp'. (gexp->script): Use and honor 'gexp-modules'; define '%modules'. * tests/gexp.scm ("gexp->derivation & with-imported-modules") ("gexp->derivation & nested with-imported-modules") ("gexp-modules & ungexp", "gexp-modules & ungexp-splicing"): New tests. ("program-file"): Use 'with-imported-modules'. Remove #:modules argument to 'program-file'. * doc/guix.texi (G-Expressions): Document 'with-imported-modules'. Mark #:modules of 'gexp->derivation' as deprecated. * emacs/guix-devel.el: Add syntax for 'with-imported-modules'. (guix-devel-keywords): Add it. * .dir-locals.el: Likewise.
* import: cpan: Use our mirrors for 'https' URLs.Alex Sassmannshausen2016-07-031-0/+11
| | | | | | | | * guix/import/cpan.scm (fix-source-url): New procedure. (cpan-module->sexp): Use it to construct our source-url. * tests/cpan.scm: Add tests for fix-source-url. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: Skip all the container tests when needed.Ludovic Courtès2016-06-251-4/+13
| | | | | | | | Reported by myglc2 <myglc2@gmail.com> at <http://bugs.gnu.org/23836>. * tests/containers.scm (skip-if-unsupported): New procedure. Call it before each test.
* tests: Strengthen regexp in 'packages.scm'.Ludovic Courtès2016-06-201-1/+1
| | | | | * tests/packages.scm ("--search-paths with pattern"): Call 'regexp-quote' on the result of 'derivation->output-path'.
* gexp: Add 'local-file' file name resolution test.Ludovic Courtès2016-06-161-0/+9
| | | | * tests/gexp.scm ("local-file, relative file name"): New test.
* gexp: Add #:select? parameter to 'local-file'.Ludovic Courtès2016-06-161-1/+17
| | | | | | | | | * guix/gexp.scm (<local-file>)[select?]: New field. (true): New procedure. (%local-file): Add #:select? and honor it. (local-file): Likewise. * tests/gexp.scm ("local-file, #:select?"): New test. * doc/guix.texi (G-Expressions): Adjust accordingly.
* packages: The 'source' can be any lowerable object.Ludovic Courtès2016-06-151-0/+15
| | | | | | | | | | | * guix/packages.scm (expand-input): Use 'struct?' instead of 'origin?' when matching SOURCE. (package-source-derivation): Use 'lower-object' instead of 'origin->derivation'. * tests/packages.scm ("package-source-derivation, local-file"): New test. * doc/guix.texi (package Reference): Update 'source' documentation accordingly.
* import: pypi: read requirements from wheels.Cyril Roelandt2016-06-141-1/+77
| | | | | | | | * doc/guix.tex (Invoking guix import): Mention that the pypi importer works better with "unzip". * guix/import/pypi.scm (latest-wheel-release, wheel-url->extracted-directory): New procedures. * tests/pypi.scm (("pypi->guix-package, wheels"): New test.
* serialization: Add #:select? parameter to 'write-file'.Ludovic Courtès2016-06-121-1/+41
| | | | | * guix/serialization.scm (write-file): Add #:select? parameter and honor it. * tests/nar.scm ("write-file #:select? + restore-file"): New test.
* ui: 'string->duration' supports hours and seconds.Ludovic Courtès2016-06-091-1/+5
| | | | | * guix/ui.scm (string->duration): Add seconds and hours. * tests/ui.scm ("duration, 1 second"): New test.
* publish: Encore URIs that appear in narinfos.Ludovic Courtès2016-06-081-0/+45
| | | | | | | | | | Fixes <http://bugs.gnu.org/21888>. Reported by iyzsong@member.fsf.org (宋文武). * guix/scripts/publish.scm (narinfo-string): Use 'encode-and-join-uri-path' instead of 'string-append' to compute URL. * tests/publish.scm ("/*.narinfo with properly encoded '+' sign"): ("/nar/ with properly encoded '+' sign"): New tests.
* bournish: Allow compilation of multiple expressions.Ludovic Courtès2016-06-061-0/+42
| | | | | | | * guix/build/bournish.scm (%bournish-language): Add a joiner to SCHEME. Compile only to Scheme. * tests/bournish.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* profiles: 'profile-derivation' now honors #:system.Ludovic Courtès2016-06-051-0/+15
| | | | | | | | | Fixes <http://bugs.gnu.org/23682>. Reported by Ander GM <anthk@openmailbox.org>. * guix/profiles.scm (profile-derivation): Pass #:system to 'gexp->derivation'. * tests/guix-environment.sh: Add 'guix environment -s' test.
* daemon: Substitute queries return immediately when substitutes are disabled.Ludovic Courtès2016-05-311-1/+28
| | | | | | | | | | | | | Reported by Federico Beffa <beffa@ieee.org> at <https://lists.gnu.org/archive/html/guix-devel/2016-05/msg00928.html>. * nix/libstore/local-store.cc (LocalStore::querySubstitutablePaths) (LocalStore::querySubstitutablePathInfos): Return when 'settings.useSubstitutes' is false. * tests/store.scm ("references/substitutes missing reference info"): Make sure to return #f on failure. * tests/store.scm ("substitutable-path-info when substitutes are turned off"): ("substitutable-paths when substitutes are turned off"): New tests.
* container: Gracefully report mount errors in the child process.Ludovic Courtès2016-05-312-0/+22
| | | | | | | | | | | | | Fixes <http://bugs.gnu.org/23306>. * gnu/build/linux-container.scm (run-container): Use 'socketpair' instead of 'pipe'. Rename 'in' to 'child' and 'out' to 'parent'. Send a 'ready message or an exception argument list from the child to the parent; adjust the parent accordingly. * tests/containers.scm ("call-with-container, mnt namespace, wrong bind mount"): New test. * tests/guix-environment-container.sh: Add test with --expose=/does-not-exist.
* cve: Use a more compact format for the list of package/versions.Ludovic Courtès2016-05-281-10/+7
| | | | | | | | | | | | | | | | On a warm cache, "guix lint -c cve vorbis-tools" goes down from 6.5s to 2.4s. * guix/cve.scm (cpe->package-name): Change to return two values instead of a pair. (cpe->product-alist): New procedure. (%parse-vulnerability-feed): Use it instead of 'filter-map'. (fetch-vulnerabilities): Bump sexp format version to 1. (vulnerabilities->lookup-proc): Adjust accordingly. When #:version is omitted, return a list of vulnerabilities instead of a list of version/vulnerability pairs. * tests/cve.scm (%expected-vulnerabilities) ("vulnerabilities->lookup-proc): Adjust accordingly.
* guix package: Inherit the transformed version number.Ludovic Courtès2016-05-271-0/+14
| | | | | | | | | | | Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz' would fail to use "42" as the version number in the manifest entry. Reported by piyo on #guix. * guix/scripts/package.scm (process-actions)[transform-entry]: Inherit the version number from the result of TRANSFORM when it's a package. * tests/guix-package.sh: Test it.