summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2015-01-20gnu: 'search-patch' raises an error when a patch is not found....* 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. Ludovic Courtès
2015-01-19records: Add support for delayed fields....* 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. Ludovic Courtès
2015-01-19tests: Adjust syscall tests for 2.6ish Linux....* tests/syscalls.scm ("set-network-interface-flags", "set-network-interface-address"): Accept EACCES as a valid result. Ludovic Courtès
2015-01-17monads: Add the state monad....* 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. Ludovic Courtès
2015-01-17store: Add #:recursive? parameter to 'export-paths'....* guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests. Ludovic Courtès
2015-01-16Merge branch 'core-updates'...Conflicts: gnu/packages/bootstrap.scm Ludovic Courtès
2015-01-14packages: Convert source derivations to monadic style....* 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. Ludovic Courtès
2015-01-14store: Add 'store-lower'....* guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test. Ludovic Courtès
2015-01-14monads: Move '%store-monad' and related procedures where they belong....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. Ludovic Courtès
2015-01-13Merge branch 'master' into core-updatesMark H Weaver
2015-01-13tests: Properly synchronize threads in the 'home-page' lint tests....* 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'. Ludovic Courtès
2015-01-12monads: Remove 'derivation-expression'....* guix/monads.scm (lower-inputs, derivation-expression): Remove. * tests/monads.scm (derivation-expression, "mlet* + derivation-expression"): Remove. Ludovic Courtès
2015-01-12monads: Rewrite 'text-file*' using gexps....* 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. Ludovic Courtès
2015-01-11Add (guix sets)....* guix/sets.scm, tests/sets.scm: New files.sets * Makefile.am (MODULES, SCM_TESTS): Add them. Ludovic Courtès
2015-01-11Merge branch 'master' into core-updatesMark H Weaver
2015-01-10derivations: Add 'substitution-oracle' and use it....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?. Ludovic Courtès
2015-01-09derivations: Add 'derivation-output-names'....* 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. Ludovic Courtès
2015-01-09import: Add CPAN importer....* 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. Eric Bavier
2015-01-09tests: import: Factorize utility function....* tests/pypi.scm (mock): Move this... * guix/tests.scm: to here. Eric Bavier
2015-01-09import: Factorize utility functions....* 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. Eric Bavier
2015-01-07tests: Add missing copyright line....* tests/lint.scm: Add missing copyright line for commit 907c98ac and others. Ludovic Courtès
2015-01-06Merge branch 'master' into core-updatesMark H Weaver
2015-01-03gnu: Search for patches under $GUIX_PACKAGE_PATH....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. Ludovic Courtès
2015-01-03guix package: Follow symlinks for pattern search paths....* guix/scripts/package.scm (search-path-environment-variables): Add local 'files' variable. * tests/packages.scm ("--search-paths with pattern"): New test. Ludovic Courtès
2014-12-30Merge branch 'master' into core-updatesMark H Weaver
2014-12-29tests: Make the 'lint' tests slightly more concise....* tests/lint.scm (with-warnings): New macro. Replace all uses of 'call-with-warnings' with the corresponding 'with-warnings' form. Ludovic Courtès
2014-12-29tests: Factorize the 'dummy-package' macro....* guix/tests.scm (dummy-package): New macro. * tests/lint.scm (dummy-package): Remove. * tests/packages.scm (dummy-package): Remove. Ludovic Courtès
2014-12-29lint: Add tests for the 'home-page' checker....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. Ludovic Courtès
2014-12-27packages: Add 'file-type' field to 'search-path-specification'....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. Ludovic Courtès
2014-12-19syscalls: Add more procedures for network interfaces....* 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. Ludovic Courtès
2014-12-15tests: Use 'test-assertm' for profiles....* tests/profiles.scm (test-assertm): New macro. ("profile-derivation"): Use it instead of 'test-assert' + 'run-with-store'. Ludovic Courtès
2014-12-06guix: scripts: Parse $GUIX_BUILD_OPTIONS separately....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> nebuli
2014-11-30guix: scripts: Add GUIX_BUILD_OPTIONS environment handling....* 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> nebuli
2014-11-10syscalls: Add 'mount-points'....* guix/build/syscalls.scm (mount-points): New procedure. * tests/syscalls.scm ("mount-points"): New test. Ludovic Courtès
2014-11-07lint: Allow synopses that start with an abbreviation....* 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. Ludovic Courtès
2014-11-07lint: Improve check for synopses starting with package name....* 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. Ludovic Courtès
2014-11-07lint: Simplify no-warnings tests....* 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. Ludovic Courtès
2014-11-06tests: Avoid Bash extension in 'tests/guix-lint.sh'....* tests/guix-lint.sh: Remove redundant and non-portable 'export'. Ludovic Courtès
2014-11-04tests: When a store item is to be deleted, make it statistically unique....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. Ludovic Courtès
2014-11-04store: Invalidate caches once GC has run....* 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. Ludovic Courtès
2014-11-03packages: 'package-transitive-supported-systems' accounts for indirect deps....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. Ludovic Courtès
2014-11-02packages: Implement grafts....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. Ludovic Courtès
2014-11-02packages: Add 'package->bag' test for propagated inputs....* tests/packages.scm ("package->bag, propagated inputs"): New test. Ludovic Courtès
2014-11-02derivations: Add 'derivation-name'....* guix/derivations.scm (derivation-name): New procedure. * tests/derivations.scm ("derivation-name"): New test. Ludovic Courtès
2014-10-29derivations: Fix 'derivation-prerequisites-to-build' when #:local-build?....* guix/derivations.scm (derivation-prerequisites-to-build)[derivation-substitutable?]: Call 'substitutable-derivation?'. <body>: When 'substitutable-derivation?' returns #f, add DRV to BUILD. Ludovic Courtès
2014-10-29tests: Move some of the narinfo test tools to (guix tests)....* 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. Ludovic Courtès
2014-10-29derivations: Add 'offloadable-derivation?' and 'substitutable-derivation?'....* guix/derivations.scm (offloadable-derivation?, substitutable-derivation?): New procedures. * tests/derivations.scm ("offloadable-derivation?"): New test. Ludovic Courtès
2014-10-28build: Adjust lint tests for latest rules....* tests/guix-lint.sh (dummy)[description]: Add failing case. [doc]: Adjust. Eric Bavier
2014-10-26guix: lint: Make exception for package name starting description....* guix/scripts/lint.scm (check-description-style): Exception for upper-case rule if the description starts with the package name. * tests/lint.scm: Test it. Eric Bavier
2014-10-26guix: lint: Allow digits at start of synopsis or description....* guix/scripts/lint.scm (start-with-capital-letter?): Rename too... (properly-starts-sentence?): Rewrite with regex and add digits. (check-description-style, check-synopsis-style): Use it. * tests/lint.scm: Add tests. Eric Bavier