aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-20 22:53:22 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-20 23:50:46 +0200
commitde7e0e8ee07803f1cb7521f51d0f14e487182658 (patch)
tree59f1c619d4ffb4cb98f018d49faec5cbd200871c
parent98b65b5ff6b1dea0ad58b0f47dd163c32d0cbf6e (diff)
downloadguix-de7e0e8ee07803f1cb7521f51d0f14e487182658.tar
guix-de7e0e8ee07803f1cb7521f51d0f14e487182658.tar.gz
build: 'make check-system' now honors $TESTS.
* build-aux/run-system-tests.scm (run-system-tests)[tests]: Honor the 'TESTS' environment variable.
-rw-r--r--build-aux/run-system-tests.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/build-aux/run-system-tests.scm b/build-aux/run-system-tests.scm
index f7c99def23..3f3a70e7b4 100644
--- a/build-aux/run-system-tests.scm
+++ b/build-aux/run-system-tests.scm
@@ -24,6 +24,7 @@
#: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)
@@ -46,7 +47,17 @@
(define (run-system-tests . args)
(define tests
- (all-system-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))