summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* lint: Fix argument parsing when several packages are specified.Ludovic Courtès2015-01-28
| | | | | | | | * guix/scripts/lint.scm (%options) <--checkers>: Remove 'arg-handler' parameter, and return a single value. (guix-lint)[parse-options]: Remove 'arg-handler' parameter from handlers. Remove second seed to 'args-fold*'. * tests/guix-lint.sh: Add test.
* derivations: Raise an error for references to non-existent outputs.Ludovic Courtès2015-01-24
| | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/19630>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/derivations.scm (&derivation-error, &derivation-missing-output-error): New error conditions. (derivation->output-path): Raise a '&derivation-missing-output-error' if OUTPUT is not an output of DRV. * guix/ui.scm (call-with-error-handling): Add case for 'derivation-missing-output-error?'. (show-what-to-build): Check whether (derivation-outputs drv) is empty. * tests/packages.scm ("reference to non-existent output"): Add test.
* gnu: 'search-patch' raises an error when a patch is not found.Ludovic Courtès2015-01-20
| | | | | | | * gnu/packages.scm (search-patch): Raise an error condition when 'search-path' returns #f. * tests/packages.scm ("patch not found yields a run-time error"): New test.
* records: Add support for delayed fields.Ludovic Courtès2015-01-19
| | | | | | | | | | | | | | | | | * guix/records.scm (make-syntactic-constructor): Add #:delayed parameter. [delayed-field?]: New procedure. [wrap-field-value]: Use it. (define-record-type*)[delayed-field?, wrapped-field?]: New procedures. [thunked-field-accessor-name]: Rename to... [wrapped-field-accessor-name]: ... this. [field-spec->srfi-9]: Change 'thunked' to 'wrapped'. [delayed-field-accessor-definition]: New procedure. Compute delayed-field accessors and emit them. Pass #:delayed to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & delayed", "define-record-type* & delayed & default", "define-record-type* & delayed & inherited"): New tests.
* tests: Adjust syscall tests for 2.6ish Linux.Ludovic Courtès2015-01-19
| | | | | * tests/syscalls.scm ("set-network-interface-flags", "set-network-interface-address"): Accept EACCES as a valid result.
* monads: Add the state monad.Ludovic Courtès2015-01-17
| | | | | | | | | | | * guix/monads.scm (state-return, state-bind, run-with-state, current-state, set-current-state, state-push, state-pop): New procedures. (%state-monad): New variable. * tests/monads.scm (%monads): Add %STATE-MONAD. (%monad-run): Add 'run-with-state'. (values->list): New macro. ("set-current-state", "state-push etc."): New tests.
* store: Add #:recursive? parameter to 'export-paths'.Ludovic Courtès2015-01-17
| | | | | | | * guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests.
* Merge branch 'core-updates'Ludovic Courtès2015-01-16
|\ | | | | | | | | Conflicts: gnu/packages/bootstrap.scm
| * Merge branch 'master' into core-updatesMark H Weaver2015-01-13
| |\
| * \ Merge branch 'master' into core-updatesMark H Weaver2015-01-11
| |\ \
| * \ \ Merge branch 'master' into core-updatesMark H Weaver2015-01-06
| |\ \ \
| * | | | guix package: Follow symlinks for pattern search paths.Ludovic Courtès2015-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add local 'files' variable. * tests/packages.scm ("--search-paths with pattern"): New test.
| * | | | Merge branch 'master' into core-updatesMark H Weaver2014-12-30
| |\ \ \ \
| * | | | | packages: Add 'file-type' field to 'search-path-specification'.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18033>. * guix/packages.scm (<search-path-specification>): Rename 'directories' field to 'files'. Add 'file-type'. (search-path-specification->sexp): Honor 'file-type'. * gnu/packages/autotools.scm, gnu/packages/bootstrap.scm, gnu/packages/cross-base.scm, gnu/packages/games.scm, gnu/packages/gcc.scm, gnu/packages/glib.scm, gnu/packages/guile.scm, gnu/packages/man.scm, gnu/packages/perl.scm, gnu/packages/pkg-config.scm, gnu/packages/python.scm, gnu/packages/ruby.scm, gnu/packages/xfce.scm: Change 'directories' to 'files'. * tests/packages.scm ("search paths"): Change 'directories' field to 'files'. * guix/scripts/environment.scm (for-each-search-path): Likewise.
* | | | | | packages: Convert source derivations to monadic style.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (origin->derivation): Take body from 'package-source-derivation', and change it to monadic style. Expect METHOD to a monadic procedure. (package-source-derivation): Define in terms of 'origin->derivation'. * guix/download.scm (url-fetch): Remove 'store' argument. Remove 'guile-for-build' variable. Turn into a monadic procedure. * guix/git-download.scm (git-fetch): Likewise. * guix/svn-download.scm (svn-fetch): Likewise. * tests/builders.scm (url-fetch*): New procedure. Change tests to call 'url-fetch*' instead of 'url-fetch'. * tests/packages.scm ("package-source-derivation, snippet"): Remove 'store' parameter of 'fetch' and change it to use 'interned-file' instead of 'add-to-store'. * gnu/packages/bootstrap.scm (bootstrap-origin)[boot]: Remove 'store' parameter.
* | | | | | store: Add 'store-lower'.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test.
* | | | | | monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
* | | | | tests: Properly synchronize threads in the 'home-page' lint tests.Ludovic Courtès2015-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/lint.scm (%http-server-lock, %http-server-ready): New variables. (http-open): New procedure. (stub-http-server): Use it. (call-with-http-server): Wrap body in 'with-mutex'. Call 'wait-condition-variable' after 'make-thread'.
* | | | | monads: Remove 'derivation-expression'.Ludovic Courtès2015-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/monads.scm (lower-inputs, derivation-expression): Remove. * tests/monads.scm (derivation-expression, "mlet* + derivation-expression"): Remove.
* | | | | monads: Rewrite 'text-file*' using gexps.Ludovic Courtès2015-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/monads.scm (text-file*): Move to... * guix/gexp.scm (text-file*): ... here. Rewrite using gexps. * tests/monads.scm ("text-file*"): Move to... * tests/gexp.scm ("text-file*"): ... here.
* | | | | Add (guix sets).Ludovic Courtès2015-01-11
| |_|_|/ |/| | | | | | | | | | | | | | | * guix/sets.scm, tests/sets.scm: New files.sets * Makefile.am (MODULES, SCM_TESTS): Add them.
* | | | derivations: Add 'substitution-oracle' and use it.Ludovic Courtès2015-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes 'guix environment PACKAGE' significantly faster when substitutes are enabled. Before that, it would lead to many invocations of 'guix substitute-binary', one per 'derivation-prerequisites-to-build' call. Now, all these are replaced by a single invocation. * guix/derivations.scm (derivation-output-paths, substitution-oracle): New procedures. (derivation-prerequisites-to-build): Replace #:use-substitutes? with #:substitutable?. Remove the local 'derivation-output-paths' and 'substitutable?'. * guix/ui.scm (show-what-to-build): Add 'substitutable?'. Pass it to 'derivation-prerequisites-to-build'. [built-or-substitutable?]: Use it instead of 'has-substitutes?'. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Use #:substitutable? instead of #:use-substitutes?.
* | | | derivations: Add 'derivation-output-names'.Ludovic Courtès2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/derivations.scm (derivation-output-names): New procedure. (derivation-prerequisites-to-build): Use it for #:outputs. (map-derivation): Likewise. * tests/derivations.scm ("derivation-output-names"): New test.
* | | | import: Add CPAN importer.Eric Bavier2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm: New files. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them. * guix/scripts/import.scm (importers): Add cpan. * doc/guix.texi (Requirements): Mention `guix import cpan` as a user of guile-json. (Invoking guix import): Document new `guix import cpan` command.
* | | | tests: import: Factorize utility function.Eric Bavier2015-01-09
| | | | | | | | | | | | | | | | | | | | * tests/pypi.scm (mock): Move this... * guix/tests.scm: to here.
* | | | import: Factorize utility functions.Eric Bavier2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/import/pypi.scm (hash-table->alist, flatten, assoc-ref*, url-fetch, json-fetch): Pull procedures from here into... * guix/import/utils.scm: Here and... * guix/import/json.scm: Here. New file. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add it. * guix/import/gnu.scm (file-sha256): Move from here to... * guix/hash.scm: Here. * tests/pypi.scm (pypi->guix-package): Update mock module reference.
* | | | tests: Add missing copyright line.Ludovic Courtès2015-01-07
| |_|/ |/| | | | | | | | | | | * tests/lint.scm: Add missing copyright line for commit 907c98ac and others.
* | | gnu: Search for patches under $GUIX_PACKAGE_PATH.Ludovic Courtès2015-01-03
| |/ |/| | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/19364>. Reported by Tomáš Čech <sleep_walker@suse.cz> and Mark H Weaver <mhw@netris.org>. * gnu/packages.scm (%patch-path): Move after definition of %package-module-path'. Append "/gnu/packages/patches" only to %DISTRO-ROOT-DIRECTORY. * tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
* | tests: Make the 'lint' tests slightly more concise.Ludovic Courtès2014-12-29
| | | | | | | | | | | | * tests/lint.scm (with-warnings): New macro. Replace all uses of 'call-with-warnings' with the corresponding 'with-warnings' form.
* | tests: Factorize the 'dummy-package' macro.Ludovic Courtès2014-12-29
| | | | | | | | | | | | * guix/tests.scm (dummy-package): New macro. * tests/lint.scm (dummy-package): Remove. * tests/packages.scm (dummy-package): Remove.
* | lint: Add tests for the 'home-page' checker.Ludovic Courtès2014-12-29
|/ | | | | | | | | | | | | Suggested by Cyril Roelandt <tipecaml@gmail.com>. * tests/lint.scm (%http-server-port, %http-server-socket, %local-url, stub-http-server): New variables. (http-write, call-with-http-server): New procedures. (with-http-server): New macro. ("home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 404"): New tests. * guix/scripts/lint.scm (check-home-page): Export.
* syscalls: Add more procedures for network interfaces.Ludovic Courtès2014-12-19
| | | | | | | | | | | * guix/build/syscalls.scm (sizeof*, type-size, write-type, write-types, read-type, read-types, define-c-struct): New macros. (SIOCSIFFLAGS, SIOCGIFADDR, SIOCSIFADDR): New variables. (sockaddr-in, sockaddr-in6): New C structs. (write-socket-address!, read-socket-address, set-network-interface-flags, set-network-interface-address, network-interface-address, configure-network-interface): New procedures.
* tests: Use 'test-assertm' for profiles.Ludovic Courtès2014-12-15
| | | | | | * tests/profiles.scm (test-assertm): New macro. ("profile-derivation"): Use it instead of 'test-assert' + 'run-with-store'.
* guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli2014-12-06
| | | | | | | | | | | | | | | | | | | | Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli2014-11-30
| | | | | | | | | | | | | | | * doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* syscalls: Add 'mount-points'.Ludovic Courtès2014-11-10
| | | | | * guix/build/syscalls.scm (mount-points): New procedure. * tests/syscalls.scm ("mount-points"): New test.
* lint: Allow synopses that start with an abbreviation.Ludovic Courtès2014-11-07
| | | | | | * guix/scripts/lint.scm (starts-with-abbreviation?): New procedure. (check-synopsis-style)[check-start-with-package-name]: Use it. * tests/lint.scm ("synopsis: start with abbreviation"): New test.
* lint: Improve check for synopses starting with package name.Ludovic Courtès2014-11-07
| | | | | | | * guix/scripts/lint.scm (package-name-regexp): New procedure. (check-synopsis-style)[check-start-with-package-name]: Use it instead of 'string-prefix-ci?'. * tests/lint.scm ("synopsis: start with package name prefix"): New test.
* lint: Simplify no-warnings tests.Ludovic Courtès2014-11-07
| | | | | | | | | | * tests/lint.scm ("description: may start with a digit"): Replace (not (string-contains exp str)) with (string-null? exp). ("description: may start with lower-case package name"): Likewise. ("description: end-of-sentence detection with abbreviations"): Likewise. ("synopsis: may start with a digit"): Likewise. ("synopsis: ends with 'etc.'"): Likewise.
* tests: Avoid Bash extension in 'tests/guix-lint.sh'.Ludovic Courtès2014-11-06
| | | | * tests/guix-lint.sh: Remove redundant and non-portable 'export'.
* tests: When a store item is to be deleted, make it statistically unique.Ludovic Courtès2014-11-04
| | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18935>. Reported by Mark H Weaver <mhw@netris.org>. Previously, if tests/nar.scm ran concurrently with tests/gexp.scm, the store item "foo" containing the string "Hello, world!" could be deleted (via 'delete-paths') from the tests/nar.scm daemon while the tests/gexp.scm daemon would still consider it live. * tests/nar.scm ("restore-file-set (missing signature)"): Use (random-text) rather than "Hello, world!", to avoid concurrent deletion of store item "foo" used in tests/gexp.scm.
* store: Invalidate caches once GC has run.Ludovic Courtès2014-11-04
| | | | | | * guix/store.scm (run-gc): Add calls to 'hash-clear!'. * tests/store.scm ("add-text-to-store vs. delete-paths", "add-to-store vs. delete-paths"): New tests.
* packages: 'package-transitive-supported-systems' accounts for indirect deps.Ludovic Courtès2014-11-03
| | | | | | | | | | Reported by Andreas Enge <andreas@enge.fr>. * guix/packages.scm (first-value): New macro. (package-transitive-supported-systems): Rewrite to traverse all the DAG rooted at PACKAGE. * tests/packages.scm ("package-transitive-supported-systems"): Add 'd' and 'e', and test them.
* packages: Implement grafts.Ludovic Courtès2014-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions and suggestions. * guix/packages.scm (<package>)[graft]: New field. (patch-and-repack): Invoke 'package-derivation' with #:graft? #f. (package-source-derivation): Likewise. Do not use (%guile-for-build) in call to 'patch-and-repack', and we could end up using a grafted Guile. (expand-input): Likewise, also for 'package-cross-derivation' call. (package->bag): Add #:graft? parameter. Honor it. Use 'strip-append' instead of 'package-full-name'. (input-graft, input-cross-graft, bag-grafts, package-grafts): New procedures. (package-derivation, package-cross-derivation): Add #:graft? parameter and honor it. * gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add recursive call on 'graft'. * guix/build-system/gnu.scm (package-with-explicit-inputs, package-with-extra-configure-variable, static-package): Likewise. (gnu-build): Use the ungrafted Guile to avoid full rebuilds. (gnu-cross-build): Likewise. * guix/build-system/cmake.scm (cmake-build): Likewise. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise. * guix/build-system/perl.scm (perl-build): Likewise. * guix/build-system/python.scm (python-build): Likewise. * guix/build-system/ruby.scm (ruby-build): Likewise. * guix/build-system/trivial.scm (guile-for-build): Likewise. * tests/packages.scm ("package-derivation, direct graft", "package-cross-derivation, direct graft", "package-grafts, indirect grafts", "package-grafts, indirect grafts, cross", "package-grafts, indirect grafts, propagated inputs", "package-derivation, indirect grafts"): New tests. ("bag->derivation", "bag->derivation, cross-compilation"): Wrap in 'parameterize'. * doc/guix.texi (Security Updates): New node. (Invoking guix build): Document --no-graft.
* packages: Add 'package->bag' test for propagated inputs.Ludovic Courtès2014-11-02
| | | | * tests/packages.scm ("package->bag, propagated inputs"): New test.
* derivations: Add 'derivation-name'.Ludovic Courtès2014-11-02
| | | | | * guix/derivations.scm (derivation-name): New procedure. * tests/derivations.scm ("derivation-name"): New test.
* derivations: Fix 'derivation-prerequisites-to-build' when #:local-build?.Ludovic Courtès2014-10-29
| | | | | | * guix/derivations.scm (derivation-prerequisites-to-build)[derivation-substitutable?]: Call 'substitutable-derivation?'. <body>: When 'substitutable-derivation?' returns #f, add DRV to BUILD.
* tests: Move some of the narinfo test tools to (guix tests).Ludovic Courtès2014-10-29
| | | | | | | | * guix/tests.scm (derivation-narinfo, call-with-derivation-narinfo): New procedures. (with-derivation-narinfo): New macro. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Use them.
* derivations: Add 'offloadable-derivation?' and 'substitutable-derivation?'.Ludovic Courtès2014-10-29
| | | | | | * guix/derivations.scm (offloadable-derivation?, substitutable-derivation?): New procedures. * tests/derivations.scm ("offloadable-derivation?"): New test.
* build: Adjust lint tests for latest rules.Eric Bavier2014-10-28
| | | | | * tests/guix-lint.sh (dummy)[description]: Add failing case. [doc]: Adjust.