[git] GnuPG - branch, master, updated. gnupg-2.1.19-50-gd82abbb

by Justus Winter cvs at cvs.gnupg.org
Tue Mar 14 13:02:51 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3 (commit)
      from  40b7911130a969677d6f0b5796236a29f10a9e69 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3
Author: Justus Winter <justus at g10code.com>
Date:   Tue Mar 14 12:45:29 2017 +0100

    tests: Skip Python tests if the bindings are not built.
    
    * tests/gpgme/wrap.scm (python): Move variable...
    * tests/gpgme/gpgme-defs.scm (python): ... here.
    (run-python-tests?): New function.
    * tests/gpgme/run-tests.scm: Only run Python tests if the bindings can
    be located in GPGME's build directory.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 12e033c..2b104f2 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -171,3 +171,13 @@
 	    (else
 	     (expand-one (append acc (list (car v))) (cdr v))))))
 	values)))
+
+(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)))))
diff --git a/tests/gpgme/run-tests.scm b/tests/gpgme/run-tests.scm
index 72de495..be70f17 100644
--- a/tests/gpgme/run-tests.scm
+++ b/tests/gpgme/run-tests.scm
@@ -71,5 +71,7 @@
 			     -- ,@(:path cmpnts))))
 		  (if (null? tests) (all-tests makefile (:key cmpnts)) tests))))
 	 `((("tests" "gpg") "c_tests" ,setup-c)
-	   (("lang" "python" "tests") "py_tests" ,setup-py)
+	   ,@(if (run-python-tests?)
+		 `((("lang" "python" "tests") "py_tests" ,setup-py))
+		 '())
 	   (("lang" "qt" "tests") "TESTS" ,setup-c))))))
diff --git a/tests/gpgme/wrap.scm b/tests/gpgme/wrap.scm
index d338892..4c96a09 100644
--- a/tests/gpgme/wrap.scm
+++ b/tests/gpgme/wrap.scm
@@ -29,9 +29,6 @@
 (setenv "top_srcdir" gpgme-srcdir #t)
 (setenv "srcdir" (path-join gpgme-srcdir "tests" "gpg") #t)
 
-(define python (catch #f
-		      (path-expand "python" (string-split (getenv "PATH") *pathsep*))))
-
 (define (run what)
   (if (string-suffix? (car what) ".py")
       (begin

-----------------------------------------------------------------------

Summary of changes:
 tests/gpgme/gpgme-defs.scm | 10 ++++++++++
 tests/gpgme/run-tests.scm  |  4 +++-
 tests/gpgme/wrap.scm       |  3 ---
 3 files changed, 13 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list