summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2017-04-18publish: Add '--cache' and '--workers'....Fixes <http://bugs.gnu.org/26201>. Reported by <dian_cecht@zoho.com>. These options allow nars to be "baked" off-line and cached instead of being compressed on the fly. As a side-effect, this allows us to provide a 'Content-Length' header for nars. * guix/scripts/publish.scm (show-help, %options): Add '--cache' and '--workers'. (%default-options): Add 'workers'. (nar-cache-file, narinfo-cache-file, run-single-baker): New procedures. (single-baker): New macro. (render-narinfo/cached, bake-narinfo+nar) (render-nar/cached): New procedures. (make-request-handler): Add #:cache and #:pool parameters and honor them. (run-publish-server): Likewise. (guix-publish): Honor '--cache' and '--workers'. * tests/publish.scm ("with cache"): New test. * doc/guix.texi (Invoking guix publish): Document it. Ludovic Courtès
2017-04-18Add (guix workers)....* guix/workers.scm, tests/workers.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them. * .dir-locals.el: Add rule for 'eventually'. Ludovic Courtès
2017-04-16services: Service types can now specify a default value for instances....* gnu/services.scm (&no-default-value): New variable. (<service-type>)[default-value]: New field. (<service>): Rename constructor from 'service' to 'make-service'. (service): New macro. (%service-with-default-value): New procedure. (&missing-value-service-error): New error condition. * tests/services.scm ("services, default value"): New test. * doc/guix.texi (Service Types and Services): Document 'default-value'. (Service Reference): Explain default values. Ludovic Courtès
2017-04-16services: 'service-parameters' becomes 'service-value'....* gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly. Ludovic Courtès
2017-04-07size: Add test to multiple 'store-profile' arguments....* tests/size.scm ("store-profile with multiple items"): New test. Ludovic Courtès
2017-04-05packages: Add 'package-mapping' and base 'package-input-rewriting' on it....* guix/packages.scm (package-mapping): New procedure. (package-input-rewriting): Rewrite in terms of 'package-mapping'. * tests/packages.scm ("package-mapping"): New test. * doc/guix.texi (Defining Packages): Document it. Ludovic Courtès
2017-04-04tests: Adjust search-paths test following the introduction of aarch64....Fixes a regression introduced in 3b88f3767d9f3ad2cc64173525cd53d429bfe7e7. * tests/search-paths.scm ("evaluate-search-paths, separator is #f"): Change the expected result to "aarch64-linux". Ludovic Courtès
2017-04-04packages: Catch invalid input errors for structs....Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com> at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>. * guix/packages.scm (expand-input): Add 'guard' form around call to 'package-source-derivation'. * tests/packages.scm (dummy): New test. Ludovic Courtès
2017-04-04gexp: 'lower-object' raises an exception when passed an invalid object....* guix/gexp.scm (&gexp-error, &gexp-input-error): New error conditions. (lower-object): Raise &gexp-input-error when 'lookup-compiler' returns #f. * tests/gexp.scm ("lower-object & gexp-input-error?"): New test. * guix/ui.scm (call-with-error-handling): Add case for 'gexp-input-error?'. Ludovic Courtès
2017-03-30Merge branch 'master' into core-updates...Most conflicts are from 6fd52309b8f52c9bb59fccffac53e029ce94b698. Marius Bakke
2017-03-28derivations: Do not fetch narinfos for non-substitutable items....This avoids connections to substitute servers for derivations that are not substitutable anyway, such as profiles. Reported by Andy Wingo. * guix/derivations.scm (substitution-oracle): Skip derivations that do not pass 'substitutable-derivation?'. * tests/derivations.scm ("substitution-oracle and #:substitute? #f"): New test. Ludovic Courtès
2017-03-27Merge branch 'master' into core-updatesLeo Famulari
2017-03-27ui: Support Texinfo markup in package synopses....* guix/ui.scm (package-field-string): New procedure. (package-description-string): Use it. (package-synopsis-string): New procedure. (package->recutils): Use it. * guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]: New procedure. Use it in checks. * tests/lint.scm: Test it. * gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the Texinfo markup. Alex Kost
2017-03-26union: Add create-all-directories? parameter to 'union-build'....* guix/build/union.scm (union-build): Add create-all-directories? keyword parameter. * tests/union.scm ("union-build #:create-all-directories? #t"): New test. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Huang Ying
2017-03-23Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner
2017-03-22tests: Skip 'guix pack' test when networking is unavailable....* tests/pack.scm ("self-contained-tarball"): Skip unless (network-reachable?). Ludovic Courtès
2017-03-22tests: Fix 'cond-expand' clause for 2.2/2.0....Fixes a mistake in a9a0227c0127e1813190a7664f7ad858e791480d. * tests/store.scm ("current-build-output-port, UTF-8 + garbage"): Inverse the 'cond-expand' clauses since the 'guile-2.0' feature doesn't exist. Ludovic Courtès
2017-03-22publish: Make the nar URL prefix a parameter....* guix/scripts/publish.scm (narinfo-string): Add #:nar-path and honor it. (render-narinfo): Likewise. (make-request-handler): Likewise. (run-publish-server): Likewise. * tests/publish.scm ("custom nar path"): New test. Ludovic Courtès
2017-03-22publish: The public and private keys are now SRFI-39 parameters....* guix/scripts/publish.scm (%default-options): Add 'public-key-file' and 'private-key-file'. (lazy-read-file-sexp): Remove. (%private-key, %public-key): Turn into SRFI-39 parameters. (signed-string, render-narinfo): Adjust accordingly. (guix-publish): Honor 'public-key-file' and 'private-key-file' from OPTS. Use 'parameterize'. * guix/pk-crypto.scm (read-file-sexp): New procedure. * tests/publish.scm: Initialize '%public-key' and '%private-key'. Ludovic Courtès
2017-03-22Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner
2017-03-21file-systems: Do not use (gnu packages …)....Fixes a regression introduced in 7208995426714c9fc3ad59cadc3cc0f52df0f018 whereby (gnu system file-systems) would pull in (gnu packages …) module, which in turn breaks when importing things like (gnu build shepherd). * gnu/system/file-systems.scm (file-system-type-predicate): Export. (file-system-packages): Move to... * gnu/system/linux-initrd.scm (file-system-packages): ... here. Add docstring. * gnu/services/base.scm: Use it. * tests/file-systems.scm ("does not pull (gnu packages …)"): New test. Ludovic Courtès
2017-03-19Merge branch 'master' into core-updatesMark H Weaver
2017-03-19gnu: Rename "guile-next" to "guile"....* gnu/packages/guile.scm (guile-next): Rename to... (guile-2.2): ... this. Update users. [name]: Change to "guile". [synopsis]: Remove. [properties]: Remove 'upstream-name', 'ftp-server', and 'ftp-directory'. * gnu/packages/bioinformatics.scm (rcas-web): Update accordingly. * gnu/packages/tls.scm (gnutls/guile-2.2): Likewise. * tests/guix-build.sh: Use 'guile@2.2' instead of 'guile-next'. * doc/guix.texi (Package Transformation Options): Update examples that referred to "guile-next". Ludovic Courtès
2017-03-18build: Require Guile >= 2.0.9....* configure.ac: Bump requirement to 2.0.9. * doc/guix.texi (Requirements): Adjust accordingly. * README (Requirements): Likewise. * build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>. * guix/build/download.scm: Likewise. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/http-client.scm: Remove workaround for <http://bugs.gnu.org/13095>. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9. * tests/nar.scm: Use (ice-9 control). (let/ec): Remove. Ludovic Courtès
2017-03-17profiles: Packages in a profile can be cross-compiled....* guix/profiles.scm (profile-derivation): Add #:target parameter; pass it to 'gexp->derivation'. * tests/profiles.scm ("profile-derivation, cross-compilation"): New test. Ludovic Courtès
2017-03-17pack: Move absolute file name to <compressor>....* guix/scripts/pack.scm (<compressor>)[package]: Remove. [command]: Document as being a gexp with an absolute file name. (%compressors): Adjust accordingly. (self-contained-tarball): Simplify PATH expression. Move 'string-join' for the compressor command on the build side. (docker-image): Simplify PATH expression. * tests/pack.scm (%gzip-compressor): Adjust accordingly. Ludovic Courtès
2017-03-16gexp: Add '=>' syntax to import computed modules....* guix/gexp.scm (imported-files)[file-pair]: Add case for pairs where the cdr is not a string. (imported-modules): Support '=>' syntax in MODULES. * tests/gexp.scm ("imported-files with file-like objects") ("gexp->derivation & with-imported-module & computed module"): New tests. * doc/guix.texi (G-Expressions): Document '=>' syntax for 'with-imported-modules'. Ludovic Courtès
2017-03-16utils: Move base16 procedures to (guix base16)....* guix/utils.scm (bytevector->base16-string, base16-string->bytevector): Move to... * guix/base16.scm: ... here. New file. * tests/utils.scm ("bytevector->base16-string->bytevector"): Move to... * tests/base16.scm: ... here. New file. * Makefile.am (MODULES): Add guix/base16.scm. (SCM_TESTS): Add tests/base16.scm. * build-aux/download.scm, guix/derivations.scm, guix/docker.scm, guix/import/snix.scm, guix/pk-crypto.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/store.scm, tests/hash.scm, tests/pk-crypto.scm: Adjust imports accordingly. Ludovic Courtès
2017-03-15Merge branch 'master' into core-updatesMarius Bakke
2017-03-15tests: Expect less accurate location info in 2.2.0....* tests/guix-system.sh: Work around inaccurate location info in 2.2.0. Ludovic Courtès
2017-03-15store: Adjust UTF-8 test to Guile 2.2....* tests/store.scm ("current-build-output-port, UTF-8 + garbage"): On Guile 2.2, expect REPLACEMENT CHARACTER instead of '?'. Ludovic Courtès
2017-03-15zlib: Don't rely on EBADF being ignored by 'fport_close'....In 2.2, 'fport_close' no longer swallows EBADF and instead raises a 'system-error' for this. This commit adjusts for 2.2. * guix/zlib.scm (close-procedure): Remove. (make-gzip-input-port): Use 'port->fdes' instead of 'fileno'. Use 'gzclose' instead of 'close-procedure'. (make-gzip-output-port): Likewise. * tests/zlib.scm ("compression/decompression pipe"): Don't check whether PARENT is closed using 'port-closed?'. Instead, use 'seek' on the underlying FD and check for EBADF. Ludovic Courtès
2017-03-14pack: Add unit test....* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option. [build](tar-supports-sort?): New variable. Use it. * tests/pack.scm: New file. * Makefile.am (SCM_TESTS): Add it. Ludovic Courtès
2017-03-09Merge branch 'master' into core-updatesLudovic Courtès
2017-03-08ui: Don't use '%default-port-encoding' to set the encoding of string ports....* guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's encoding; remove use of 'with-fluids'. This is for compatibility with Guile 2.2 where the encoding of string ports is not influenced by %DEFAULT-PORT-ENCODING. * tests/ui.scm ("show-manifest-transaction"): Likewise. Ludovic Courtès
2017-03-08tests: Avoid zero-expression 'begin' form....* tests/cran.scm ("description->package"): Add body after the expected pattern in 'match'. Ludovic Courtès
2017-03-08hash: Close or flush sha256 output ports before calling their 'get' procedure....Slightly different buffering of custom binary output ports in Guile 2.1.7 would lead tests missing 'close-port' or 'force-output' to fail. * tests/hash.scm ("open-sha256-port, hello"): Add call to 'force-output' before call to 'get'. * tests/nar.scm ("write-file puts file in C locale collation order"): Call 'close-port' before calling 'get-hash'. Ludovic Courtès
2017-02-20gnu: Add bootstrap-binaries for 'aarch64-linux'....These bootstrap-binaries were built against commit 8f8f250bdca917b3ce38aa0902f01b19081859a4. * gnu/packages/bootstrap/aarch64-linux/bash, gnu/packages/bootstrap/aarch64-linux/mkdir, gnu/packages/bootstrap/aarch64-linux/xz, gnu/packages/bootstrap/aarch64-linux/tar: New files. * gnu/local.mk (bootstrap_aarch64_linuxdir) (dist_bootstrap_aarch64_linux_DATA) (nodist_bootstrap_aarch64_linux_DATA): New variables. (DISTCLEANFILES): Add $(nodist_bootstrap_aarch64_linux_DATA). (gnu/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz): New target. * build-aux/download.scm (filename->uri): Add aarch64-linux entry. * gnu/packages/bootstrap.scm (raw-build): Use guile-2.0.14.tar.xz on aarch64-linux. (glibc-dynamic-linker, %bootstrap-coreutils&co, %boostrap-binutils) (%bootstrap-glibc, %bootstrap-gcc): Add aarch64-linux cases. * m4/guix.m4 (GUIX_SYSTEM_TYPE): Add aarch64 case. (GUIX_ASSERT_SUPPORTED_SYSTEM): Add aarch64-linux to supported list. * doc/guix.texi (GNU Distribution): Add aarch64-linux to the list of supported systems. * tests/packages.scm (package-search-derivation, snippet): Add aarch64 case. Efraim Flashner
2017-02-20Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner
2017-02-13tests: Adjust for 'http-fetch' change in (guix import json)....This is a followup to commit 81e0bc1834490a1a8092c75a0733b15c2b407285. * tests/cpan.scm ("cpan->guix-package"): Add a 'rest' argument to the lambda that mocks 'http-fetch'. * tests/crate.scm ("crate->guix-package"): Likewise. * tests/gem.scm ("gem->guix-package"): Likewise. * tests/pypi.scm ("pypi->guix-package"): Likewise. ("pypi->guix-package, wheels"): Likewise. Ludovic Courtès
2017-02-11tests: Relax test on utmpx entries....Partly fixes <http://bugs.gnu.org/25476>. Reported by Paul Garlick <pgarlick@tourbillion-technology.com>. * tests/syscalls.scm ("utmpx-entries"): Check whether ENTRY is of type 'BOOT_TIME', in which case PID may be 0. Ludovic Courtès
2017-02-10Merge branch 'master' into core-updatesLudovic Courtès
2017-02-08import: pypi: Correctly handle multiple-URL origins....Fixes <https://bugs.gnu.org/25635>. Reported by Sergei Trofimovich <slyfox@inbox.ru>. * guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New procedure. Rewrite body to match lists in addition to strings. * tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test. Ludovic Courtès
2017-02-07linux-container: Add 'container-excursion*'....* gnu/build/linux-container.scm (container-excursion*): New procedure. * tests/containers.scm ("container-excursion*") ("container-excursion*, same namespaces"): New tests. Ludovic Courtès
2017-02-04file-systems: Remove dependency on (guix store)....(gnu system file-systems) is used on the "build" side since commit 5970e8e248f6327c41c83b86bb2c89be7c3b1b4e. * gnu/system/file-systems.scm: Remove dependency on (guix store). (%store-prefix): New procedure. * tests/file-systems.scm ("does not pull (guix config)"): New test. Ludovic Courtès
2017-02-02Merge branch 'master' into core-updatesLeo Famulari
2017-01-31tests: Really skip /var/run/utmpx test when needed....* tests/syscalls.scm: Change 'test-ski' to 'test-skip'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul Garlick
2017-01-30store: Add 'add-data-to-store'....* guix/serialization.scm (write-bytevector): New procedure. (write-string): Rewrite in terms of 'write-bytevector'. * guix/store.scm (write-arg): Add 'bytevector' case. (add-data-to-store): New procedure, from former 'add-text-to-store'. (add-text-to-store): Rewrite in terms of 'add-data-to-store'. * tests/store.scm ("add-data-to-store"): New test. Ludovic Courtès
2017-01-28tests: Adjust pypi test to recent importer change....This is a followup to 2f977d92d3ae517788d3dee98f63680ca149aa1a. * tests/pypi.scm ("pypi->guix-package"): Don't expect 'python-setuptools' in 'propagated-inputs'. ("pypi->guix-package, wheels"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Carlo Zancanaro
2017-01-26bournish: Extend 'rm' command....* guix/build/bournish.scm (rm-command): New procedure. (%commands): Use it. * tests/bournish.scm: Add tests for "rm" and "rm -r". Ricardo Wurmus