tests: Fix max-silent-time test.
* tests/derivations.scm ("build-expression->derivation and max-silent-time"): Use STORE instead of %STORE. Change BUILDER to succeed by default. Return #f when no exception is raised.
This commit is contained in:
parent
bde2d9cf8d
commit
01e82af55f
|
@ -419,8 +419,8 @@
|
||||||
(let* ((store (let ((s (open-connection)))
|
(let* ((store (let ((s (open-connection)))
|
||||||
(set-build-options s #:max-silent-time 1)
|
(set-build-options s #:max-silent-time 1)
|
||||||
s))
|
s))
|
||||||
(builder '(sleep 100))
|
(builder '(begin (sleep 100) (mkdir %output) #t))
|
||||||
(drv (build-expression->derivation %store "silent"
|
(drv (build-expression->derivation store "silent"
|
||||||
(%current-system)
|
(%current-system)
|
||||||
builder '()))
|
builder '()))
|
||||||
(out-path (derivation->output-path drv)))
|
(out-path (derivation->output-path drv)))
|
||||||
|
@ -428,7 +428,8 @@
|
||||||
(and (string-contains (nix-protocol-error-message c)
|
(and (string-contains (nix-protocol-error-message c)
|
||||||
"failed")
|
"failed")
|
||||||
(not (valid-path? store out-path)))))
|
(not (valid-path? store out-path)))))
|
||||||
(build-derivations %store (list drv)))))
|
(build-derivations store (list drv))
|
||||||
|
#f)))
|
||||||
|
|
||||||
(test-assert "build-expression->derivation and derivation-prerequisites-to-build"
|
(test-assert "build-expression->derivation and derivation-prerequisites-to-build"
|
||||||
(let ((drv (build-expression->derivation %store "fail" (%current-system)
|
(let ((drv (build-expression->derivation %store "fail" (%current-system)
|
||||||
|
|
Loading…
Reference in New Issue