diff options
| author | David Elsing <david.elsing@posteo.net> | 2025-03-04 20:33:08 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-03-05 00:28:49 +0100 |
| commit | 30e51cb6b42e86f9f94d6380f69a1020ee99ff39 (patch) | |
| tree | 6bcf2847774381f7c3a102c1a0ae143ee97d9879 /gnu/tests.scm | |
| parent | 749eb1a2dd9fdf63a71f223b3f6756d9cb5940e6 (diff) | |
gexp: ‘with-parameters’ properly handles ‘%graft?’.
Fixes <https://issues.guix.gnu.org/75879>.
* .dir-locals.el (scheme-mode): Remove mparameterize indentation rules.
Add state-parameterize and store-parameterize indentation rules.
* etc/manifests/system-tests.scm (test-for-current-guix): Replace
mparameterize with store-parameterize.
* etc/manifests/time-travel.scm (guix-instance-compiler): Likewise.
* gnu/tests.scm (compile-system-test): Likewise.
* guix/gexp.scm (compile-parameterized): Use state-call-with-parameters.
* guix/monads.scm (mparameterize): Remove macro.
(state-call-with-parameters): New procedure.
(state-parameterize): New macro.
* guix/store.scm (store-parameterize): New macro.
* tests/gexp.scm ("with-parameters for %graft?"): New test.
* tests/monads.scm ("mparameterize"): Remove test.
("state-parameterize"): New test.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I0c74066ca3f37072815b073fb3039925488a9645
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/tests.scm')
| -rw-r--r-- | gnu/tests.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/tests.scm b/gnu/tests.scm index 2a9e51511f0..1e3dbf09445 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #:use-module (gnu services shepherd) | 34 | #:use-module (gnu services shepherd) |
| 35 | #:use-module (guix discovery) | 35 | #:use-module (guix discovery) |
| 36 | #:use-module (guix monads) | 36 | #:use-module (guix monads) |
| 37 | #:use-module ((guix store) #:select (%store-monad)) | 37 | #:use-module ((guix store) #:select (%store-monad store-parameterize)) |
| 38 | #:use-module ((guix utils) | 38 | #:use-module ((guix utils) |
| 39 | #:select (%current-system %current-target-system)) | 39 | #:select (%current-system %current-target-system)) |
| 40 | #:use-module (srfi srfi-1) | 40 | #:use-module (srfi srfi-1) |
| @@ -289,9 +289,9 @@ the system under test." | |||
| 289 | (define-gexp-compiler (compile-system-test (test <system-test>) | 289 | (define-gexp-compiler (compile-system-test (test <system-test>) |
| 290 | system target) | 290 | system target) |
| 291 | "Compile TEST to a derivation." | 291 | "Compile TEST to a derivation." |
| 292 | (mparameterize %store-monad ((%current-system system) | 292 | (store-parameterize ((%current-system system) |
| 293 | (%current-target-system target)) | 293 | (%current-target-system target)) |
| 294 | (system-test-value test))) | 294 | (system-test-value test))) |
| 295 | 295 | ||
| 296 | (define (test-modules) | 296 | (define (test-modules) |
| 297 | "Return the list of modules that define system tests." | 297 | "Return the list of modules that define system tests." |
