guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/06: tests: Honor system and target when lowering <system-test>.


From: guix-commits
Subject: 01/06: tests: Honor system and target when lowering <system-test>.
Date: Sun, 5 Nov 2023 17:26:16 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 0c695bbf8dbd5a5c1224f331a78b6316bc16e4d1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Nov 4 01:11:48 2023 +0100

    tests: Honor system and target when lowering <system-test>.
    
    * gnu/tests.scm (compile-system-test): Wrap ‘system-test-value’ call in
    ‘mparameterize’.
    
    Change-Id: I4be28913a86f43059b0886ad2fcf81a9c699b730
---
 gnu/tests.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/tests.scm b/gnu/tests.scm
index 96ecb40ea2..5ff9db82fc 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -33,6 +33,10 @@
   #:use-module (gnu services base)
   #:use-module (gnu services shepherd)
   #:use-module (guix discovery)
+  #:use-module (guix monads)
+  #:use-module ((guix store) #:select (%store-monad))
+  #:use-module ((guix utils)
+                #:select (%current-system %current-target-system))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (ice-9 match)
@@ -284,8 +288,9 @@ the system under test."
 (define-gexp-compiler (compile-system-test (test <system-test>)
                                            system target)
   "Compile TEST to a derivation."
-  ;; XXX: SYSTEM and TARGET are ignored.
-  (system-test-value test))
+  (mparameterize %store-monad ((%current-system system)
+                               (%current-target-system target))
+    (system-test-value test)))
 
 (define (test-modules)
   "Return the list of modules that define system tests."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]