mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
tests: Support single invocation with variant.
* tests/openpgp/run-tests.scm: Add GPGSCM_TEST_VARIANT support. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
d6eb276133
commit
ba2f2085a9
@ -32,11 +32,33 @@
|
|||||||
(path-join "tests" "openpgp" "setup.scm")
|
(path-join "tests" "openpgp" "setup.scm")
|
||||||
(in-srcdir "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*))
|
(define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
|
||||||
|
|
||||||
(run-tests (if (null? tests)
|
(run-tests (if (null? tests)
|
||||||
(load-tests "tests" "openpgp")
|
(load-tests "tests" "openpgp")
|
||||||
(map (lambda (name)
|
(if use-keyboxd?
|
||||||
(test::scm setup
|
(map (lambda (name)
|
||||||
(path-join "tests" "openpgp" name)
|
(test::scm setup-use-keyboxd
|
||||||
(in-srcdir "tests" "openpgp" name))) tests)))
|
(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))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user