mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
tests: Remove extraneous 'with-store' in derivations test.
* tests/derivations.scm ("derivation fails but keep going"): Remove extraneous 'with-store'. Change-Id: If30c2d457504b8524cd167f1a145fbbea61b513c Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
0bda75dd47
commit
aea511df93
1 changed files with 22 additions and 23 deletions
|
@ -150,29 +150,28 @@
|
||||||
(test-assert "derivation fails but keep going"
|
(test-assert "derivation fails but keep going"
|
||||||
;; In keep-going mode, 'build-derivations' should fail because of D1, but it
|
;; In keep-going mode, 'build-derivations' should fail because of D1, but it
|
||||||
;; must return only after D2 has succeeded.
|
;; must return only after D2 has succeeded.
|
||||||
(with-store store
|
(let* ((d1 (derivation %store "fails"
|
||||||
(let* ((d1 (derivation %store "fails"
|
%bash `("-c" "false")
|
||||||
%bash `("-c" "false")
|
#:sources (list %bash)))
|
||||||
#:sources (list %bash)))
|
(d2 (build-expression->derivation %store "sleep-then-succeed"
|
||||||
(d2 (build-expression->derivation %store "sleep-then-succeed"
|
`(begin
|
||||||
`(begin
|
,(random-text)
|
||||||
,(random-text)
|
;; XXX: Hopefully that's long
|
||||||
;; XXX: Hopefully that's long
|
;; enough that D1 has already
|
||||||
;; enough that D1 has already
|
;; failed.
|
||||||
;; failed.
|
(sleep 2)
|
||||||
(sleep 2)
|
(mkdir %output)))))
|
||||||
(mkdir %output)))))
|
(set-build-options %store
|
||||||
(set-build-options %store
|
#:use-substitutes? #f
|
||||||
#:use-substitutes? #f
|
#:keep-going? #t)
|
||||||
#:keep-going? #t)
|
(guard (c ((store-protocol-error? c)
|
||||||
(guard (c ((store-protocol-error? c)
|
(and (= 100 (store-protocol-error-status c))
|
||||||
(and (= 100 (store-protocol-error-status c))
|
(string-contains (store-protocol-error-message c)
|
||||||
(string-contains (store-protocol-error-message c)
|
(derivation-file-name d1))
|
||||||
(derivation-file-name d1))
|
(not (valid-path? %store (derivation->output-path d1)))
|
||||||
(not (valid-path? %store (derivation->output-path d1)))
|
(valid-path? %store (derivation->output-path d2)))))
|
||||||
(valid-path? %store (derivation->output-path d2)))))
|
(build-derivations %store (list d1 d2))
|
||||||
(build-derivations %store (list d1 d2))
|
#f)))
|
||||||
#f))))
|
|
||||||
|
|
||||||
(test-assert "identical files are deduplicated"
|
(test-assert "identical files are deduplicated"
|
||||||
;; Note: DATA must be longer than %DEDUPLICATION-MINIMUM-SIZE.
|
;; Note: DATA must be longer than %DEDUPLICATION-MINIMUM-SIZE.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue