diff options
author | NIIBE Yutaka <[email protected]> | 2022-04-26 03:54:07 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-04-26 03:54:07 +0000 |
commit | ba2f2085a95be47a06ac6ba75a4c7def7c6599b2 (patch) | |
tree | a993e284c6eb12ec5765d13e3cfdfea595d69342 /tests/openpgp | |
parent | dirmngr: Fix for C90 compiler. (diff) | |
download | gnupg-ba2f2085a95be47a06ac6ba75a4c7def7c6599b2.tar.gz gnupg-ba2f2085a95be47a06ac6ba75a4c7def7c6599b2.zip |
tests: Support single invocation with variant.
* tests/openpgp/run-tests.scm: Add GPGSCM_TEST_VARIANT support.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'tests/openpgp')
-rw-r--r-- | tests/openpgp/run-tests.scm | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm index d4914bda7..76432b736 100644 --- a/tests/openpgp/run-tests.scm +++ b/tests/openpgp/run-tests.scm @@ -32,11 +32,33 @@ (path-join "tests" "openpgp" "setup.scm") (in-srcdir "tests" "openpgp" "setup.scm")))) +(define (qualify path variant) + (string-append "<" variant ">" path)) + +(define (setup* variant) + (make-environment-cache + (test::scm + #f + (qualify (path-join "tests" "openpgp" "setup.scm") variant) + (in-srcdir "tests" "openpgp" "setup.scm") + (string-append "--" variant)))) + +(define setup-use-keyboxd (setup* "use-keyboxd")) +(define use-keyboxd? (or (string=? "--use-keyboxd" (car *args*)) + (string=? "keyboxd" (getenv "GPGSCM_TEST_VARIANT")))) + (define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*)) (run-tests (if (null? tests) (load-tests "tests" "openpgp") - (map (lambda (name) - (test::scm setup - (path-join "tests" "openpgp" name) - (in-srcdir "tests" "openpgp" name))) tests))) + (if use-keyboxd? + (map (lambda (name) + (test::scm setup-use-keyboxd + (qualify (path-join "tests" "openpgp" name) + "keyboxd") + (in-srcdir "tests" "openpgp" name) + "--use-keyboxd")) tests) + (map (lambda (name) + (test::scm setup + (path-join "tests" "openpgp" name) + (in-srcdir "tests" "openpgp" name))) tests)))) |