aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-12-19 16:23:56 +0000
committerJustus Winter <[email protected]>2016-12-19 16:23:56 +0000
commit0bf16d702665a269ce5ef724c927fbbd8f7f1ce9 (patch)
tree2c80b2f1787852c78eaf1c680e2dda6182841665
parentpo: Some updates to the German translation. (diff)
downloadgnupg-0bf16d702665a269ce5ef724c927fbbd8f7f1ce9.tar.gz
gnupg-0bf16d702665a269ce5ef724c927fbbd8f7f1ce9.zip
tests: Use sequential test runner if only one test is given.
* tests/openpgp/run-tests.scm: Use sequential test runner if only one test is given. -- This allows one to set the environment variable TESTFLAGS to '--parallel' and enjoy faster test execution times without interfering with stdio when one works on a single test. Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--tests/openpgp/run-tests.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index 414641199..546d7d497 100644
--- a/tests/openpgp/run-tests.scm
+++ b/tests/openpgp/run-tests.scm
@@ -26,9 +26,10 @@
;; Set objdir so that the tests can locate built programs.
(setenv "objdir" (getcwd) #f)
-(let* ((runner (if (member "--parallel" *args*)
+(let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
+ (runner (if (and (member "--parallel" *args*)
+ (> (length tests) 1))
run-tests-parallel
- run-tests-sequential))
- (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*)))
+ run-tests-sequential)))
(runner (test::scm "setup.scm" "setup.scm")
(map (lambda (t) (test::scm t t)) tests)))