[git] GnuPG - branch, master, updated. gnupg-2.1.16-160-g65a0d6a

by Justus Winter cvs at cvs.gnupg.org
Mon Dec 19 17:51:26 CET 2016


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  65a0d6a24e6299682793f213a9d2bae17c5b12d9 (commit)
       via  0bf16d702665a269ce5ef724c927fbbd8f7f1ce9 (commit)
      from  63c7bf1a62d1d801c79a75fdb2ef7d7cac68e1d1 (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 65a0d6a24e6299682793f213a9d2bae17c5b12d9
Author: Justus Winter <justus at g10code.com>
Date:   Mon Dec 19 17:28:43 2016 +0100

    tests: Use the common test framework for the migration tests.
    
    * tests/migrations/Makefile.am (reqired_pgms): Add 'gpgscm'.
    (TESTS_ENVIRONMENT): Populate.
    (TESTS): Rename to 'XTESTS'.
    (xcheck): New target.
    (EXTRA_DIST): Add new files.
    (CLEANFILES): Remove log files.
    * tests/migrations/common.scm: Honor 'verbose', fix paths.
    * tests/migrations/run-tests.scm: New file.
    * tests/migrations/setup.scm: Likewise.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/migrations/Makefile.am b/tests/migrations/Makefile.am
index 2773969..d0cd9ee 100644
--- a/tests/migrations/Makefile.am
+++ b/tests/migrations/Makefile.am
@@ -20,7 +20,8 @@
 
 # Programs required before we can run these tests.
 required_pgms = ../../g10/gpg$(EXEEXT) ../../agent/gpg-agent$(EXEEXT) \
-	../../tools/gpgtar$(EXEEXT)
+	../../tools/gpgtar$(EXEEXT) \
+	../gpgscm/gpgscm$(EXEEXT)
 
 AM_CPPFLAGS = -I$(top_srcdir)/common
 include $(top_srcdir)/am/cmacros.am
@@ -30,11 +31,14 @@ AM_CFLAGS =
 TMP ?= /tmp
 
 TESTS_ENVIRONMENT = GPG_AGENT_INFO= LC_ALL=C \
+	EXEEXT=$(EXEEXT) \
 	PATH=../gpgscm:$(PATH) \
 	TMP=$(TMP) \
-	GPGSCM_PATH=$(top_srcdir)/tests/gpgscm:$(top_srcdir)/tests/migrations
+	srcdir=$(abs_srcdir) \
+	objdir=$(abs_top_builddir) \
+	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/migrations
 
-TESTS = from-classic.scm \
+XTESTS = from-classic.scm \
 	extended-pkf.scm \
 	issue2276.scm
 
@@ -42,17 +46,22 @@ TEST_FILES = from-classic.tar.asc \
 	     extended-pkf.tar.asc \
 	     issue2276.tar.asc
 
-EXTRA_DIST = common.scm $(TESTS) $(TEST_FILES)
+# XXX: Currently, one cannot override automake's 'check' target.  As a
+# workaround, we avoid defining 'TESTS', thus automake will not emit
+# the 'check' target.  For extra robustness, we merely define a
+# dependency on 'xcheck', so this hack should also work even if
+# automake would emit the 'check' target, as adding dependencies to
+# targets is okay.
+check: xcheck
 
-CLEANFILES = prepared.stamp x y yy z out err  $(data_files) \
-	     plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \
-	     *.test.log gpg_dearmor gpg.conf gpg-agent.conf S.gpg-agent \
-	     pubring.gpg pubring.gpg~ pubring.kbx pubring.kbx~ \
-	     secring.gpg pubring.pkr secring.skr \
-	     gnupg-test.stop random_seed gpg-agent.log tofu.db
+.PHONY: xcheck
+xcheck:
+	$(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
+	  run-tests.scm $(TESTFLAGS) $(XTESTS)
 
-clean-local:
-	-rm -rf from-classic.gpghome/*.gpg
+EXTRA_DIST = common.scm run-tests.scm setup.scm $(XTESTS) $(TEST_FILES)
+
+CLEANFILES = *.log
 
 # We need to depend on a couple of programs so that the tests don't
 # start before all programs are built.
diff --git a/tests/migrations/common.scm b/tests/migrations/common.scm
index 944d4f6..30ac62b 100644
--- a/tests/migrations/common.scm
+++ b/tests/migrations/common.scm
@@ -18,14 +18,16 @@
 (if (string=? "" (getenv "srcdir"))
     (error "not called from make"))
 
-(setenv "GNUPGHOME" "" #t)
+(let ((verbose (string->number (getenv "verbose"))))
+  (if (number? verbose)
+      (*set-verbose!* verbose)))
 
 (define (qualify executable)
   (string-append executable (getenv "EXEEXT")))
 
 ;; We may not use a relative name for gpg-agent.
-(define GPG-AGENT (qualify (string-append (getcwd) "/../../agent/gpg-agent")))
-(define GPG `(,(qualify (string-append (getcwd) "/../../g10/gpg"))
+(define GPG-AGENT (path-join (getenv "objdir") "agent" (qualify "gpg-agent")))
+(define GPG `(,(path-join (getenv "objdir") "g10" (qualify "gpg"))
 	      --no-permission-warning --no-greeting
 	      --no-secmem-warning --batch
 	      ,(string-append "--agent-program=" GPG-AGENT
@@ -33,7 +35,7 @@
 (define GPG-no-batch
   (filter (lambda (arg) (not (equal? arg '--batch))) GPG))
 
-(define GPGTAR (qualify (string-append (getcwd) "/../../tools/gpgtar")))
+(define GPGTAR (path-join (getenv "objdir") "tools" (qualify "gpgtar")))
 
 (define (untar-armored source-name)
   (pipe:do
diff --git a/tests/migrations/run-tests.scm b/tests/migrations/run-tests.scm
new file mode 100644
index 0000000..069af5b
--- /dev/null
+++ b/tests/migrations/run-tests.scm
@@ -0,0 +1,26 @@
+;; Test-suite runner.
+;;
+;; Copyright (C) 2016 g10 Code GmbH
+;;
+;; This file is part of GnuPG.
+;;
+;; GnuPG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GnuPG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+(let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
+       (runner (if (and (member "--parallel" *args*)
+			(> (length tests) 1))
+		   run-tests-parallel
+		   run-tests-sequential)))
+  (runner (test::scm "setup.scm" "setup.scm")
+	  (map (lambda (t) (test::scm t t)) tests)))
diff --git a/tests/migrations/setup.scm b/tests/migrations/setup.scm
new file mode 100644
index 0000000..76a5840
--- /dev/null
+++ b/tests/migrations/setup.scm
@@ -0,0 +1,20 @@
+#!/usr/bin/env gpgscm
+
+;; Copyright (C) 2016 g10 Code GmbH
+;;
+;; This file is part of GnuPG.
+;;
+;; GnuPG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GnuPG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+;; Nothing to do for now.

commit 0bf16d702665a269ce5ef724c927fbbd8f7f1ce9
Author: Justus Winter <justus at g10code.com>
Date:   Mon Dec 19 17:23:56 2016 +0100

    tests: Use sequential test runner if only one test is given.
    
    * tests/openpgp/run-tests.scm: Use sequential test runner if only one
    test is given.
    --
    
    This allows one to set the environment variable TESTFLAGS to
    '--parallel' and enjoy faster test execution times without interfering
    with stdio when one works on a single test.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index 4146411..546d7d4 100644
--- a/tests/openpgp/run-tests.scm
+++ b/tests/openpgp/run-tests.scm
@@ -26,9 +26,10 @@
 ;; Set objdir so that the tests can locate built programs.
 (setenv "objdir" (getcwd) #f)
 
-(let* ((runner (if (member "--parallel" *args*)
+(let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
+       (runner (if (and (member "--parallel" *args*)
+			(> (length tests) 1))
 		   run-tests-parallel
-		   run-tests-sequential))
-       (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*)))
+		   run-tests-sequential)))
   (runner (test::scm "setup.scm" "setup.scm")
 	  (map (lambda (t) (test::scm t t)) tests)))

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

Summary of changes:
 tests/migrations/Makefile.am                       | 33 ++++++++++++++--------
 tests/migrations/common.scm                        | 10 ++++---
 .../decrypt.scm => migrations/run-tests.scm}       | 22 ++++++---------
 .../{openpgp/version.scm => migrations/setup.scm}  |  7 +----
 tests/openpgp/run-tests.scm                        |  7 +++--
 5 files changed, 41 insertions(+), 38 deletions(-)
 copy tests/{openpgp/decrypt.scm => migrations/run-tests.scm} (68%)
 mode change 100755 => 100644
 copy tests/{openpgp/version.scm => migrations/setup.scm} (81%)
 mode change 100755 => 100644


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




More information about the Gnupg-commits mailing list