diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 22:34:13 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 23:50:46 +0200 |
commit | 98b65b5ff6b1dea0ad58b0f47dd163c32d0cbf6e (patch) | |
tree | 7aa29f770d1ff50aea95af404324061ec708cd03 /gnu/tests/install.scm | |
parent | 2a6ba870867e31a32faca0dbf0e062bf9f5c0d78 (diff) | |
download | patches-98b65b5ff6b1dea0ad58b0f47dd163c32d0cbf6e.tar patches-98b65b5ff6b1dea0ad58b0f47dd163c32d0cbf6e.tar.gz |
tests: Add a mechanism to describe and discover system tests.
* gnu/tests.scm (<system-test>): New record type.
(write-system-test, test-modules, fold-system-tests)
(all-system-tests): New procedures.
* gnu/tests/base.scm (%test-basic-os): Turn into a <system-test>.
* gnu/tests/install.scm (%test-installed-os): Likewise.
* build-aux/run-system-tests.scm (%system-tests): Remove.
(run-system-tests): Use 'all-system-tests'.
Diffstat (limited to 'gnu/tests/install.scm')
-rw-r--r-- | gnu/tests/install.scm | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 0b3950a212..c33919ba2f 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -185,21 +185,25 @@ reboot\n")) (define %test-installed-os - ;; Test basic functionality of an OS installed like one would do by hand. - ;; This test is expensive in terms of CPU and storage usage since we need to - ;; build (current-guix) and then store a couple of full system images. - (mlet %store-monad ((image (run-install)) - (system (current-system))) - (run-basic-test %minimal-os - #~(let ((image #$image)) - ;; First we need a writable copy of the image. - (format #t "copying image '~a'...~%" image) - (copy-file image "disk.img") - (chmod "disk.img" #o644) - (list (string-append #$qemu-minimal "/bin/" - #$(qemu-command system)) - "-enable-kvm" "-no-reboot" "-m" "256" - "-drive" "file=disk.img,if=virtio")) - "installed-os"))) + (system-test + (name "installed-os") + (description + "Test basic functionality of an OS installed like one would do by hand. +This test is expensive in terms of CPU and storage usage since we need to +build (current-guix) and then store a couple of full system images.") + (value + (mlet %store-monad ((image (run-install)) + (system (current-system))) + (run-basic-test %minimal-os + #~(let ((image #$image)) + ;; First we need a writable copy of the image. + (format #t "copying image '~a'...~%" image) + (copy-file image "disk.img") + (chmod "disk.img" #o644) + (list (string-append #$qemu-minimal "/bin/" + #$(qemu-command system)) + "-enable-kvm" "-no-reboot" "-m" "256" + "-drive" "file=disk.img,if=virtio")) + "installed-os"))))) ;;; install.scm ends here |