mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
tests: Add system installation test.
* gnu/tests.scm (define-os-with-source): New macro. * gnu/tests/install.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * build-aux/run-system-tests.scm (%system-tests): Likewise.
This commit is contained in:
parent
b1dd6ac55d
commit
94b4274d0d
4 changed files with 231 additions and 3 deletions
|
@ -22,7 +22,8 @@
|
|||
#:use-module (gnu services)
|
||||
#:use-module (gnu services shepherd)
|
||||
#:export (marionette-service-type
|
||||
marionette-operating-system))
|
||||
marionette-operating-system
|
||||
define-os-with-source))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
|
@ -127,4 +128,23 @@ in a virtual machine--i.e., controlled from the host system."
|
|||
(services (cons (service marionette-service-type imported-modules)
|
||||
(operating-system-user-services os)))))
|
||||
|
||||
(define-syntax define-os-with-source
|
||||
(syntax-rules (use-modules operating-system)
|
||||
"Define two variables: OS containing the given operating system, and
|
||||
SOURCE containing the source to define OS as an sexp.
|
||||
|
||||
This is convenient when we need both the <operating-system> object so we can
|
||||
instantiate it, and the source to create it so we can store in in a file in
|
||||
the system under test."
|
||||
((_ (os source)
|
||||
(use-modules modules ...)
|
||||
(operating-system fields ...))
|
||||
(begin
|
||||
(define os
|
||||
(operating-system fields ...))
|
||||
(define source
|
||||
'(begin
|
||||
(use-modules modules ...)
|
||||
(operating-system fields ...)))))))
|
||||
|
||||
;;; tests.scm ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue