summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
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
2014-10-26guix: lint: Check for empty synopses and descriptions....* guix/scripts/lint.scm (check-description-style, check-synopsis-style): New emptiness checks. * tests/lint.scm: Test them. Eric Bavier
2014-10-26guix: lint: Check for proper end-of-sentence space....* guix/scripts/lint.scm (start-with-capital-letter?): Handle empty strings. (check-description-style): New check for end-of-sentence space. * tests/lint.scm: Test it. Eric Bavier
2014-10-17packages: Add 'package-transitive-supported-systems'....* guix/packages.scm (package-transitive-supported-systems): New procedure. * tests/packages.scm ("package-transitive-supported-systems"): New test. * build-aux/hydra/gnu-system.scm (package->job): Use it. Ludovic Courtès
2014-10-17derivations: Introduce 'graft' record type....* guix/derivations.scm (<graft>): New record type. (graft-derivation): Rename 'replacements' to 'grafts', and expect it to be a list of <graft> records. Adjust accordingly. * tests/derivations.scm ("graft-derivation"): Use 'graft' instead of pairs in argument to 'graft-derivation'. Ludovic Courtès
2014-10-16guix lint: add the --checkers option....* guix/scripts/lint.scm: add the "--checkers" option. * doc/guix.texi (Invoking guix lint): Document it. * tests/guix-lint.sh: New file * Makefile.am (SCM_TESTS): Add it. Cyril Roelandt
2014-10-12guix package: Add '--switch-generation' option....* guix/scripts/package.scm (switch-to-generation): New procedure. (switch-to-previous-generation): Use it. (guix-package): Adjust for '--switch-generation' option. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it. Alex Kost
2014-10-12syscalls: Accept ENOENT in the 'swapoff' test....Fixes <http://bugs.gnu.org/18690>. Reported by Philip Woods <elzairthesorcerer@gmail.com>. * tests/syscalls.scm ("swapoff, EINVAL/EPERM"): Rename to... ("swapoff, ENOENT/EINVAL/EPERM"): ... this. Add ENOENT to the list of possible return values. Ludovic Courtès
2014-10-10build: Make sure tests/guix-package.sh doesn't leave anything behind it....Fixes a regression introduced in commit 300868ba. * tests/guix-package.sh: Move 'module_dir' definition to the top, and "rm -rf" it from the top-most 'trap'. Remove second use of 'trap'. Ludovic Courtès
2014-10-10ui: Move 'show-manifest-transaction' from (guix profiles)....* guix/profiles.scm: Do not use (guix ui) module. (right-arrow, manifest-show-transaction): Move and rename to... * guix/ui.scm (right-arrow, show-manifest-transaction): ... here. * tests/profiles.scm ("manifest-show-transaction"): Move to... * tests/ui.scm ("show-manifest-transaction"): ... here. (guile-1.8.8, guile-2.0.9): New variables. * emacs/guix-main.scm (process-package-actions): Rename 'manifest-show-transaction' to 'show-manifest-transaction'. * guix/scripts/package.scm (guix-package): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Alex Kost