mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-20 14:47:20 +01:00
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'.
This commit is contained in:
parent
b0d388c9dc
commit
908935b512
1 changed files with 12 additions and 7 deletions
|
@ -79,10 +79,12 @@ (define marionette
|
||||||
|
|
||||||
(test-assert "uname"
|
(test-assert "uname"
|
||||||
(match (marionette-eval '(uname) marionette)
|
(match (marionette-eval '(uname) marionette)
|
||||||
(#("Linux" "komputilo" version _ "x86_64")
|
(#("Linux" host-name version _ "x86_64")
|
||||||
(string-prefix? #$(package-version
|
(and (string=? host-name
|
||||||
(operating-system-kernel os))
|
#$(operating-system-host-name os))
|
||||||
version))))
|
(string-prefix? #$(package-version
|
||||||
|
(operating-system-kernel os))
|
||||||
|
version)))))
|
||||||
|
|
||||||
(test-assert "shell and user commands"
|
(test-assert "shell and user commands"
|
||||||
;; Is everything in $PATH?
|
;; Is everything in $PATH?
|
||||||
|
@ -117,8 +119,7 @@ (define marionette
|
||||||
marionette)))
|
marionette)))
|
||||||
(lset= eq?
|
(lset= eq?
|
||||||
(pk 'services services)
|
(pk 'services services)
|
||||||
'(root #$@(operating-system-shepherd-service-names
|
'(root #$@(operating-system-shepherd-service-names os)))))
|
||||||
(virtualized-operating-system os '()))))))
|
|
||||||
|
|
||||||
(test-equal "login on tty1"
|
(test-equal "login on tty1"
|
||||||
"root\n"
|
"root\n"
|
||||||
|
@ -168,4 +169,8 @@ (define %test-basic-os
|
||||||
(guix combinators))))
|
(guix combinators))))
|
||||||
(run (system-qemu-image/shared-store-script
|
(run (system-qemu-image/shared-store-script
|
||||||
os #:graphic? #f)))
|
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))))
|
||||||
|
|
Loading…
Reference in a new issue