From 98b65b5ff6b1dea0ad58b0f47dd163c32d0cbf6e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 20 Jun 2016 22:34:13 +0200 Subject: tests: Add a mechanism to describe and discover system tests. * gnu/tests.scm (): 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 . * gnu/tests/install.scm (%test-installed-os): Likewise. * build-aux/run-system-tests.scm (%system-tests): Remove. (run-system-tests): Use 'all-system-tests'. --- build-aux/run-system-tests.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'build-aux/run-system-tests.scm') diff --git a/build-aux/run-system-tests.scm b/build-aux/run-system-tests.scm index 4ce9b83fed..f7c99def23 100644 --- a/build-aux/run-system-tests.scm +++ b/build-aux/run-system-tests.scm @@ -17,8 +17,7 @@ ;;; along with GNU Guix. If not, see . (define-module (run-system-tests) - #:use-module (gnu tests base) - #:use-module (gnu tests install) + #:use-module (gnu tests) #:use-module (guix store) #:use-module (guix monads) #:use-module (guix derivations) @@ -45,14 +44,16 @@ lst) (lift1 reverse %store-monad)))) -(define %system-tests - (list %test-basic-os - %test-installed-os)) - (define (run-system-tests . args) + (define tests + (all-system-tests)) + + (format (current-error-port) "Running ~a system tests...~%" + (length tests)) + (with-store store (run-with-store store - (mlet* %store-monad ((drv (sequence %store-monad %system-tests)) + (mlet* %store-monad ((drv (mapm %store-monad system-test-value tests)) (out -> (map derivation->output-path drv))) (mbegin %store-monad (show-what-to-build* drv) -- cgit v1.2.3