diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-22 15:00:53 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-23 00:23:12 +0100 |
commit | d26e19671e2a50a25d37357aba301bef5df1818e (patch) | |
tree | 4b3c6fd70004e12d7ffb2acc5c137cf72dbe4bf5 /tests/derivations.scm | |
parent | 6985335faaa23965887b62ce8123f8f12e352bd5 (diff) |
derivations: Raise an error when a module file is not found.
Suggested by Jookia.
* guix/derivations.scm (&file-search-error): New error condition.
(search-path*): Raise it when 'search-path' returns #f.
* guix/gexp.scm (search-path*): Remove.
* guix/ui.scm (call-with-error-handling): Add case for
'file-search-error?'.
* tests/derivations.scm ("build-expression->derivation and invalid
module name"): New test.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 4d3b82fe1a..a52142e0f1 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -570,6 +570,15 @@ (test-skip (if (%guile-for-build) 0 8)) +(test-equal "build-expression->derivation and invalid module name" + '(file-search-error "guix/module/that/does/not/exist.scm") + (guard (c ((file-search-error? c) + (list 'file-search-error + (file-search-error-file-name c)))) + (build-expression->derivation %store "foo" #t + #:modules '((guix module that + does not exist))))) + (test-assert "build-expression->derivation and derivation-prerequisites" (let ((drv (build-expression->derivation %store "fail" #f))) (any (match-lambda |