guix-commits
[Top][All Lists]
Advanced

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

01/08: tests: base: Fully honor the OS passed to 'run-basic-test'.


From: Ludovic Courtès
Subject: 01/08: tests: base: Fully honor the OS passed to 'run-basic-test'.
Date: Mon, 20 Jun 2016 21:51:01 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 908935b512c1c22839eef201ff80d0bdef093962
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jun 20 21:39:23 2016 +0200

    tests: base: Fully honor the OS passed to 'run-basic-test'.
    
    * gnu/tests/base.scm (run-basic-test)["uname"]: Use the host name of OS.
    ["shepherd services"]: Use service names from OS.
    (%test-basic-os): Add call to 'virtualized-operating-system'.
---
 gnu/tests/base.scm |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index ee342ed..b417bc4 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -79,10 +79,12 @@ properties of running system to what's declared in OS, an 
<operating-system>."
 
         (test-assert "uname"
           (match (marionette-eval '(uname) marionette)
-            (#("Linux" "komputilo" version _ "x86_64")
-             (string-prefix? #$(package-version
-                                (operating-system-kernel os))
-                             version))))
+            (#("Linux" host-name version _ "x86_64")
+             (and (string=? host-name
+                            #$(operating-system-host-name os))
+                  (string-prefix? #$(package-version
+                                     (operating-system-kernel os))
+                                  version)))))
 
         (test-assert "shell and user commands"
           ;; Is everything in $PATH?
@@ -117,8 +119,7 @@ info --version")
                                            marionette)))
             (lset= eq?
                    (pk 'services services)
-                   '(root #$@(operating-system-shepherd-service-names
-                              (virtualized-operating-system os '()))))))
+                   '(root #$@(operating-system-shepherd-service-names os)))))
 
         (test-equal "login on tty1"
           "root\n"
@@ -168,4 +169,8 @@ info --version")
                                                     (guix combinators))))
                        (run   (system-qemu-image/shared-store-script
                                os #:graphic? #f)))
-    (run-basic-test os #~(list #$run))))
+    ;; XXX: Add call to 'virtualized-operating-system' to get the exact same
+    ;; set of services as the OS produced by
+    ;; 'system-qemu-image/shared-store-script'.
+    (run-basic-test (virtualized-operating-system os '())
+                    #~(list #$run))))



reply via email to

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