aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgme
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2017-03-15 07:45:18 +0000
committerNIIBE Yutaka <[email protected]>2017-03-15 07:45:18 +0000
commita672ddec03f96475866d712b28be18b3fab43aef (patch)
tree375883581864bb2e94c803e8227d436e2d64ff39 /tests/gpgme
parenttests: Skip Python tests if the bindings are not built. (diff)
downloadgnupg-a672ddec03f96475866d712b28be18b3fab43aef.tar.gz
gnupg-a672ddec03f96475866d712b28be18b3fab43aef.zip
tests: Fix running python condition.
* tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'tests/gpgme')
-rw-r--r--tests/gpgme/gpgme-defs.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 2b104f264..058377475 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -175,9 +175,10 @@
(define python (catch #f
(path-expand "python" (string-split (getenv "PATH") *pathsep*))))
(define (run-python-tests?)
- (let* ((python-version
- (string-trim char-whitespace?
- (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
- (build-path (path-join gpgme-builddir "lang" "python"
- (string-append "python" python-version "-gpg"))))
- (trace (file-exists? (trace build-path)))))
+ (and python
+ (let* ((python-version
+ (string-trim char-whitespace?
+ (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
+ (build-path (path-join gpgme-builddir "lang" "python"
+ (string-append "python" python-version "-gpg"))))
+ (trace (file-exists? (trace build-path))))))