[Pkg-gnupg-commit] [gnupg2] 159/180: tests: Use sequential test runner if only one test is given.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 22:29:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 0bf16d702665a269ce5ef724c927fbbd8f7f1ce9
Author: Justus Winter <justus at g10code.com>
Date:   Mon Dec 19 17:23:56 2016 +0100

    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 <justus at g10code.com>
---
 tests/openpgp/run-tests.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index 4146411..546d7d4 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)))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list