aboutsummaryrefslogtreecommitdiff
path: root/build-aux/run-system-tests.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-27 09:30:01 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-27 09:30:01 +0200
commit01497dfe6c0a2ce69287d0fd0008747965a000df (patch)
treef7f6f53baf6e81a8bce26144c550da3bf4b9df5c /build-aux/run-system-tests.scm
parent74c8b174e8015de753ba5cab44f76f944e6fd4ba (diff)
downloadgnu-guix-01497dfe6c0a2ce69287d0fd0008747965a000df.tar
gnu-guix-01497dfe6c0a2ce69287d0fd0008747965a000df.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux/run-system-tests.scm')
-rw-r--r--build-aux/run-system-tests.scm24
1 files changed, 19 insertions, 5 deletions
diff --git a/build-aux/run-system-tests.scm b/build-aux/run-system-tests.scm
index e98de9cb7e..3f3a70e7b4 100644
--- a/build-aux/run-system-tests.scm
+++ b/build-aux/run-system-tests.scm
@@ -17,13 +17,14 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (run-system-tests)
- #:use-module (gnu tests base)
+ #:use-module (gnu tests)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix ui)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
+ #:use-module (ice-9 match)
#:export (run-system-tests))
(define (built-derivations* drv)
@@ -44,13 +45,26 @@
lst)
(lift1 reverse %store-monad))))
-(define %system-tests
- (list %test-basic-os))
-
(define (run-system-tests . args)
+ (define tests
+ ;; Honor the 'TESTS' environment variable so that one can select a subset
+ ;; of tests to run in the usual way:
+ ;;
+ ;; make check-system TESTS=installed-os
+ (match (getenv "TESTS")
+ (#f
+ (all-system-tests))
+ ((= string-tokenize (tests ...))
+ (filter (lambda (test)
+ (member (system-test-name test) 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)