summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gpgscm/tests.scm3
-rw-r--r--tests/openpgp/all-tests.scm26
2 files changed, 20 insertions, 9 deletions
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index dbeda74d7..eb278e301 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -192,6 +192,9 @@
(define (in-srcdir . names)
(canonical-path (apply path-join (cons (getenv "abs_top_srcdir") names))))
+(define (in-objdir . names)
+ (canonical-path (apply path-join (cons (getenv "objdir") names))))
+
;; Split a list of paths.
(define (pathsep-split s)
(string-split s *pathsep*))
diff --git a/tests/openpgp/all-tests.scm b/tests/openpgp/all-tests.scm
index 3b266d595..98a8a6507 100644
--- a/tests/openpgp/all-tests.scm
+++ b/tests/openpgp/all-tests.scm
@@ -52,6 +52,13 @@
(lambda (filename port key) (parse-makefile port key))
"XTESTS"))
+ (define keyboxd-enabled?
+ ;; Parse the variable "libexec_PROGRAMS" in kbx/Makefile
+ (not (null?
+ (parse-makefile-expand (in-objdir "kbx" "Makefile")
+ (lambda (filename port key) (parse-makefile port key))
+ "libexec_PROGRAMS"))))
+
(define tests
(map (lambda (name)
(test::scm setup
@@ -62,20 +69,21 @@
(set! tests
(append
tests
- ;; The second pass uses the keyboxd
- (map (lambda (name)
- (test::scm setup-use-keyboxd
- (qualify (path-join "tests" "openpgp" name)
- "keyboxd")
- (in-srcdir "tests" "openpgp" name)
- "--use-keyboxd")) all-tests)
- ;; The third pass uses the legact pubring.gpg
+ ;; The second pass uses the keyboxd
+ (if keyboxd-enabled?
+ (map (lambda (name)
+ (test::scm setup-use-keyboxd
+ (qualify (path-join "tests" "openpgp" name)
+ "keyboxd")
+ (in-srcdir "tests" "openpgp" name)
+ "--use-keyboxd")) all-tests))
+ ;; The third pass uses the legact pubring.gpg
(map (lambda (name)
(test::scm setup-use-keyring
(qualify (path-join "tests" "openpgp" name)
"keyring")
(in-srcdir "tests" "openpgp" name)
"--use-keyring")) all-tests)
- )))
+ )))
tests)