tests: Add system tests for each supported kernel version.
* gnu/tests/base.scm (%test-basic-os): Rename to ... (test-basic-os): ... this, and turn into procedure that takes optional KERNEL argument. (%test-basic-os): Use that procedure. (%test-linux-libre-5.15, %test-linux-libre-5.10, %test-linux-libre-5.4, %test-linux-libre-4.19, %test-linux-libre-4.14, %test-linux-libre-4.9): New tests.
This commit is contained in:
parent
9fc171b62a
commit
2c1b488d19
1 changed files with 41 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
|
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -46,10 +47,17 @@
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
#:use-module ((srfi srfi-1) #:hide (partition))
|
#:use-module ((srfi srfi-1) #:hide (partition))
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:export (run-basic-test
|
#:export (run-basic-test
|
||||||
%test-basic-os
|
%test-basic-os
|
||||||
|
%test-linux-libre-5.15
|
||||||
|
%test-linux-libre-5.10
|
||||||
|
%test-linux-libre-5.4
|
||||||
|
%test-linux-libre-4.19
|
||||||
|
%test-linux-libre-4.14
|
||||||
|
%test-linux-libre-4.9
|
||||||
%test-halt
|
%test-halt
|
||||||
%test-root-unmount
|
%test-root-unmount
|
||||||
%test-cleanup
|
%test-cleanup
|
||||||
|
@ -533,15 +541,20 @@ info --version")
|
||||||
|
|
||||||
(gexp->derivation name test))
|
(gexp->derivation name test))
|
||||||
|
|
||||||
(define %test-basic-os
|
(define* (test-basic-os #:optional (kernel linux-libre))
|
||||||
(system-test
|
(system-test
|
||||||
(name "basic")
|
(name (if (eq? kernel linux-libre)
|
||||||
|
"basic"
|
||||||
|
(string-append (package-name kernel) "-"
|
||||||
|
(version-major+minor (package-version kernel)))))
|
||||||
(description
|
(description
|
||||||
"Instrument %SIMPLE-OS, run it in a VM, and run a series of basic
|
"Instrument %SIMPLE-OS, run it in a VM, and run a series of basic
|
||||||
functionality tests.")
|
functionality tests, using the given KERNEL.")
|
||||||
(value
|
(value
|
||||||
(let* ((os (marionette-operating-system
|
(let* ((os (marionette-operating-system
|
||||||
%simple-os
|
(operating-system
|
||||||
|
(inherit %simple-os)
|
||||||
|
(kernel kernel))
|
||||||
#:imported-modules '((gnu services herd)
|
#:imported-modules '((gnu services herd)
|
||||||
(guix combinators))))
|
(guix combinators))))
|
||||||
(vm (virtual-machine os)))
|
(vm (virtual-machine os)))
|
||||||
|
@ -549,7 +562,30 @@ functionality tests.")
|
||||||
;; set of services as the OS produced by
|
;; set of services as the OS produced by
|
||||||
;; 'system-qemu-image/shared-store-script'.
|
;; 'system-qemu-image/shared-store-script'.
|
||||||
(run-basic-test (virtualized-operating-system os '())
|
(run-basic-test (virtualized-operating-system os '())
|
||||||
#~(list #$vm))))))
|
#~(list #$vm)
|
||||||
|
name)))))
|
||||||
|
|
||||||
|
(define %test-basic-os
|
||||||
|
(test-basic-os))
|
||||||
|
|
||||||
|
;; Ensure the LTS kernels are up to snuff, too.
|
||||||
|
(define %test-linux-libre-5.15
|
||||||
|
(test-basic-os linux-libre-5.15))
|
||||||
|
|
||||||
|
(define %test-linux-libre-5.10
|
||||||
|
(test-basic-os linux-libre-5.10))
|
||||||
|
|
||||||
|
(define %test-linux-libre-5.4
|
||||||
|
(test-basic-os linux-libre-5.4))
|
||||||
|
|
||||||
|
(define %test-linux-libre-4.19
|
||||||
|
(test-basic-os linux-libre-4.19))
|
||||||
|
|
||||||
|
(define %test-linux-libre-4.14
|
||||||
|
(test-basic-os linux-libre-4.14))
|
||||||
|
|
||||||
|
(define %test-linux-libre-4.9
|
||||||
|
(test-basic-os linux-libre-4.9))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Reference in a new issue