[bug#55231,v7,3/4] tests: Remove extraneous 'with-store' in derivations test.

Message ID eaa4e9797601f1da7a63e637483c0bb8daa2b595.1739802789.git.morgan.arnold@proton.me
State New
Headers
Series [bug#55231,v7,1/4] Allow copying of out-of-tree modules to the Linux initrd. |

Commit Message

Morgan Arnold Feb. 17, 2025, 2:35 p.m. UTC
  From: Maxim Cournoyer <maxim.cournoyer@gmail.com>

* tests/derivations.scm ("derivation fails but keep going"): Remove extraneous
'with-store'.

Change-Id: If30c2d457504b8524cd167f1a145fbbea61b513c
---
 tests/derivations.scm | 45 +++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)
  

Patch

diff --git a/tests/derivations.scm b/tests/derivations.scm
index efcd21f..72ea9aa 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -150,29 +150,28 @@  (define* (directory-contents dir #:optional (slurp get-bytevector-all))
 (test-assert "derivation fails but keep going"
   ;; In keep-going mode, 'build-derivations' should fail because of D1, but it
   ;; must return only after D2 has succeeded.
-  (with-store store
-    (let* ((d1 (derivation %store "fails"
-                           %bash `("-c" "false")
-                           #:sources (list %bash)))
-           (d2 (build-expression->derivation %store "sleep-then-succeed"
-                                             `(begin
-                                                ,(random-text)
-                                                ;; XXX: Hopefully that's long
-                                                ;; enough that D1 has already
-                                                ;; failed.
-                                                (sleep 2)
-                                                (mkdir %output)))))
-      (set-build-options %store
-                         #:use-substitutes? #f
-                         #:keep-going? #t)
-      (guard (c ((store-protocol-error? c)
-                 (and (= 100 (store-protocol-error-status c))
-                      (string-contains (store-protocol-error-message c)
-                                       (derivation-file-name d1))
-                      (not (valid-path? %store (derivation->output-path d1)))
-                      (valid-path? %store (derivation->output-path d2)))))
-        (build-derivations %store (list d1 d2))
-        #f))))
+  (let* ((d1 (derivation %store "fails"
+                         %bash `("-c" "false")
+                         #:sources (list %bash)))
+         (d2 (build-expression->derivation %store "sleep-then-succeed"
+                                           `(begin
+                                              ,(random-text)
+                                              ;; XXX: Hopefully that's long
+                                              ;; enough that D1 has already
+                                              ;; failed.
+                                              (sleep 2)
+                                              (mkdir %output)))))
+    (set-build-options %store
+                       #:use-substitutes? #f
+                       #:keep-going? #t)
+    (guard (c ((store-protocol-error? c)
+               (and (= 100 (store-protocol-error-status c))
+                    (string-contains (store-protocol-error-message c)
+                                     (derivation-file-name d1))
+                    (not (valid-path? %store (derivation->output-path d1)))
+                    (valid-path? %store (derivation->output-path d2)))))
+      (build-derivations %store (list d1 d2))
+      #f)))
 
 (test-assert "identical files are deduplicated"
   ;; Note: DATA must be longer than %DEDUPLICATION-MINIMUM-SIZE.