diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-17 14:35:07 +0000 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-02-22 23:55:24 +0900 |
| commit | aea511df9333b6b9cd441b11cd221176af0e14b9 (patch) | |
| tree | dfbee1f677a74e0ee6d494956c245c6c2eff00ff /tests/derivations.scm | |
| parent | 0bda75dd471a0fcc7c1e34d9a2fa1fb2faf1afda (diff) | |
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>
Diffstat (limited to 'tests/derivations.scm')
| -rw-r--r-- | tests/derivations.scm | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index efcd21f324e..72ea9aa9ccb 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm | |||
| @@ -150,29 +150,28 @@ | |||
| 150 | (test-assert "derivation fails but keep going" | 150 | (test-assert "derivation fails but keep going" |
| 151 | ;; In keep-going mode, 'build-derivations' should fail because of D1, but it | 151 | ;; In keep-going mode, 'build-derivations' should fail because of D1, but it |
| 152 | ;; must return only after D2 has succeeded. | 152 | ;; must return only after D2 has succeeded. |
| 153 | (with-store store | 153 | (let* ((d1 (derivation %store "fails" |
| 154 | (let* ((d1 (derivation %store "fails" | 154 | %bash `("-c" "false") |
| 155 | %bash `("-c" "false") | 155 | #:sources (list %bash))) |
| 156 | #:sources (list %bash))) | 156 | (d2 (build-expression->derivation %store "sleep-then-succeed" |
| 157 | (d2 (build-expression->derivation %store "sleep-then-succeed" | 157 | `(begin |
| 158 | `(begin | 158 | ,(random-text) |
| 159 | ,(random-text) | 159 | ;; XXX: Hopefully that's long |
| 160 | ;; XXX: Hopefully that's long | 160 | ;; enough that D1 has already |
| 161 | ;; enough that D1 has already | 161 | ;; failed. |
| 162 | ;; failed. | 162 | (sleep 2) |
| 163 | (sleep 2) | 163 | (mkdir %output))))) |
| 164 | (mkdir %output))))) | 164 | (set-build-options %store |
| 165 | (set-build-options %store | 165 | #:use-substitutes? #f |
| 166 | #:use-substitutes? #f | 166 | #:keep-going? #t) |
| 167 | #:keep-going? #t) | 167 | (guard (c ((store-protocol-error? c) |
| 168 | (guard (c ((store-protocol-error? c) | 168 | (and (= 100 (store-protocol-error-status c)) |
| 169 | (and (= 100 (store-protocol-error-status c)) | 169 | (string-contains (store-protocol-error-message c) |
| 170 | (string-contains (store-protocol-error-message c) | 170 | (derivation-file-name d1)) |
| 171 | (derivation-file-name d1)) | 171 | (not (valid-path? %store (derivation->output-path d1))) |
| 172 | (not (valid-path? %store (derivation->output-path d1))) | 172 | (valid-path? %store (derivation->output-path d2))))) |
| 173 | (valid-path? %store (derivation->output-path d2))))) | 173 | (build-derivations %store (list d1 d2)) |
| 174 | (build-derivations %store (list d1 d2)) | 174 | #f))) |
| 175 | #f)))) | ||
| 176 | 175 | ||
| 177 | (test-assert "identical files are deduplicated" | 176 | (test-assert "identical files are deduplicated" |
| 178 | ;; Note: DATA must be longer than %DEDUPLICATION-MINIMUM-SIZE. | 177 | ;; Note: DATA must be longer than %DEDUPLICATION-MINIMUM-SIZE. |
