GNU bug report logs - #76488
[PATCH 0/4] Test installation on Debian

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sat, 22 Feb 2025 17:09:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 76488 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#76488] [PATCH v2 1/4] tests: Export ‘marionette-program’.
Date: Mon, 24 Feb 2025 13:45:48 +0100
* gnu/tests.scm (%default-marionette-device): New variable.
(<marionette-configuration>)[device]: Use it.
(marionette-program): Make all parameters optional and export.

Change-Id: I496d88253b5ebad60da09a0cca5ed960aa2ab389
---
 gnu/tests.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/tests.scm b/gnu/tests.scm
index 2a9e51511f0..da0b0146ea7 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016-2020, 2022-2024 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2016-2020, 2022-2025 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
@@ -48,6 +48,7 @@ (define-module (gnu tests)
 
             marionette-service-type
             marionette-operating-system
+            marionette-program
             define-os-with-source
 
             %simple-os
@@ -72,11 +73,15 @@ (define-module (gnu tests)
 ;;;
 ;;; Code:
 
+(define %default-marionette-device
+  ;; Default marionette device in the guest.
+  "/dev/virtio-ports/org.gnu.guix.port.0")
+
 (define-record-type* <marionette-configuration>
   marionette-configuration make-marionette-configuration
   marionette-configuration?
   (device           marionette-configuration-device ;string
-                    (default "/dev/virtio-ports/org.gnu.guix.port.0"))
+                    (default %default-marionette-device))
   (imported-modules marionette-configuration-imported-modules
                     (default '()))
   (extensions       marionette-configuration-extensions
@@ -92,7 +97,10 @@ (define-syntax-rule (with-imported-modules-and-extensions imported-modules
     (with-extensions extensions
       gexp)))
 
-(define (marionette-program device imported-modules extensions)
+(define* (marionette-program #:optional
+                             (device %default-marionette-device)
+                             (imported-modules '())
+                             (extensions '()))
   "Return the program that runs the marionette REPL on DEVICE.  Ensure
 IMPORTED-MODULES and EXTENSIONS are accessible from the REPL."
   (define code
-- 
2.48.1





This bug report was last modified 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.