aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-03-15 13:36:27 +0000
committerJustus Winter <[email protected]>2017-03-15 13:36:27 +0000
commita98459d3f4ec3d196fb0adb0e90dadf40abc8c81 (patch)
tree617e7fcecb37149591dd4aad842c97de780b3582 /tests
parenttests: Dump the tools that the tests are going to use. (diff)
downloadgnupg-a98459d3f4ec3d196fb0adb0e90dadf40abc8c81.tar.gz
gnupg-a98459d3f4ec3d196fb0adb0e90dadf40abc8c81.zip
tests: Fix using tools from the build directory.
* tests/openpgp/defs.scm (gpg-conf'): Explicitly pass the build prefix to gpgconf here... (gpg-components): ... instead of only here. -- Previously, gpgconf was not invoked with '--build-prefix' when changing the configuration. This made tests using this facility fail (e.g. the TOFU test). This only affected release builds, because in development builds gpgconf picks up the build prefix from the environment. GnuPG-bug-id: 2979 Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/openpgp/defs.scm16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index 568ffab18..7c8e10a7e 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -140,10 +140,16 @@
(define valgrind
'("/usr/bin/valgrind" --leak-check=full --error-exitcode=154))
+(unless installed?
+ (setenv "GNUPG_BUILDDIR" (getenv "objdir") #t))
+
(define (gpg-conf . args)
(gpg-conf' "" args))
(define (gpg-conf' input args)
- (let ((s (call-popen `(,(tool-hardcoded 'gpgconf) ,@args) input)))
+ (let ((s (call-popen `(,(tool-hardcoded 'gpgconf)
+ ,@(if installed? '()
+ (list '--build-prefix (getenv "objdir")))
+ ,@args) input)))
(map (lambda (line) (map percent-decode (string-split line #\:)))
(string-split-newlines s))))
(define :gc:c:name car)
@@ -180,13 +186,7 @@
(gpg-conf' (string-append key ":16:")
`(--change-options ,component)))))
-
-(unless installed?
- (setenv "GNUPG_BUILDDIR" (getenv "objdir") #t))
-(define gpg-components (apply gpg-conf
- `(,@(if installed? '()
- (list '--build-prefix (getenv "objdir")))
- --list-components)))
+(define gpg-components (apply gpg-conf '(--list-components)))
(define (tool which)
(case which