[git] GnuPG - branch, master, updated. gnupg-2.1.20-88-gee71520

by Justus Winter cvs at cvs.gnupg.org
Mon Apr 24 14:39:23 CEST 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  ee715201ae784e840b6136393289e6dbd6f4c540 (commit)
       via  679920781a25ae5c0e49d4bd78e6926fd661778f (commit)
       via  a71f4142e13e2cc26ef0cd62f56a1ccb7ce678ee (commit)
       via  ed4d23d75e8ba89e998b88a4f862661c81f665a3 (commit)
       via  f03d6897be904da58cad76b4bd07729922b47616 (commit)
       via  245860ecaf8b9e82ca577385abd453ac92ffcd26 (commit)
      from  10519270d36586c536bfb6c4cda8ac17c01f4976 (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 ee715201ae784e840b6136393289e6dbd6f4c540
Author: Justus Winter <justus at g10code.com>
Date:   Tue Apr 18 18:51:06 2017 +0200

    gpgscm: Emit JUnit-style XML reports.
    
    * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
    * tests/gpgscm/lib.scm (string-translate): New function.
    * tests/gpgscm/main.c (main): Load new file.
    * tests/gpgscm/tests.scm (dirname): New function.
    (test-pool): Record execution times, emit XML report.
    (test): Record execution times, record log file name, emit XML report.
    (run-tests-parallel): Write XML report.
    (run-tests-sequential): Likewise.
    * tests/gpgscm/xml.scm: New file.
    * tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'.
    * tests/gpgsm/Makefile.am: Likewise.
    * tests/migrations/Makefile.am: Likewise.
    * tests/openpgp/Makefile.am: Likewise.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgme/Makefile.am b/tests/gpgme/Makefile.am
index daf7572..37485e7 100644
--- a/tests/gpgme/Makefile.am
+++ b/tests/gpgme/Makefile.am
@@ -50,7 +50,7 @@ xcheck:
 
 EXTRA_DIST = gpgme-defs.scm run-tests.scm setup.scm wrap.scm
 
-CLEANFILES = *.log
+CLEANFILES = *.log report.xml
 
 # 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/gpgscm/Makefile.am b/tests/gpgscm/Makefile.am
index dc999fb..1bdd373 100644
--- a/tests/gpgscm/Makefile.am
+++ b/tests/gpgscm/Makefile.am
@@ -25,6 +25,7 @@ EXTRA_DIST = \
 	lib.scm \
 	repl.scm \
 	t-child.scm \
+	xml.scm \
 	tests.scm \
 	gnupg.scm \
 	time.scm
diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm
index cafca8d..258f692 100644
--- a/tests/gpgscm/lib.scm
+++ b/tests/gpgscm/lib.scm
@@ -199,6 +199,13 @@
 (assert (string-contains? "Hallo" "llo"))
 (assert (not (string-contains? "Hallo" "olla")))
 
+;; Translate characters.
+(define (string-translate s from to)
+  (list->string (map (lambda (c)
+		       (let ((i (string-index from c)))
+			 (if i (string-ref to i) c))) (string->list s))))
+(assert (equal? (string-translate "foo/bar" "/" ".") "foo.bar"))
+
 ;; Read a word from port P.
 (define (read-word . p)
   (list->string
diff --git a/tests/gpgscm/main.c b/tests/gpgscm/main.c
index 5e04d97..e4b535e 100644
--- a/tests/gpgscm/main.c
+++ b/tests/gpgscm/main.c
@@ -313,6 +313,8 @@ main (int argc, char **argv)
   if (! err)
     err = load (sc, "repl.scm", 0, 1);
   if (! err)
+    err = load (sc, "xml.scm", 0, 1);
+  if (! err)
     err = load (sc, "tests.scm", 0, 1);
   if (! err)
     err = load (sc, "gnupg.scm", 0, 1);
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index b2dcc54..3118977 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -223,6 +223,10 @@
        (substring path 0 (- (string-length path) (string-length suffix)))
        path)))
 
+(define (dirname path)
+  (let ((i (string-rindex path #\/)))
+    (if i (substring path 0 i) ".")))
+
 ;; Helper for (pipe).
 (define :read-end car)
 (define :write-end cadr)
@@ -511,7 +515,9 @@
 	      (let ((names (map (lambda (t) t::name) unfinished))
 		    (pids (map (lambda (t) t::pid) unfinished)))
 		(for-each
-		 (lambda (test retcode) (test:::set! 'retcode retcode))
+		 (lambda (test retcode)
+		   (test::set-end-time!)
+		   (test:::set! 'retcode retcode))
 		 (map pid->test pids)
 		 (wait-processes (map stringify names) pids #t)))))
 	(current-environment))
@@ -539,7 +545,15 @@
 		(length skipped') "skipped.")
 	  (print-tests failed' "Failed tests:")
 	  (print-tests skipped' "Skipped tests:")
-	  (length failed')))))))
+	  (length failed')))
+
+      (define (xml)
+	(xx::document
+	 (xx::tag 'testsuites
+		  `((xmlns:xsi "http://www.w3.org/2001/XMLSchema-instance")
+		    ("xsi:noNamespaceSchemaLocation"
+		     "https://windyroad.com.au/dl/Open%20Source/JUnit.xsd"))
+		  (map (lambda (t) (t::xml)) procs))))))))
 
 (define (verbosity n)
   (if (= 0 n) '() (cons '--verbose (verbosity (- n 1)))))
@@ -549,6 +563,23 @@
 
 ;; A single test.
 (define test
+ (begin
+
+  ;; Private definitions.
+
+  (define (isotime->junit t)
+    "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}"
+    "20170418T145809"
+    (string-append (substring t 0 4)
+		   "-"
+		   (substring t 4 6)
+		   "-"
+		   (substring t 6 11)
+		   ":"
+		   (substring t 11 13)
+		   ":"
+		   (substring t 13 15)))
+
   (package
    (define (scm setup name path . args)
      ;; Start the process.
@@ -568,14 +599,34 @@
 
    (define (new name directory spawn pid retcode logfd)
      (package
+
+      ;; XXX: OO glue.
+      (define self (current-environment))
       (define (:set! key value)
 	(eval `(set! ,key ,value) (current-environment))
 	(current-environment))
+
+      ;; The log is written here.
+      (define log-file-name "not set")
+
+      ;; Record time stamps.
+      (define timestamp #f)
+      (define start-time 0)
+      (define end-time 0)
+
+      (define (set-start-time!)
+	(set! timestamp (isotime->junit (get-isotime)))
+	(set! start-time (get-time)))
+      (define (set-end-time!)
+	(set! end-time (get-time)))
+
       (define (open-log-file)
-	(let ((filename (string-append (basename name) ".log")))
-	  (catch '() (unlink filename))
-	  (open filename (logior O_RDWR O_BINARY O_CREAT) #o600)))
+	(set! log-file-name (string-append (basename name) ".log"))
+	(catch '() (unlink log-file-name))
+	(open log-file-name (logior O_RDWR O_BINARY O_CREAT) #o600))
+
       (define (run-sync . args)
+	(set-start-time!)
 	(letfd ((log (open-log-file)))
 	  (with-working-directory directory
 	    (let* ((p (inbound-pipe))
@@ -588,25 +639,62 @@
 	(report)
 	(current-environment))
       (define (run-sync-quiet . args)
+	(set-start-time!)
 	(with-working-directory directory
-	  (set! pid (spawn args CLOSED_FD CLOSED_FD CLOSED_FD))
-	  (set! retcode (wait-process name pid #t)))
+	  (set! pid (spawn args CLOSED_FD CLOSED_FD CLOSED_FD)))
+	(set! retcode (wait-process name pid #t))
+	(set-end-time!)
 	(current-environment))
       (define (run-async . args)
+	(set-start-time!)
 	(let ((log (open-log-file)))
 	  (with-working-directory directory
 	    (set! pid (spawn args CLOSED_FD log log)))
 	  (set! logfd log))
 	(current-environment))
       (define (status)
-	(let ((t (assoc retcode '((0 "PASS") (77 "SKIP") (99 "ERROR")))))
-	  (if (not t) "FAIL" (cadr t))))
+	(let ((t (assoc retcode '((0 PASS) (77 SKIP) (99 ERROR)))))
+	  (if (not t) 'FAIL (cadr t))))
+      (define (status-string)
+	(cadr (assoc (status) '((PASS "PASS")
+			       (SKIP "SKIP")
+			       (ERROR "ERROR")
+			       (FAIL "FAIL")))))
       (define (report)
 	(unless (= logfd CLOSED_FD)
 		(seek logfd 0 SEEK_SET)
 		(splice logfd STDERR_FILENO)
 		(close logfd))
-	(echo (string-append (status) ":") name))))))
+	(echo (string-append (status-string) ":") name))
+
+      (define (xml)
+	(xx::tag
+	 'testsuite
+	 `((name ,name)
+	   (time ,(- end-time start-time))
+	   (package ,(dirname name))
+	   (id 0)
+	   (timestamp ,timestamp)
+	   (hostname "unknown")
+	   (tests 1)
+	   (failures ,(if (eq? FAIL (status)) 1 0))
+	   (errors ,(if (eq? ERROR (status)) 1 0)))
+	 (list
+	  (xx::tag 'properties)
+	  (xx::tag 'testcase
+		   `((name ,(basename name))
+		     (classname ,(string-translate (dirname name) "/" "."))
+		     (time ,(- end-time start-time)))
+		   `(,@(case (status)
+			 ((PASS) '())
+			 ((SKIP) (list (xx::tag 'skipped)))
+			 ((ERROR) (list
+				   (xx::tag 'error '((message "Unknown error.")))))
+			 (else
+			  (list (xx::tag 'failure '((message "Unknown error."))))))))
+	  (xx::tag 'system-out '()
+		   (list (xx::textnode (read-all (open-input-file log-file-name)))))
+	  (xx::tag 'system-err '() (list (xx::textnode "")))))))))))
 
 ;; Run the setup target to create an environment, then run all given
 ;; tests in parallel.
@@ -615,6 +703,7 @@
     (if (null? tests')
 	(let ((results (pool::wait)))
 	  (for-each (lambda (t) (t::report)) (reverse results::procs))
+	  ((results::xml) (open-output-file "report.xml"))
 	  (exit (results::report)))
 	(let ((wd (mkdtemp-autoremove))
 	      (test (car tests')))
@@ -628,6 +717,7 @@
   (let loop ((pool (test-pool::new '())) (tests' tests))
     (if (null? tests')
 	(let ((results (pool::wait)))
+	  ((results::xml) (open-output-file "report.xml"))
 	  (exit (results::report)))
 	(let ((wd (mkdtemp-autoremove))
 	      (test (car tests')))
diff --git a/tests/gpgscm/xml.scm b/tests/gpgscm/xml.scm
new file mode 100644
index 0000000..771ec36
--- /dev/null
+++ b/tests/gpgscm/xml.scm
@@ -0,0 +1,142 @@
+;; A tiny XML library.
+;;
+;; Copyright (C) 2017 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/>.
+
+(define xx
+  (begin
+
+    ;; Private declarations.
+    (define quote-text
+      '((#\< "<")
+	(#\> ">")
+	(#\& "&")))
+
+    (define quote-attribute-'
+      '((#\< "<")
+	(#\> ">")
+	(#\& "&")
+	(#\' "'")))
+
+    (define quote-attribute-''
+      '((#\< "<")
+	(#\> ">")
+	(#\& "&")
+	(#\" """)))
+
+    (define (escape-string quotation string sink)
+      ;; This implementation is a bit awkward because iteration is so
+      ;; slow in TinySCHEME.  We rely on string-index to skip to the
+      ;; next character we need to escape.  We also avoid allocations
+      ;; wherever possible.
+
+      ;; Given a list of integers or #f, return the sublist that
+      ;; starts with the lowest integer.
+      (define (min* x)
+	(let loop ((lowest x) (rest x))
+	  (if (null? rest)
+	      lowest
+	      (loop (if (or (null? lowest) (not (car lowest))
+			    (and (car rest) (> (car lowest) (car rest)))) rest lowest)
+		    (cdr rest)))))
+
+      (let ((i 0) (start 0) (len (string-length string))
+	    (indices (map (lambda (x) (string-index string (car x))) quotation))
+	    (next #f) (c #f))
+
+	;; Set 'i' to the index of the next character that needs
+	;; escaping, 'c' to the character that needs to be escaped,
+	;; and update 'indices'.
+	(define (skip!)
+	  (set! next (min* indices))
+	  (set! i (if (null? next) #f (car next)))
+	  (if i
+	      (begin
+		(set! c (string-ref string i))
+		(set-car! next (string-index string c (+ 1 i))))
+	      (set! i (string-length string))))
+
+	(let loop ()
+	  (skip!)
+	  (if (< i len)
+	      (begin
+		(display (substring string start i) sink)
+		(display (cadr (assv c quotation)) sink)
+		(set! i (+ 1 i))
+		(set! start i)
+		(loop))
+	      (display (substring string start len) sink)))))
+
+    (let ((escape-string-s (lambda (quotation string)
+			     (let ((sink (open-output-string)))
+			       (escape-string quotation string sink)
+			       (get-output-string sink)))))
+      (assert (equal? (escape-string-s quote-text "foo") "foo"))
+      (assert (equal? (escape-string-s quote-text "foo&") "foo&"))
+      (assert (equal? (escape-string-s quote-text "&foo") "&foo"))
+      (assert (equal? (escape-string-s quote-text "foo&bar") "foo&bar"))
+      (assert (equal? (escape-string-s quote-text "foo<bar") "foo<bar"))
+      (assert (equal? (escape-string-s quote-text "foo>bar") "foo>bar")))
+
+    (define (escape quotation datum sink)
+      (cond
+       ((string? datum) (escape-string quotation datum sink))
+       ((symbol? datum) (escape-string quotation (symbol->string datum) sink))
+       ((number? datum) (display (number->string datum) sink))
+       (else
+	(throw "Do not know how to encode" datum))))
+
+    (define (name->string name)
+      (cond
+       ((symbol? name) (symbol->string name))
+       (else name)))
+
+    (package
+
+     (define (textnode string)
+       (lambda (sink)
+	 (escape quote-text string sink)))
+
+     (define (tag name . rest)
+       (let ((attributes (if (null? rest) '() (car rest)))
+	     (children (if (> (length rest) 1) (cadr rest) '())))
+	 (lambda (sink)
+	   (display "<" sink)
+	   (display (name->string name) sink)
+	   (unless (null? attributes)
+		   (display " " sink)
+		   (for-each (lambda (a)
+			       (display (car a) sink)
+			       (display "=\"" sink)
+			       (escape quote-attribute-'' (cadr a) sink)
+			       (display "\" " sink)) attributes))
+	   (if (null? children)
+	       (display "/>\n" sink)
+	       (begin
+		 (display ">\n" sink)
+		 (for-each (lambda (c) (c sink)) children)
+		 (display "</" sink)
+		 (display (name->string name) sink)
+		 (display ">\n" sink))))))
+
+     (define (document root . rest)
+       (let ((attributes (if (null? rest) '() (car rest))))
+	 (lambda (sink)
+	   ;; xxx ignores attributes
+	   (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" sink)
+	   (root sink)
+	   (newline sink)))))))
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 214c3b2..892d3bc 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -68,7 +68,7 @@ TEST_FILES = plain-1.cms.asc \
 EXTRA_DIST = $(XTESTS) $(KEYS) $(CERTS) $(TEST_FILES) \
 	gpgsm-defs.scm run-tests.scm setup.scm
 
-CLEANFILES = *.log
+CLEANFILES = *.log report.xml
 
 # 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/Makefile.am b/tests/migrations/Makefile.am
index e548723..398b15c 100644
--- a/tests/migrations/Makefile.am
+++ b/tests/migrations/Makefile.am
@@ -58,7 +58,7 @@ xcheck:
 
 EXTRA_DIST = common.scm run-tests.scm setup.scm $(XTESTS) $(TEST_FILES)
 
-CLEANFILES = *.log
+CLEANFILES = *.log report.xml
 
 # 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/openpgp/Makefile.am b/tests/openpgp/Makefile.am
index 354dff9..a7281a5 100644
--- a/tests/openpgp/Makefile.am
+++ b/tests/openpgp/Makefile.am
@@ -259,7 +259,7 @@ CLEANFILES = prepared.stamp x y yy z out err  $(data_files) \
 	     pubring.gpg pubring.gpg~ pubring.kbx pubring.kbx~ \
 	     secring.gpg pubring.pkr secring.skr \
 	     gnupg-test.stop random_seed gpg-agent.log tofu.db \
-	     passphrases sshcontrol S.gpg-agent.ssh
+	     passphrases sshcontrol S.gpg-agent.ssh report.xml
 
 clean-local:
 	-rm -rf private-keys-v1.d openpgp-revocs.d tofu.d gpgtar.d

commit 679920781a25ae5c0e49d4bd78e6926fd661778f
Author: Justus Winter <justus at g10code.com>
Date:   Thu Apr 20 11:49:17 2017 +0200

    gpgscm: Make logging less verbose and more useful.
    
    * tests/gpgscm/tests.scm (call-with-io): When being verbose, include
    the pid in the output, and avoid duplicating the command arguments.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index c098218..b2dcc54 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -104,10 +104,11 @@
       (es-fclose (:stdout h))
       (es-fclose (:stderr h))
       (if (> (*verbose*) 2)
-	  (begin
-	    (echo (stringify what) "returned:" result)
-	    (echo (stringify what) "wrote to stdout:" out)
-	    (echo (stringify what) "wrote to stderr:" err)))
+	  (info "Child" (:pid h) "returned:"
+		`((command ,(stringify what))
+		  (status ,result)
+		  (stdout ,out)
+		  (stderr ,err))))
       (list result out err))))
 
 ;; Accessor function for the results of 'call-with-io'.  ':stdout' and

commit a71f4142e13e2cc26ef0cd62f56a1ccb7ce678ee
Author: Justus Winter <justus at g10code.com>
Date:   Tue Apr 18 12:27:49 2017 +0200

    gpgscm: Make test framework less functional.
    
    * tests/gpgscm/tests.scm (test-pool, tests): Previously, these methods
    updated objects by creating new updated copies of the object being
    manipulated.  This made the code awkward without any benefit,
    therefore I change it to just update the object.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index e8cea85..c098218 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -498,23 +498,22 @@
    (define (new procs)
      (package
       (define (add test)
-	(new (cons test procs)))
+	(set! procs (cons test procs))
+	(current-environment))
+      (define (pid->test pid)
+	(let ((t (filter (lambda (x) (= pid x::pid)) procs)))
+	  (if (null? t) #f (car t))))
       (define (wait)
 	(let ((unfinished (filter (lambda (t) (not t::retcode)) procs)))
 	  (if (null? unfinished)
-	      (package)
-	      (let* ((names (map (lambda (t) t::name) unfinished))
-		     (pids (map (lambda (t) t::pid) unfinished))
-		     (results
-		      (map (lambda (pid retcode) (list pid retcode))
-			   pids
-			   (wait-processes (map stringify names) pids #t))))
-		(new
-		 (map (lambda (t)
-			(if t::retcode
-			    t
-			    (t::set-retcode (cadr (assoc t::pid results)))))
-		      procs))))))
+	      (current-environment)
+	      (let ((names (map (lambda (t) t::name) unfinished))
+		    (pids (map (lambda (t) t::pid) unfinished)))
+		(for-each
+		 (lambda (test retcode) (test:::set! 'retcode retcode))
+		 (map pid->test pids)
+		 (wait-processes (map stringify names) pids #t)))))
+	(current-environment))
       (define (passed)
 	(filter (lambda (p) (= 0 p::retcode)) procs))
       (define (skipped)
@@ -568,14 +567,9 @@
 
    (define (new name directory spawn pid retcode logfd)
      (package
-      (define (set-directory x)
-	(new name x spawn pid retcode logfd))
-      (define (set-retcode x)
-	(new name directory spawn pid x logfd))
-      (define (set-pid x)
-	(new name directory spawn x retcode logfd))
-      (define (set-logfd x)
-	(new name directory spawn pid retcode x))
+      (define (:set! key value)
+	(eval `(set! ,key ,value) (current-environment))
+	(current-environment))
       (define (open-log-file)
 	(let ((filename (string-append (basename name) ".log")))
 	  (catch '() (unlink filename))
@@ -584,24 +578,25 @@
 	(letfd ((log (open-log-file)))
 	  (with-working-directory directory
 	    (let* ((p (inbound-pipe))
-		   (pid (spawn args 0 (:write-end p) (:write-end p))))
+		   (pid' (spawn args 0 (:write-end p) (:write-end p))))
 	      (close (:write-end p))
 	      (splice (:read-end p) STDERR_FILENO log)
 	      (close (:read-end p))
-	      (let ((t' (set-retcode (wait-process name pid #t))))
-		(t'::report)
-		t')))))
+	      (set! pid pid')
+	      (set! retcode (wait-process name pid' #t)))))
+	(report)
+	(current-environment))
       (define (run-sync-quiet . args)
 	(with-working-directory directory
-	  (set-retcode
-	   (wait-process
-	    name (spawn args CLOSED_FD CLOSED_FD CLOSED_FD) #t))))
+	  (set! pid (spawn args CLOSED_FD CLOSED_FD CLOSED_FD))
+	  (set! retcode (wait-process name pid #t)))
+	(current-environment))
       (define (run-async . args)
 	(let ((log (open-log-file)))
 	  (with-working-directory directory
-	    (new name directory spawn
-		 (spawn args CLOSED_FD log log)
-		 retcode log))))
+	    (set! pid (spawn args CLOSED_FD log log)))
+	  (set! logfd log))
+	(current-environment))
       (define (status)
 	(let ((t (assoc retcode '((0 "PASS") (77 "SKIP") (99 "ERROR")))))
 	  (if (not t) "FAIL" (cadr t))))
@@ -620,10 +615,10 @@
 	(let ((results (pool::wait)))
 	  (for-each (lambda (t) (t::report)) (reverse results::procs))
 	  (exit (results::report)))
-	(let* ((wd (mkdtemp-autoremove))
-	       (test (car tests'))
-	       (test' (test::set-directory wd)))
-	  (loop (pool::add (test'::run-async))
+	(let ((wd (mkdtemp-autoremove))
+	      (test (car tests')))
+	  (test:::set! 'directory wd)
+	  (loop (pool::add (test::run-async))
 		(cdr tests'))))))
 
 ;; Run the setup target to create an environment, then run all given
@@ -633,10 +628,10 @@
     (if (null? tests')
 	(let ((results (pool::wait)))
 	  (exit (results::report)))
-	(let* ((wd (mkdtemp-autoremove))
-	       (test (car tests'))
-	       (test' (test::set-directory wd)))
-	  (loop (pool::add (test'::run-sync))
+	(let ((wd (mkdtemp-autoremove))
+	      (test (car tests')))
+	  (test:::set! 'directory wd)
+	  (loop (pool::add (test::run-sync))
 		(cdr tests'))))))
 
 ;; Helper to create environment caches from test functions.  SETUP

commit ed4d23d75e8ba89e998b88a4f862661c81f665a3
Author: Justus Winter <justus at g10code.com>
Date:   Wed Mar 22 12:40:42 2017 +0100

    tests: Locate resources and scripts relative to top source dir.
    
    --
    
    Locate every resource and every script used in the tests using a path
    relative to the top of the source tree.
    
    This is a purely mechanical change, mostly done using regular
    expressions, with a few manual fixups here and there.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/g10/Makefile.am b/g10/Makefile.am
index f1d2d17..4b806ec 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -54,6 +54,8 @@ noinst_PROGRAMS += gpgcompose
 endif
 noinst_PROGRAMS += $(module_tests)
 TESTS = $(module_tests)
+TESTS_ENVIRONMENT = \
+	abs_top_srcdir=$(abs_top_srcdir)
 
 if ENABLE_BZIP2_SUPPORT
 bzip2_source = compress-bz2.c
diff --git a/g10/t-stutter.c b/g10/t-stutter.c
index f4a9a59..8fe242d 100644
--- a/g10/t-stutter.c
+++ b/g10/t-stutter.c
@@ -58,6 +58,8 @@
 #include "dek.h"
 #include "../common/logging.h"
 
+#include "test.c"
+
 static void
 log_hexdump (byte *buffer, int length)
 {
@@ -368,8 +370,8 @@ oracle_test (unsigned int d, int b, int debug)
   return oracle (debug, probe, blocksize + 2, NULL, NULL) == 0;
 }
 
-int
-main (int argc, char *argv[])
+static void
+do_test (int argc, char *argv[])
 {
   int i;
   int debug = 0;
@@ -379,8 +381,6 @@ main (int argc, char *argv[])
   byte *raw_data;
   int raw_data_len;
 
-  int failed = 0;
-
   for (i = 1; i < argc; i ++)
     {
       if (strcmp (argv[i], "--debug") == 0)
@@ -396,11 +396,10 @@ main (int argc, char *argv[])
         }
     }
 
-  if (! blocksize && ! filename && (filename = getenv ("srcdir")))
+  if (! blocksize && ! filename && (filename = prepend_srcdir ("t-stutter-data.asc")))
     /* Try defaults.  */
     {
       parse_session_key ("9:9274A8EC128E850C6DDDF9EAC68BFA84FC7BC05F340DA41D78C93D0640C7C503");
-      filename = xasprintf ("%s/t-stutter-data.asc", filename);
     }
 
   if (help || ! blocksize || ! filename)
@@ -601,7 +600,7 @@ main (int argc, char *argv[])
                        isprint (pt[0]) ? pt[0] : '?',
                        isprint (pt[1]) ? pt[1] : '?',
                        hexstr (m));
-            failed = 1;
+            tests_failed++;
           }
       }
 
@@ -610,5 +609,4 @@ main (int argc, char *argv[])
   }
 
   xfree (filename);
-  return failed;
 }
diff --git a/g10/test.c b/g10/test.c
index 734458a..375f361 100644
--- a/g10/test.c
+++ b/g10/test.c
@@ -154,12 +154,12 @@ prepend_srcdir (const char *fname)
   static const char *srcdir;
   char *result;
 
-  if (!srcdir && !(srcdir = getenv ("srcdir")))
+  if (!srcdir && !(srcdir = getenv ("abs_top_srcdir")))
     srcdir = ".";
 
-  result = malloc (strlen (srcdir) + 1 + strlen (fname) + 1);
+  result = malloc (strlen (srcdir) + strlen ("/g10/") + strlen (fname) + 1);
   strcpy (result, srcdir);
-  strcat (result, "/");
+  strcat (result, "/g10/");
   strcat (result, fname);
   return result;
 }
diff --git a/tests/gpgme/Makefile.am b/tests/gpgme/Makefile.am
index 0d0edc0..daf7572 100644
--- a/tests/gpgme/Makefile.am
+++ b/tests/gpgme/Makefile.am
@@ -31,9 +31,9 @@ AM_CFLAGS =
 TESTS_ENVIRONMENT = LC_ALL=C \
 	EXEEXT=$(EXEEXT) \
 	PATH=../gpgscm:$(PATH) \
-	srcdir=$(abs_srcdir) \
+	abs_top_srcdir=$(abs_top_srcdir) \
 	objdir=$(abs_top_builddir) \
-	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/openpgp:$(abs_top_srcdir)/tests/gpgme
+	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
 
 # XXX: Currently, one cannot override automake's 'check' target.  As a
 # workaround, we avoid defining 'TESTS', thus automake will not emit
diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 486d1a1..1e215b1 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 
 (define gpgme-srcdir (getenv "XTEST_GPGME_SRCDIR"))
 (when (string=? "" gpgme-srcdir)
diff --git a/tests/gpgme/run-tests.scm b/tests/gpgme/run-tests.scm
index be70f17..df5f548 100644
--- a/tests/gpgme/run-tests.scm
+++ b/tests/gpgme/run-tests.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgme-defs.scm"))
+(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm"))
 
 (info "Running GPGME's test suite...")
 
@@ -40,11 +40,17 @@
 		   run-tests-parallel
 		   run-tests-sequential))
        (setup-c (make-environment-cache
-		 (test::scm #f "setup.scm (tests/gpg)" (in-srcdir "setup.scm")
-			    "--" "tests" "gpg")))
+		 (test::scm
+		  #f
+		  (path-join "tests" "gpgme" "setup.scm" "tests" "gpg")
+		  (in-srcdir "tests" "gpgme" "setup.scm")
+		  "--" "tests" "gpg")))
        (setup-py (make-environment-cache
-		  (test::scm #f "setup.scm (lang/python/tests)" (in-srcdir "setup.scm")
-			     "--" "lang" "python" "tests")))
+		  (test::scm
+		   #f
+		   (path-join "tests" "gpgme" "setup.scm" "lang" "python" "tests")
+		   (in-srcdir "tests" "gpgme" "setup.scm")
+		   "--" "lang" "python" "tests")))
        (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*)))
   (runner
    (apply
@@ -66,7 +72,10 @@
 	     (map (lambda (name)
 		    (apply test::scm
 			   `(,(:setup cmpnts)
-			     ,name ,(in-srcdir "wrap.scm") --executable
+			     ,(apply path-join
+				     `("tests" "gpgme" ,@(:path cmpnts) ,name))
+			     ,(in-srcdir "tests" "gpgme" "wrap.scm")
+			     --executable
 			     ,(find-test name)
 			     -- ,@(:path cmpnts))))
 		  (if (null? tests) (all-tests makefile (:key cmpnts)) tests))))
diff --git a/tests/gpgme/setup.scm b/tests/gpgme/setup.scm
index 0116a74..d1173d8 100644
--- a/tests/gpgme/setup.scm
+++ b/tests/gpgme/setup.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgme-defs.scm"))
+(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm"))
 
 (define tarball (flag "--create-tarball" *args*))
 (unless (and tarball (not (null? tarball)))
diff --git a/tests/gpgme/wrap.scm b/tests/gpgme/wrap.scm
index eb416f4..9a20d50 100644
--- a/tests/gpgme/wrap.scm
+++ b/tests/gpgme/wrap.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgme-defs.scm"))
+(load (in-srcdir "tests" "gpgme" "gpgme-defs.scm"))
 
 (define executable (flag "--executable" *args*))
 (unless (and executable (not (null? executable)))
@@ -28,6 +28,7 @@
 (setenv "abs_builddir" (getcwd) #t)
 (setenv "top_srcdir" gpgme-srcdir #t)
 (setenv "srcdir" (path-join gpgme-srcdir "tests" "gpg") #t)
+(setenv "abs_top_srcdir" (path-join gpgme-srcdir "tests" "gpg") #t)
 
 (define (run what)
   (if (string-suffix? (car what) ".py")
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index 4107889..e8cea85 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -189,7 +189,7 @@
   (if (absolute-path? path) path (path-join (getcwd) path)))
 
 (define (in-srcdir . names)
-  (canonical-path (apply path-join (cons (getenv "srcdir") names))))
+  (canonical-path (apply path-join (cons (getenv "abs_top_srcdir") names))))
 
 ;; Try to find NAME in PATHS.  Returns the full path name on success,
 ;; or raises an error.
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 28db501..214c3b2 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -31,9 +31,9 @@ AM_CFLAGS =
 TESTS_ENVIRONMENT = LC_ALL=C \
 	EXEEXT=$(EXEEXT) \
 	PATH=../gpgscm:$(PATH) \
-	srcdir=$(abs_srcdir) \
+	abs_top_srcdir=$(abs_top_srcdir) \
 	objdir=$(abs_top_builddir) \
-	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/openpgp:$(abs_top_srcdir)/tests/gpgsm
+	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
 
 XTESTS = \
 	import.scm \
diff --git a/tests/gpgsm/decrypt.scm b/tests/gpgsm/decrypt.scm
index e7f3baa..c328ba8 100644
--- a/tests/gpgsm/decrypt.scm
+++ b/tests/gpgsm/decrypt.scm
@@ -17,14 +17,14 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 (for-each-p
  "Checking decryption of supplied files."
  (lambda (name)
    (tr:do
-    (tr:open (in-srcdir (string-append name ".cms.asc")))
+    (tr:open (in-srcdir "tests" "gpgsm" (string-append name ".cms.asc")))
     (tr:gpgsm "" '(--decrypt))
     (tr:assert-identity name)))
  plain-files)
diff --git a/tests/gpgsm/encrypt.scm b/tests/gpgsm/encrypt.scm
index fd23ac5..bb90c8e 100644
--- a/tests/gpgsm/encrypt.scm
+++ b/tests/gpgsm/encrypt.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 (for-each-p
diff --git a/tests/gpgsm/export.scm b/tests/gpgsm/export.scm
index 47fb06e..d29b6cc 100644
--- a/tests/gpgsm/export.scm
+++ b/tests/gpgsm/export.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 (for-each-p'
diff --git a/tests/gpgsm/gpgsm-defs.scm b/tests/gpgsm/gpgsm-defs.scm
index 5f9be7f..c978c32 100644
--- a/tests/gpgsm/gpgsm-defs.scm
+++ b/tests/gpgsm/gpgsm-defs.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 
 ;; This is the list of certificates that we install in the test
 ;; environment.
@@ -83,13 +83,13 @@
   (log "Storing private keys")
   (for-each
    (lambda (name)
-     (file-copy (in-srcdir name)
+     (file-copy (in-srcdir "tests" "gpgsm" name)
 		(path-join "private-keys-v1.d"
 			   (string-append name ".key"))))
    '("32100C27173EF6E9C4E9A25D3D69F86D37A4F939"))
 
   (log "Importing public demo and test keys")
-  (call-check `(, at gpgsm --import ,(in-srcdir "cert_g10code_test1.der")))
+  (call-check `(, at gpgsm --import ,(in-srcdir "tests" "gpgsm" "cert_g10code_test1.der")))
 
   (create-sample-files)
   (stop-agent))
diff --git a/tests/gpgsm/import.scm b/tests/gpgsm/import.scm
index 85e5107..be555da 100644
--- a/tests/gpgsm/import.scm
+++ b/tests/gpgsm/import.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 (define certs-for-import
@@ -47,7 +47,7 @@
  "Checking certificate import."
  (lambda (test)
    (assert (not (sm-have-public-key? (:cert test))))
-   (call-check `(, at gpgsm --import ,(in-srcdir (:name test))))
+   (call-check `(, at gpgsm --import ,(in-srcdir "tests" "gpgsm" (:name test))))
    (assert (sm-have-public-key? (:cert test))))
  (lambda (test) (:name test))
  certs-for-import)
diff --git a/tests/gpgsm/run-tests.scm b/tests/gpgsm/run-tests.scm
index e444245..bf129a1 100644
--- a/tests/gpgsm/run-tests.scm
+++ b/tests/gpgsm/run-tests.scm
@@ -17,16 +17,22 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(if (string=? "" (getenv "srcdir"))
+(if (string=? "" (getenv "abs_top_srcdir"))
     (begin
-      (echo "Environment variable 'srcdir' not set.  Please point it to"
+      (echo "Environment variable 'abs_top_srcdir' not set.  Please point it to"
 	    "tests/gpgsm.")
       (exit 2)))
 
 (let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
-       (setup (make-environment-cache (test::scm #f "setup.scm" "setup.scm")))
+       (setup (make-environment-cache (test::scm
+				       #f
+				       (path-join "tests" "gpgsm" "setup.scm")
+				       (in-srcdir "tests" "gpgsm" "setup.scm"))))
        (runner (if (and (member "--parallel" *args*)
 			(> (length tests) 1))
 		   run-tests-parallel
 		   run-tests-sequential)))
-  (runner (map (lambda (t) (test::scm setup t t)) tests)))
+  (runner (map (lambda (name)
+		 (test::scm setup
+			    (path-join "tests" "gpgsm" name)
+			    (in-srcdir "tests" "gpgsm" name))) tests)))
diff --git a/tests/gpgsm/setup.scm b/tests/gpgsm/setup.scm
index aa1ab41..c241b38 100644
--- a/tests/gpgsm/setup.scm
+++ b/tests/gpgsm/setup.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 
 (define tarball (flag "--create-tarball" *args*))
 (unless (and tarball (not (null? tarball)))
diff --git a/tests/gpgsm/shell.scm b/tests/gpgsm/shell.scm
index fe39fec..606e388 100644
--- a/tests/gpgsm/shell.scm
+++ b/tests/gpgsm/shell.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 ;; This is not a test, but can be used to inspect the test
diff --git a/tests/gpgsm/sign.scm b/tests/gpgsm/sign.scm
index 9b4f7fe..48b7b06 100644
--- a/tests/gpgsm/sign.scm
+++ b/tests/gpgsm/sign.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 (for-each-p
diff --git a/tests/gpgsm/verify.scm b/tests/gpgsm/verify.scm
index 28210a9..40dbd48 100644
--- a/tests/gpgsm/verify.scm
+++ b/tests/gpgsm/verify.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "gpgsm-defs.scm"))
+(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
 (setup-gpgsm-environment)
 
 ;;
diff --git a/tests/migrations/Makefile.am b/tests/migrations/Makefile.am
index 0895aff..e548723 100644
--- a/tests/migrations/Makefile.am
+++ b/tests/migrations/Makefile.am
@@ -31,9 +31,9 @@ AM_CFLAGS =
 TESTS_ENVIRONMENT = GPG_AGENT_INFO= LC_ALL=C \
 	EXEEXT=$(EXEEXT) \
 	PATH=../gpgscm:$(PATH) \
-	srcdir=$(abs_srcdir) \
+	abs_top_srcdir=$(abs_top_srcdir) \
 	objdir=$(abs_top_builddir) \
-	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/migrations
+	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
 
 XTESTS = from-classic.scm \
 	extended-pkf.scm \
@@ -54,7 +54,7 @@ check: xcheck
 .PHONY: xcheck
 xcheck:
 	$(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
-	  run-tests.scm $(TESTFLAGS) $(XTESTS)
+	  $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS)
 
 EXTRA_DIST = common.scm run-tests.scm setup.scm $(XTESTS) $(TEST_FILES)
 
diff --git a/tests/migrations/common.scm b/tests/migrations/common.scm
index cba6590..54d33b9 100644
--- a/tests/migrations/common.scm
+++ b/tests/migrations/common.scm
@@ -15,7 +15,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(if (string=? "" (getenv "srcdir"))
+(if (string=? "" (getenv "abs_top_srcdir"))
     (error "not called from make"))
 
 (let ((verbose (string->number (getenv "verbose"))))
diff --git a/tests/migrations/extended-pkf.scm b/tests/migrations/extended-pkf.scm
index 1317cd4..cc1a074 100755
--- a/tests/migrations/extended-pkf.scm
+++ b/tests/migrations/extended-pkf.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "common.scm"))
+(load (in-srcdir "tests" "migrations" "common.scm"))
 
 (catch (skip "gpgtar not built")
        (call-check `(,GPGTAR --help)))
@@ -31,7 +31,7 @@
 
 (run-test
  "Testing the extended private key format ..."
- (in-srcdir "extended-pkf.tar.asc")
+ (in-srcdir "tests" "migrations" "extended-pkf.tar.asc")
  (lambda (gpghome)
    (assert-keys-usable)))
 
diff --git a/tests/migrations/from-classic.scm b/tests/migrations/from-classic.scm
index ace458e..b473d70 100755
--- a/tests/migrations/from-classic.scm
+++ b/tests/migrations/from-classic.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "common.scm"))
+(load (in-srcdir "tests" "migrations" "common.scm"))
 
 (catch (skip "gpgtar not built")
        (call-check `(,GPGTAR --help)))
@@ -37,14 +37,14 @@
 
 (run-test
  "Testing a clean migration ..."
- (in-srcdir "from-classic.tar.asc")
+ (in-srcdir "tests" "migrations" "from-classic.tar.asc")
  (lambda (gpghome)
    (trigger-migration)
    (assert-migrated)))
 
 (run-test
  "Testing a migration with existing private-keys-v1.d ..."
- (in-srcdir "from-classic.tar.asc")
+ (in-srcdir "tests" "migrations" "from-classic.tar.asc")
  (lambda (gpghome)
    (mkdir "private-keys-v1.d" "-rwx")
    (trigger-migration)
@@ -52,7 +52,7 @@
 
 (run-test
  "Testing a migration with existing but weird private-keys-v1.d ..."
- (in-srcdir "from-classic.tar.asc")
+ (in-srcdir "tests" "migrations" "from-classic.tar.asc")
  (lambda (gpghome)
    (mkdir "private-keys-v1.d" "")
    (trigger-migration)
diff --git a/tests/migrations/issue2276.scm b/tests/migrations/issue2276.scm
index 9a0c160..8ea3f43 100755
--- a/tests/migrations/issue2276.scm
+++ b/tests/migrations/issue2276.scm
@@ -17,12 +17,12 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "common.scm"))
+(load (in-srcdir "tests" "migrations" "common.scm"))
 
 (run-test
  "Checking migration with legacy key (issue2276)..."
  ;; This tarball contains a keyring with a legacy key.
- (in-srcdir "issue2276.tar.asc")
+ (in-srcdir "tests" "migrations" "issue2276.tar.asc")
  (lambda (gpghome)
    ;; GnuPG up to 2.1.14 failed to skip the legacy key when updating
    ;; the trust database and thereby rebuilding the keyring cache.
diff --git a/tests/migrations/run-tests.scm b/tests/migrations/run-tests.scm
index b4ad260..1e4bb70 100644
--- a/tests/migrations/run-tests.scm
+++ b/tests/migrations/run-tests.scm
@@ -22,4 +22,7 @@
 			(> (length tests) 1))
 		   run-tests-parallel
 		   run-tests-sequential)))
-  (runner (map (lambda (t) (test::scm #f t t)) tests)))
+  (runner (map (lambda (name)
+		 (test::scm #f
+			    (path-join "tests" "migrations" name)
+			    (in-srcdir "tests" "migrations" name))) tests)))
diff --git a/tests/openpgp/4gb-packet.scm b/tests/openpgp/4gb-packet.scm
index 109e61d..e1c5ba5 100755
--- a/tests/openpgp/4gb-packet.scm
+++ b/tests/openpgp/4gb-packet.scm
@@ -20,10 +20,10 @@
 ;; GnuPG through 2.1.7 would incorrect mark packets whose size is
 ;; 2^32-1 as invalid and exit with status code 2.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (unless (have-compression-algo? "BZIP2")
 	(skip "BZIP2 support not compiled in."))
 
-(call-check `(, at GPG --list-packets ,(in-srcdir "4gb-packet.asc")))
+(call-check `(, at GPG --list-packets ,(in-srcdir "tests" "openpgp" "4gb-packet.asc")))
diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am
index 40f947b..354dff9 100644
--- a/tests/openpgp/Makefile.am
+++ b/tests/openpgp/Makefile.am
@@ -36,9 +36,9 @@ fake_pinentry_SOURCES = fake-pinentry.c
 TESTS_ENVIRONMENT = LC_ALL=C \
 	EXEEXT=$(EXEEXT) \
 	PATH=../gpgscm:$(PATH) \
-	srcdir=$(abs_srcdir) \
+	abs_top_srcdir=$(abs_top_srcdir) \
 	objdir=$(abs_top_builddir) \
-	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/openpgp
+	GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
 
 XTESTS = \
 	version.scm \
@@ -109,7 +109,7 @@ check: xcheck
 .PHONY: xcheck
 xcheck:
 	$(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
-	  run-tests.scm $(TESTFLAGS) $(XTESTS)
+	  $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS)
 
 TEST_FILES = pubring.asc secring.asc plain-1o.asc plain-2o.asc plain-3o.asc \
 	     plain-1.asc plain-2.asc plain-3.asc plain-1-pgp.asc \
diff --git a/tests/openpgp/armdetach.scm b/tests/openpgp/armdetach.scm
index 3bae28b..105f52d 100755
--- a/tests/openpgp/armdetach.scm
+++ b/tests/openpgp/armdetach.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/armdetachm.scm b/tests/openpgp/armdetachm.scm
index 6812263..27038a0 100755
--- a/tests/openpgp/armdetachm.scm
+++ b/tests/openpgp/armdetachm.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define files (append plain-files data-files))
diff --git a/tests/openpgp/armencrypt.scm b/tests/openpgp/armencrypt.scm
index 21131ea..6d6ec4d 100755
--- a/tests/openpgp/armencrypt.scm
+++ b/tests/openpgp/armencrypt.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/armencryptp.scm b/tests/openpgp/armencryptp.scm
index 4a00166..4bcc058 100755
--- a/tests/openpgp/armencryptp.scm
+++ b/tests/openpgp/armencryptp.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/armor.scm b/tests/openpgp/armor.scm
index 6f57c78..3c117dd 100755
--- a/tests/openpgp/armor.scm
+++ b/tests/openpgp/armor.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define armored_key_8192 "-----BEGIN PGP PUBLIC KEY BLOCK-----
diff --git a/tests/openpgp/armsignencrypt.scm b/tests/openpgp/armsignencrypt.scm
index 49eea07..97595f0 100755
--- a/tests/openpgp/armsignencrypt.scm
+++ b/tests/openpgp/armsignencrypt.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/armsigs.scm b/tests/openpgp/armsigs.scm
index 2fab729..ccab816 100755
--- a/tests/openpgp/armsigs.scm
+++ b/tests/openpgp/armsigs.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/clearsig.scm b/tests/openpgp/clearsig.scm
index a9f20f2..b1c72c2 100755
--- a/tests/openpgp/clearsig.scm
+++ b/tests/openpgp/clearsig.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define (check-signing args input)
diff --git a/tests/openpgp/compression.scm b/tests/openpgp/compression.scm
index bab7572..d2e46cc 100755
--- a/tests/openpgp/compression.scm
+++ b/tests/openpgp/compression.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/conventional-mdc.scm b/tests/openpgp/conventional-mdc.scm
index af27fad..bb8327a 100755
--- a/tests/openpgp/conventional-mdc.scm
+++ b/tests/openpgp/conventional-mdc.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define s2k '--s2k-count=65536)
diff --git a/tests/openpgp/conventional.scm b/tests/openpgp/conventional.scm
index 4bca3c9..c480400 100755
--- a/tests/openpgp/conventional.scm
+++ b/tests/openpgp/conventional.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define s2k '--s2k-count=65536)
diff --git a/tests/openpgp/decrypt-dsa.scm b/tests/openpgp/decrypt-dsa.scm
index 640dfd2..9f39732 100755
--- a/tests/openpgp/decrypt-dsa.scm
+++ b/tests/openpgp/decrypt-dsa.scm
@@ -17,14 +17,14 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
  "Checking decryption of supplied DSA encrypted file"
  (lambda (name)
    (tr:do
-    (tr:open (in-srcdir (string-append name "-pgp.asc")))
+    (tr:open (in-srcdir "tests" "openpgp" (string-append name "-pgp.asc")))
     (tr:gpg "" '(--yes --decrypt))
     (tr:assert-identity name)))
  (list (car plain-files)))
diff --git a/tests/openpgp/decrypt-multifile.scm b/tests/openpgp/decrypt-multifile.scm
index a7695b1..304ca49 100755
--- a/tests/openpgp/decrypt-multifile.scm
+++ b/tests/openpgp/decrypt-multifile.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (info "Checking decryption of supplied files using --multifile.")
@@ -31,7 +31,7 @@
  ;; First, copy the files so that GnuPG writes the decrypted files here
  ;; and not into the source directory.
  (for-each (lambda (name)
-	     (file-copy (in-srcdir name) name))
+	     (file-copy (in-srcdir "tests" "openpgp" name) name))
 	   encrypted-files)
 
  ;; Now decrypt all files.
diff --git a/tests/openpgp/decrypt-session-key.scm b/tests/openpgp/decrypt-session-key.scm
index 989ce30..35aa7f3 100755
--- a/tests/openpgp/decrypt-session-key.scm
+++ b/tests/openpgp/decrypt-session-key.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define (get-session-key filename)
@@ -35,7 +35,7 @@
 (for-each-p
  "Checking decryption of supplied files using the session key."
  (lambda (name)
-   (let* ((source (in-srcdir (string-append name ".asc")))
+   (let* ((source (in-srcdir "tests" "openpgp" (string-append name ".asc")))
 	  (key (get-session-key source)))
      (with-ephemeral-home-directory setup-environment
       (tr:do
diff --git a/tests/openpgp/decrypt-unwrap-verify.scm b/tests/openpgp/decrypt-unwrap-verify.scm
index ef9a99a..bf7d14d 100755
--- a/tests/openpgp/decrypt-unwrap-verify.scm
+++ b/tests/openpgp/decrypt-unwrap-verify.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (lettmp (steve's-key)
@@ -29,7 +29,7 @@
      ;; First, unwrap the encrypted message using Steve's secret key.
      (lettmp (unwrapped)
        (tr:do
-	(tr:open (in-srcdir "samplemsgs" (string-append name ".asc")))
+	(tr:open (in-srcdir "tests" "openpgp" "samplemsgs" (string-append name ".asc")))
 	(tr:gpg "" `(--yes --decrypt --unwrap))
 	(tr:write-to unwrapped))
 
diff --git a/tests/openpgp/decrypt.scm b/tests/openpgp/decrypt.scm
index 8dac38a..aae4c96 100755
--- a/tests/openpgp/decrypt.scm
+++ b/tests/openpgp/decrypt.scm
@@ -17,14 +17,14 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
  "Checking decryption of supplied files"
  (lambda (name)
    (tr:do
-    (tr:open (in-srcdir (string-append name ".asc")))
+    (tr:open (in-srcdir "tests" "openpgp" (string-append name ".asc")))
     (tr:gpg "" '(--yes --decrypt))
     (tr:assert-identity name)))
  plain-files)
diff --git a/tests/openpgp/default-key.scm b/tests/openpgp/default-key.scm
index a90cca8..3580cad 100755
--- a/tests/openpgp/default-key.scm
+++ b/tests/openpgp/default-key.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 ;; Import the sample key
@@ -33,7 +33,7 @@
 (info "Importing public key.")
 (call-check
  `(,(tool 'gpg) --import
-   ,(in-srcdir "samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc")))
+   ,(in-srcdir "tests" "openpgp" "samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc")))
 
 ;; By default, the most recent, valid signing subkey (1EA97479).
 (for-each-p
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index c4b321c..38d25d8 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -318,7 +318,7 @@
   (log "Creating configuration files")
   (for-each
    (lambda (name)
-     (file-copy (in-srcdir (string-append name ".tmpl")) name)
+     (file-copy (in-srcdir "tests" "openpgp" (string-append name ".tmpl")) name)
      (let ((p (open-input-output-file name)))
        (cond
 	((string=? "gpg.conf" name)
@@ -349,7 +349,7 @@
   (log "Unpacking samples")
   (for-each
    (lambda (name)
-     (dearmor (in-srcdir ".." "openpgp" (string-append name "o.asc")) name))
+     (dearmor (in-srcdir "tests" "openpgp" (string-append name "o.asc")) name))
    plain-files))
 
 (define (create-legacy-gpghome)
@@ -358,7 +358,7 @@
   (log "Storing private keys")
   (for-each
    (lambda (name)
-     (dearmor (in-srcdir (string-append "/privkeys/" name ".asc"))
+     (dearmor (in-srcdir "tests" "openpgp" "privkeys" (string-append name ".asc"))
 	      (string-append "private-keys-v1.d/" name ".key")))
    '("50B2D4FA4122C212611048BC5FC31BD44393626E"
      "7E201E28B6FEB2927B321F443205F4724EBE637E"
@@ -382,11 +382,11 @@
   (log "Importing public demo and test keys")
   (for-each
    (lambda (file)
-     (call-check `(, at GPG --yes --import ,(in-srcdir file))))
+     (call-check `(, at GPG --yes --import ,(in-srcdir "tests" "openpgp" file))))
    (list "pubdemo.asc" "pubring.asc" key-file1))
 
   (pipe:do
-   (pipe:open (in-srcdir "pubring.pkr.asc") (logior O_RDONLY O_BINARY))
+   (pipe:open (in-srcdir "tests" "openpgp" "pubring.pkr.asc") (logior O_RDONLY O_BINARY))
    (pipe:spawn `(, at GPG --dearmor))
    (pipe:spawn `(, at GPG --yes --import))))
 
diff --git a/tests/openpgp/delete-keys.scm b/tests/openpgp/delete-keys.scm
index 9a187a2..76cd424 100755
--- a/tests/openpgp/delete-keys.scm
+++ b/tests/openpgp/delete-keys.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (let* ((key keys::alfa)
diff --git a/tests/openpgp/detach.scm b/tests/openpgp/detach.scm
index ac2bc36..12ed167 100755
--- a/tests/openpgp/detach.scm
+++ b/tests/openpgp/detach.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/detachm.scm b/tests/openpgp/detachm.scm
index 0b64458..75faab7 100755
--- a/tests/openpgp/detachm.scm
+++ b/tests/openpgp/detachm.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define files (append plain-files data-files))
diff --git a/tests/openpgp/ecc.scm b/tests/openpgp/ecc.scm
index 2ea8c39..d7c02a5 100755
--- a/tests/openpgp/ecc.scm
+++ b/tests/openpgp/ecc.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define keygrips '("8E06A180EFFE4C65B812150CAF19BF30C0689A4C"
@@ -48,7 +48,7 @@
 (for-each
  (lambda (n)
    (call-check `(,(tool 'gpg) --import
-		 ,(in-srcdir (string-append
+		 ,(in-srcdir "tests" "openpgp" (string-append
 			      "samplekeys/ecc-sample-"
 			      (number->string n)
 			      "-pub.asc")))))
@@ -117,7 +117,7 @@ Ic1RdzgeCfosMF+l/zVRchcLKzenEQA=
  (lambda (n)
    (call-check `(,(tool 'gpg) --import
 		 ,@(if (> n 1) '(--allow-non-selfsigned-uid) '())
-		 ,(in-srcdir (string-append
+		 ,(in-srcdir "tests" "openpgp" (string-append
 			      "samplekeys/ecc-sample-"
 			      (number->string n)
 			      "-sec.asc")))))
@@ -242,7 +242,7 @@ Rg==
  (lambda (n)
    (call-check `(,(tool 'gpg) --import
 		 ,@(if (> n 1) '(--allow-non-selfsigned-uid) '())
-		 ,(in-srcdir (string-append
+		 ,(in-srcdir "tests" "openpgp" (string-append
 			      "samplekeys/ecc-sample-"
 			      (number->string n)
 			      "-sec.asc")))))
diff --git a/tests/openpgp/enarmor.scm b/tests/openpgp/enarmor.scm
index a301ccd..1fe3256 100755
--- a/tests/openpgp/enarmor.scm
+++ b/tests/openpgp/enarmor.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/encrypt-dsa.scm b/tests/openpgp/encrypt-dsa.scm
index 0c5a2fd..1658973 100755
--- a/tests/openpgp/encrypt-dsa.scm
+++ b/tests/openpgp/encrypt-dsa.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/encrypt-multifile.scm b/tests/openpgp/encrypt-multifile.scm
index d55971c..1b69ff5 100755
--- a/tests/openpgp/encrypt-multifile.scm
+++ b/tests/openpgp/encrypt-multifile.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define files (append plain-files data-files))
diff --git a/tests/openpgp/encrypt.scm b/tests/openpgp/encrypt.scm
index 1888a00..f59a1f0 100755
--- a/tests/openpgp/encrypt.scm
+++ b/tests/openpgp/encrypt.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
@@ -54,8 +54,8 @@
    (tr:do
     (tr:open source)
     (tr:gpg "" `(--yes -v --no-keyring --encrypt
-                 --recipient-file ,(in-srcdir key-file1)
-                 --hidden-recipient-file ,(in-srcdir key-file2)))
+                 --recipient-file ,(in-srcdir "tests" "openpgp" key-file1)
+                 --hidden-recipient-file ,(in-srcdir "tests" "openpgp" key-file2)))
     (tr:gpg "" '(--yes --decrypt))
     (tr:assert-identity source)))
  plain-files)
diff --git a/tests/openpgp/encryptp.scm b/tests/openpgp/encryptp.scm
index ccd5c7b..0f09a1e 100755
--- a/tests/openpgp/encryptp.scm
+++ b/tests/openpgp/encryptp.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/export.scm b/tests/openpgp/export.scm
index c10fc81..aa6fa78 100755
--- a/tests/openpgp/export.scm
+++ b/tests/openpgp/export.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define (check-for predicate lines message)
diff --git a/tests/openpgp/genkey1024.scm b/tests/openpgp/genkey1024.scm
index 60eba0b..4edf490 100755
--- a/tests/openpgp/genkey1024.scm
+++ b/tests/openpgp/genkey1024.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (define (genkey config)
diff --git a/tests/openpgp/gpgconf.scm b/tests/openpgp/gpgconf.scm
index 33d04d8..a940b45 100644
--- a/tests/openpgp/gpgconf.scm
+++ b/tests/openpgp/gpgconf.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (for-each-p'
diff --git a/tests/openpgp/gpgtar.scm b/tests/openpgp/gpgtar.scm
index c88589f..906707f 100755
--- a/tests/openpgp/gpgtar.scm
+++ b/tests/openpgp/gpgtar.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (catch (skip "gpgtar not built")
diff --git a/tests/openpgp/gpgv-forged-keyring.scm b/tests/openpgp/gpgv-forged-keyring.scm
index 6885cd9..886d265 100755
--- a/tests/openpgp/gpgv-forged-keyring.scm
+++ b/tests/openpgp/gpgv-forged-keyring.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define msg_signed_asc "
@@ -63,6 +63,6 @@ N1Glbw1OJfP1q+QFPMPKoCsTYmZpuugq2b5gV/eH0Abvk2pG4Fo/YTDPHhec7Jk=
    (catch '()
 	  (pipe:do
 	   (pipe:echo (eval armored-file (current-environment)))
-	   (pipe:spawn `(, at GPGV --keyring ,(in-srcdir "forged-keyring.gpg"))))
+	   (pipe:spawn `(, at GPGV --keyring ,(in-srcdir "tests" "openpgp" "forged-keyring.gpg"))))
 	  (fail "verification succeeded but should not")))
  '(msg_signed_asc))
diff --git a/tests/openpgp/import-revocation-certificate.scm b/tests/openpgp/import-revocation-certificate.scm
index 9231afc..c685dc5 100644
--- a/tests/openpgp/import-revocation-certificate.scm
+++ b/tests/openpgp/import-revocation-certificate.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 ;; XXX because of --always-trust, the trustdb is not created.
@@ -25,7 +25,7 @@
 (define gpg `(,(tool 'gpg) --no-permission-warning))
 
 (info "Checking key revocation.")
-(call-check `(, at gpg --import ,(in-srcdir "samplemsgs"
+(call-check `(, at gpg --import ,(in-srcdir "tests" "openpgp" "samplemsgs"
 					 "revoke-2D727CC768697734.asc")))
 (let loop ((output (gpg-with-colons '(--list-secret-keys "2D727CC768697734"))))
   (unless (null? output)
diff --git a/tests/openpgp/import.scm b/tests/openpgp/import.scm
index 3b41746..1f4cb2e 100755
--- a/tests/openpgp/import.scm
+++ b/tests/openpgp/import.scm
@@ -17,17 +17,17 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (info "Checking bug 894: segv importing certain keys.")
-(call-check `(,(tool 'gpg) --import ,(in-srcdir "bug894-test.asc")))
+(call-check `(,(tool 'gpg) --import ,(in-srcdir "tests" "openpgp" "bug894-test.asc")))
 
 (define keyid "0xC108E83A")
 (info "Checking bug 1223: designated revoker sigs are not properly merged.")
 (call `(,(tool 'gpg) --delete-key --batch --yes ,keyid))
-(call `(,(tool 'gpg) --import ,(in-srcdir "bug1223-bogus.asc")))
-(call `(,(tool 'gpg) --import ,(in-srcdir "bug1223-good.asc")))
+(call `(,(tool 'gpg) --import ,(in-srcdir "tests" "openpgp" "bug1223-bogus.asc")))
+(call `(,(tool 'gpg) --import ,(in-srcdir "tests" "openpgp" "bug1223-good.asc")))
 (tr:do
  (tr:pipe-do
   (pipe:gpg `(--list-keys --with-colons ,keyid)))
@@ -44,8 +44,8 @@
 (define fpr2 "A55120427374F3F7AA5F1166DDA252EBB8EBE1AF")
 (info "Checking import of two keys with colliding long key ids.")
 (call `(,(tool 'gpg) --delete-key --batch --yes ,fpr1 ,fpr2))
-(call `(,(tool 'gpg) --import ,(in-srcdir "samplekeys/dda252ebb8ebe1af-1.asc")))
-(call `(,(tool 'gpg) --import ,(in-srcdir "samplekeys/dda252ebb8ebe1af-2.asc")))
+(call `(,(tool 'gpg) --import ,(in-srcdir "tests" "openpgp" "samplekeys/dda252ebb8ebe1af-1.asc")))
+(call `(,(tool 'gpg) --import ,(in-srcdir "tests" "openpgp" "samplekeys/dda252ebb8ebe1af-2.asc")))
 (tr:do
  (tr:pipe-do
   (pipe:gpg `(--list-keys --with-colons ,fpr1 ,fpr2)))
diff --git a/tests/openpgp/issue2015.scm b/tests/openpgp/issue2015.scm
index 39df333..2f0672d 100755
--- a/tests/openpgp/issue2015.scm
+++ b/tests/openpgp/issue2015.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (info "Checking passphrase cache (issue2015)...")
diff --git a/tests/openpgp/issue2346.scm b/tests/openpgp/issue2346.scm
index 9765453..9c29516 100755
--- a/tests/openpgp/issue2346.scm
+++ b/tests/openpgp/issue2346.scm
@@ -17,10 +17,10 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
-(define key (in-srcdir "samplekeys/issue2346.gpg"))
+(define key (in-srcdir "tests" "openpgp" "samplekeys/issue2346.gpg"))
 
 (info "Checking import statistics (issue2346)...")
 (let ((status (call-popen `(, at GPG --status-fd=1 --import ,key) "")))
diff --git a/tests/openpgp/issue2417.scm b/tests/openpgp/issue2417.scm
index f584000..32fe47f 100755
--- a/tests/openpgp/issue2417.scm
+++ b/tests/openpgp/issue2417.scm
@@ -17,10 +17,10 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
-(define keyfile (in-srcdir "samplekeys" "rsa-rsa-sample-1.asc"))
+(define keyfile (in-srcdir "tests" "openpgp" "samplekeys" "rsa-rsa-sample-1.asc"))
 
 (define (touch file-name)
   (close (open file-name (logior O_WRONLY O_BINARY O_CREAT) #o600)))
diff --git a/tests/openpgp/issue2419.scm b/tests/openpgp/issue2419.scm
index e397a88..641fb32 100755
--- a/tests/openpgp/issue2419.scm
+++ b/tests/openpgp/issue2419.scm
@@ -17,13 +17,13 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (info "Checking iobuf_peek corner case (issue2419)...")
 (lettmp
  (onebyte)
- (dearmor (in-srcdir "samplemsgs/issue2419.asc") onebyte)
+ (dearmor (in-srcdir "tests" "openpgp" "samplemsgs/issue2419.asc") onebyte)
  (catch (assert (string-contains? (car *error*) "invalid packet"))
 	(call-popen `(, at GPG --list-packets ,onebyte) "")
 	(fail "Expected an error but got none")))
diff --git a/tests/openpgp/issue2929.scm b/tests/openpgp/issue2929.scm
index 121103b..d5c94cf 100644
--- a/tests/openpgp/issue2929.scm
+++ b/tests/openpgp/issue2929.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (catch (skip "Tofu not supported")
diff --git a/tests/openpgp/issue2941.scm b/tests/openpgp/issue2941.scm
index d7220e0..8f625eb 100755
--- a/tests/openpgp/issue2941.scm
+++ b/tests/openpgp/issue2941.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define (check-failure options)
diff --git a/tests/openpgp/key-selection.scm b/tests/openpgp/key-selection.scm
index 020c9b4..511c2e2 100644
--- a/tests/openpgp/key-selection.scm
+++ b/tests/openpgp/key-selection.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 ;; This test assumes a fixed time of 2004-01-01.
@@ -52,7 +52,7 @@
 (define :comment cadr)
 (define :number caddr)
 (define (:filename key)
-  (in-srcdir "key-selection"
+  (in-srcdir "tests" "openpgp" "key-selection"
 	     (string-append (number->string (:number key)) ".asc")))
 
 (define (delete-keys which)
diff --git a/tests/openpgp/mds.scm b/tests/openpgp/mds.scm
index fb468e5..50761d0 100755
--- a/tests/openpgp/mds.scm
+++ b/tests/openpgp/mds.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (define empty-string-hashes
diff --git a/tests/openpgp/multisig.scm b/tests/openpgp/multisig.scm
index c643ac8..75682eb 100755
--- a/tests/openpgp/multisig.scm
+++ b/tests/openpgp/multisig.scm
@@ -23,7 +23,7 @@
 ;; Note: We do not support multiple signatures anymore thus this test is
 ;; not really needed because verify could do the same.  We keep it anyway.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define sig-1ls1ls-valid "
diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm
index 85e56ca..8d14ae1 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (load (with-path "time.scm"))
 (setup-environment)
 
diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index 139f618..d443d1f 100644
--- a/tests/openpgp/run-tests.scm
+++ b/tests/openpgp/run-tests.scm
@@ -17,9 +17,9 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(if (string=? "" (getenv "srcdir"))
+(if (string=? "" (getenv "abs_top_srcdir"))
     (begin
-      (echo "Environment variable 'srcdir' not set.  Please point it to"
+      (echo "Environment variable 'abs_top_srcdir' not set.  Please point it to"
 	    "tests/openpgp.")
       (exit 2)))
 
@@ -27,9 +27,15 @@
 (setenv "objdir" (getcwd) #f)
 
 (let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
-       (setup (make-environment-cache (test::scm #f "setup.scm" "setup.scm")))
+       (setup (make-environment-cache (test::scm
+				       #f
+				       (path-join "tests" "openpgp" "setup.scm")
+				       (in-srcdir "tests" "openpgp" "setup.scm"))))
        (runner (if (and (member "--parallel" *args*)
 			(> (length tests) 1))
 		   run-tests-parallel
 		   run-tests-sequential)))
-  (runner (map (lambda (t) (test::scm setup t t)) tests))))
+  (runner (map (lambda (name)
+		 (test::scm setup
+			    (path-join "tests" "openpgp" name)
+			    (in-srcdir "tests" "openpgp" name))) tests)))
diff --git a/tests/openpgp/seat.scm b/tests/openpgp/seat.scm
index 31bd71a..5cbfbe1 100755
--- a/tests/openpgp/seat.scm
+++ b/tests/openpgp/seat.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/setup.scm b/tests/openpgp/setup.scm
index a7d14e7..00eed53 100755
--- a/tests/openpgp/setup.scm
+++ b/tests/openpgp/setup.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 
 (unless (member "--create-tarball" *args*)
 	(fail "Usage: setup.scm --create-tarball <file>"))
diff --git a/tests/openpgp/shell.scm b/tests/openpgp/shell.scm
index ea4b540..bd6059a 100644
--- a/tests/openpgp/shell.scm
+++ b/tests/openpgp/shell.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 ;; This is not a test, but can be used to inspect the test
diff --git a/tests/openpgp/signencrypt-dsa.scm b/tests/openpgp/signencrypt-dsa.scm
index 00ce625..1a8f9df 100755
--- a/tests/openpgp/signencrypt-dsa.scm
+++ b/tests/openpgp/signencrypt-dsa.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/signencrypt.scm b/tests/openpgp/signencrypt.scm
index 3021eb4..c00e370 100755
--- a/tests/openpgp/signencrypt.scm
+++ b/tests/openpgp/signencrypt.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
@@ -33,7 +33,8 @@
 (info "Checking bug 537: MDC problem with old style compressed packets.")
 (lettmp (tmp)
   (call-popen `(, at GPG --yes --passphrase-fd "0"
-		      --output ,tmp --decrypt ,(in-srcdir "bug537-test.data.asc"))
+		      --output ,tmp --decrypt ,(in-srcdir "tests" "openpgp"
+							  "bug537-test.data.asc"))
 	      usrpass1)
   (if (not (string=? "4336AE2A528FAE091E73E59E325B588FEE795F9B"
 		     (cadar (gpg-hash-string `(--print-md SHA1 ,tmp) ""))))
diff --git a/tests/openpgp/sigs-dsa.scm b/tests/openpgp/sigs-dsa.scm
index d8494d5..82dc624 100755
--- a/tests/openpgp/sigs-dsa.scm
+++ b/tests/openpgp/sigs-dsa.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/sigs.scm b/tests/openpgp/sigs.scm
index c2298f9..2b1cf3c 100755
--- a/tests/openpgp/sigs.scm
+++ b/tests/openpgp/sigs.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (for-each-p
diff --git a/tests/openpgp/ssh-export.scm b/tests/openpgp/ssh-export.scm
index 322620e..7f51447 100755
--- a/tests/openpgp/ssh-export.scm
+++ b/tests/openpgp/ssh-export.scm
@@ -17,11 +17,11 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (define key
-  `(,(in-srcdir "samplekeys" "authenticate-only.sec.asc")
+  `(,(in-srcdir "tests" "openpgp" "samplekeys" "authenticate-only.sec.asc")
     "927EF377FD1A1B6F795E40C02A87917D8FFBA49F"
     "72360FDB6380212D5DAF2FA9E51185A9253C496D"
     "ssh-rsa"))
diff --git a/tests/openpgp/ssh-import.scm b/tests/openpgp/ssh-import.scm
index d210056..555f198 100755
--- a/tests/openpgp/ssh-import.scm
+++ b/tests/openpgp/ssh-import.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (setenv "SSH_AUTH_SOCK"
@@ -76,7 +76,7 @@
 (for-each-p'
  "Importing ssh keys..."
  (lambda (key)
-   (let ((file (path-join (in-srcdir "samplekeys")
+   (let ((file (path-join (in-srcdir "tests" "openpgp" "samplekeys")
 			  (string-append "ssh-" (car key) ".key")))
 	 (hash (cadr key)))
      ;; We pipe the key to ssh-add so that it won't complain about
@@ -91,7 +91,7 @@
 (info "Checking for issue2316...")
 (unlink (path-join GNUPGHOME "sshcontrol"))
 (pipe:do
- (pipe:open (path-join (in-srcdir "samplekeys")
+ (pipe:open (path-join (in-srcdir "tests" "openpgp" "samplekeys")
 		       (string-append "ssh-rsa.key"))
 	    (logior O_RDONLY O_BINARY))
  (pipe:spawn `(,SSH-ADD -)))
diff --git a/tests/openpgp/tofu.scm b/tests/openpgp/tofu.scm
index aeeef07..58b2a03 100755
--- a/tests/openpgp/tofu.scm
+++ b/tests/openpgp/tofu.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (load (with-path "time.scm"))
 (setup-environment)
 
@@ -41,7 +41,7 @@
 ;; Import the test keys.
 (for-each (lambda (keyid)
             (call-check `(, at GPG --import
-                                ,(in-srcdir "tofu/conflicting/"
+                                ,(in-srcdir "tests" "openpgp" "tofu" "conflicting"
                                             (string-append keyid ".gpg"))))
 	    (catch (fail "Missing key" keyid)
 		   (call-check `(, at GPG --list-keys ,keyid))))
@@ -108,7 +108,7 @@
 
 ;; Verify a message.  There should be no conflict and the trust
 ;; policy should be set to auto.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/1C005AF3-1.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-1.txt")))
 
 (checkpolicy "1C005AF3" "auto")
 ;; Check default trust.
@@ -163,7 +163,7 @@
 ;; auto), but not affect 1C005AF3's policy.
 (setpolicy "BE04EB2B" "auto")
 (checkpolicy "BE04EB2B" "ask")
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/B662E42F-1.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "B662E42F-1.txt")))
 (checkpolicy "BE04EB2B" "ask")
 (checkpolicy "1C005AF3" "bad")
 (checkpolicy "B662E42F" "ask")
@@ -208,26 +208,26 @@
 (check-counts "B662E42F" 0 0 0 0)
 
 ;; Verify a message.  The signature count should increase by 1.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/1C005AF3-1.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-1.txt")))
 
 (check-counts "1C005AF3" 1 1 0 0)
 
 ;; Verify the same message.  The signature count should remain the
 ;; same.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/1C005AF3-1.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-1.txt")))
 (check-counts "1C005AF3" 1 1 0 0)
 
 ;; Verify another message.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/1C005AF3-2.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-2.txt")))
 (check-counts "1C005AF3" 2 1 0 0)
 
 ;; Verify another message.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/1C005AF3-3.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-3.txt")))
 (check-counts "1C005AF3" 3 1 0 0)
 
 ;; Verify a message from a different sender.  The signature count
 ;; should increase by 1 for that key.
-(call-check `(, at GPG --verify ,(in-srcdir "tofu/conflicting/BE04EB2B-1.txt")))
+(call-check `(, at GPG --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "BE04EB2B-1.txt")))
 (check-counts "1C005AF3" 3 1 0 0)
 (check-counts "BE04EB2B" 1 1 0 0)
 (check-counts "B662E42F" 0 0 0 0)
@@ -236,34 +236,34 @@
 ;; when the message was first verified, not when the signer claimed
 ;; that it was signed.)
 (call-check `(, at GPG ,(faketime (days->seconds 2))
-		    --verify ,(in-srcdir "tofu/conflicting/1C005AF3-4.txt")))
+		    --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-4.txt")))
 (check-counts "1C005AF3" 4 2 0 0)
 (check-counts "BE04EB2B" 1 1 0 0)
 (check-counts "B662E42F" 0 0 0 0)
 
 ;; And another.
 (call-check `(, at GPG ,(faketime (days->seconds 2))
-		    --verify ,(in-srcdir "tofu/conflicting/1C005AF3-5.txt")))
+		    --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "1C005AF3-5.txt")))
 (check-counts "1C005AF3" 5 2 0 0)
 (check-counts "BE04EB2B" 1 1 0 0)
 (check-counts "B662E42F" 0 0 0 0)
 
 ;; Another, but for a different key.
 (call-check `(, at GPG ,(faketime (days->seconds 2))
-		    --verify ,(in-srcdir "tofu/conflicting/BE04EB2B-2.txt")))
+		    --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "BE04EB2B-2.txt")))
 (check-counts "1C005AF3" 5 2 0 0)
 (check-counts "BE04EB2B" 2 2 0 0)
 (check-counts "B662E42F" 0 0 0 0)
 
 ;; And add a third day.
 (call-check `(, at GPG ,(faketime (days->seconds 4))
-		    --verify ,(in-srcdir "tofu/conflicting/BE04EB2B-3.txt")))
+		    --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "BE04EB2B-3.txt")))
 (check-counts "1C005AF3" 5 2 0 0)
 (check-counts "BE04EB2B" 3 3 0 0)
 (check-counts "B662E42F" 0 0 0 0)
 
 (call-check `(, at GPG ,(faketime (days->seconds 4))
-		    --verify ,(in-srcdir "tofu/conflicting/BE04EB2B-4.txt")))
+		    --verify ,(in-srcdir "tests" "openpgp" "tofu" "conflicting" "BE04EB2B-4.txt")))
 (check-counts "1C005AF3" 5 2 0 0)
 (check-counts "BE04EB2B" 4 3 0 0)
 (check-counts "B662E42F" 0 0 0 0)
@@ -293,15 +293,15 @@
    (lambda (key)
      (for-each
       (lambda (i)
-        (let ((fn (in-srcdir DIR (string-append key "-" i ".txt"))))
+        (let ((fn (in-srcdir "tests" "openpgp" DIR (string-append key "-" i ".txt"))))
           (call-check `(, at GPG --verify ,fn))))
       (list "1" "2")))
    (list KEYIDA KEYIDB)))
 
 ;; Import the public keys.
 (display "    > Two keys. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDA "-1.gpg"))))
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-1.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDA "-1.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-1.gpg"))))
 ;; Make sure the tofu engine registers the keys.
 (verify-messages)
 (display "<\n")
@@ -312,8 +312,8 @@
 
 ;; Import the cross sigs.
 (display "    > Adding cross signatures. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDA "-2.gpg"))))
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-2.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDA "-2.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-2.gpg"))))
 (verify-messages)
 (display "<\n")
 
@@ -323,7 +323,7 @@
 
 ;; Import the conflicting user id.
 (display "    > Adding conflicting user id. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-3.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-3.gpg"))))
 (verify-messages)
 (display "<\n")
 
@@ -333,7 +333,7 @@
 ;; Import Alice's signature on the conflicting user id.  Since there
 ;; is now a cross signature, we should revert to the default policy.
 (display "    > Adding cross signature on user id. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-4.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-4.gpg"))))
 (verify-messages)
 (display "<\n")
 
@@ -385,15 +385,15 @@
    (lambda (key)
      (for-each
       (lambda (i)
-        (let ((fn (in-srcdir DIR (string-append key "-" i ".txt"))))
+        (let ((fn (in-srcdir "tests" "openpgp" DIR (string-append key "-" i ".txt"))))
           (call-check `(, at GPG --verify ,fn))))
       (list "1" "2")))
    (list KEYIDA KEYIDB)))
 
 ;; Import the public keys.
 (display "    > Two keys. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDA "-1.gpg"))))
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-1.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDA "-1.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-1.gpg"))))
 (display "<\n")
 
 (checkpolicy KEYA "auto")
@@ -401,8 +401,8 @@
 
 ;; Import the cross sigs.
 (display "    > Adding cross signatures. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDA "-2.gpg"))))
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-2.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDA "-2.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-2.gpg"))))
 (display "<\n")
 
 (checkpolicy KEYA "auto")
@@ -423,7 +423,7 @@
 
 ;; Import the conflicting user id.
 (display "    > Adding conflicting user id. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-3.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-3.gpg"))))
 (verify-messages)
 (display "<\n")
 
@@ -432,7 +432,7 @@
 
 ;; Import Alice's signature on the conflicting user id.
 (display "    > Adding cross signature on user id. ")
-(call-check `(, at GPG --import ,(in-srcdir DIR (string-append KEYIDB "-4.gpg"))))
+(call-check `(, at GPG --import ,(in-srcdir "tests" "openpgp" DIR (string-append KEYIDB "-4.gpg"))))
 (verify-messages)
 (display "<\n")
 
diff --git a/tests/openpgp/use-exact-key.scm b/tests/openpgp/use-exact-key.scm
index 18851da..8bff9af 100755
--- a/tests/openpgp/use-exact-key.scm
+++ b/tests/openpgp/use-exact-key.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 ;; Import the sample key
@@ -33,7 +33,7 @@
 (info "Importing public key.")
 (call-check
  `(,(tool 'gpg) --import
-   ,(in-srcdir "samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc")))
+   ,(in-srcdir "tests" "openpgp" "samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc")))
 
 ;; By default, the most recent, valid signing subkey (1EA97479).
 (for-each-p
diff --git a/tests/openpgp/verify-multifile.scm b/tests/openpgp/verify-multifile.scm
index f1cbe99..9ebb672 100755
--- a/tests/openpgp/verify-multifile.scm
+++ b/tests/openpgp/verify-multifile.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 (define files '("clearsig-1-key-1.asc" "signed-1-key-1.asc"))
@@ -27,7 +27,7 @@
 (let* ((status
 	(call-popen
 	 `(, at gpg --verify --multifile --status-fd=1
-		 ,@(map (lambda (name) (in-srcdir "samplemsgs" name)) files))
+		 ,@(map (lambda (name) (in-srcdir "tests" "openpgp" "samplemsgs" name)) files))
 	 ""))
        (lines (map (lambda (l)
 		     (assert (string-prefix? l "[GNUPG:] "))
diff --git a/tests/openpgp/verify.scm b/tests/openpgp/verify.scm
index d3bd763..cb6eb59 100755
--- a/tests/openpgp/verify.scm
+++ b/tests/openpgp/verify.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-legacy-environment)
 
 ;;
@@ -343,7 +343,7 @@ GisM
 
 ;;; Need to import the ed25519 sample key used for
 ;;; the next two tests.
-(call-check `(, at GPG --quiet --yes --import ,(in-srcdir key-file2)))
+(call-check `(, at GPG --quiet --yes --import ,(in-srcdir "tests" "openpgp" key-file2)))
 (for-each-p
  "Checking that a valid Ed25519 signature is verified as such"
  (lambda (armored-file)
diff --git a/tests/openpgp/version.scm b/tests/openpgp/version.scm
index 2b211d8..c2252c5 100755
--- a/tests/openpgp/version.scm
+++ b/tests/openpgp/version.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-(load (with-path "defs.scm"))
+(load (in-srcdir "tests" "openpgp" "defs.scm"))
 (setup-environment)
 
 (info "Printing the GPG version")

commit f03d6897be904da58cad76b4bd07729922b47616
Author: Justus Winter <justus at g10code.com>
Date:   Wed Apr 19 16:09:44 2017 +0200

    gpgscm: Move 'trace' and 'stringify'.
    
    * tests/gpgscm/tests.scm (trace, stringify): Move...
    * tests/gpgscm/lib.scm: ... here.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm
index ed3d572..cafca8d 100644
--- a/tests/gpgscm/lib.scm
+++ b/tests/gpgscm/lib.scm
@@ -29,6 +29,18 @@
 (assert #t)
 (assert (not #f))
 
+;; Trace displays and returns the given value.  A debugging aid.
+(define (trace x)
+  (display x)
+  (newline)
+  x)
+
+;; Stringification.
+(define (stringify expression)
+  (let ((p (open-output-string)))
+    (write expression p)
+    (get-output-string p)))
+
 (define (filter pred lst)
   (cond ((null? lst) '())
         ((pred (car lst))
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index 592b36f..4107889 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -17,18 +17,6 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-;; Trace displays and returns the given value.  A debugging aid.
-(define (trace x)
-  (display x)
-  (newline)
-  x)
-
-;; Stringification.
-(define (stringify expression)
-  (let ((p (open-output-string)))
-    (write expression p)
-    (get-output-string p)))
-
 ;; Reporting.
 (define (echo . msg)
   (for-each (lambda (x) (display x) (display " ")) msg)

commit 245860ecaf8b9e82ca577385abd453ac92ffcd26
Author: Justus Winter <justus at g10code.com>
Date:   Thu Apr 20 15:04:52 2017 +0200

    gpgscm: Avoid fruitless garbage collection cycles.
    
    * tests/gpgscm/scheme-private.h (CELL_MINRECOVER): New macro.
    * tests/gpgscm/scheme.c (_get_cell): Move the heuristic to get more
    cells...
    (gc): ... here where every caller benefits from the optimization.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/scheme-private.h b/tests/gpgscm/scheme-private.h
index 075dc70..bc0269a 100644
--- a/tests/gpgscm/scheme-private.h
+++ b/tests/gpgscm/scheme-private.h
@@ -108,6 +108,13 @@ int tracing;
 #ifndef CELL_SEGSIZE
 #define CELL_SEGSIZE    5000  /* # of cells in one segment */
 #endif
+
+/* If less than # of cells are recovered in a garbage collector run,
+ * allocate a new cell segment to avoid fruitless collection cycles in
+ * the near future.  */
+#ifndef CELL_MINRECOVER
+#define CELL_MINRECOVER    (CELL_SEGSIZE >> 2)
+#endif
 struct cell_segment *cell_segments;
 
 /* We use 4 registers. */
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 933dc45..11f6fcb 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -949,15 +949,10 @@ static pointer _get_cell(scheme *sc, pointer a, pointer b) {
 
   assert (gc_enabled (sc));
   if (sc->free_cell == sc->NIL) {
-    const int min_to_be_recovered = CELL_SEGSIZE / 4;
     gc(sc,a, b);
-    if (sc->fcells < min_to_be_recovered
-        || sc->free_cell == sc->NIL) {
-      /* if only a few recovered, get more to avoid fruitless gc's */
-      if (!alloc_cellseg(sc,1) && sc->free_cell == sc->NIL) {
-        sc->no_memory=1;
-        return sc->sink;
-      }
+    if (sc->free_cell == sc->NIL) {
+	 sc->no_memory=1;
+	 return sc->sink;
     }
   }
   x = sc->free_cell;
@@ -1746,6 +1741,11 @@ static void gc(scheme *sc, pointer a, pointer b) {
     snprintf(msg,80,"done: %ld cells were recovered.\n", sc->fcells);
     putstr(sc,msg);
   }
+
+  /* if only a few recovered, get more to avoid fruitless gc's */
+  if (sc->fcells < CELL_MINRECOVER
+       && alloc_cellseg(sc, 1) == 0)
+       sc->no_memory = 1;
 }
 
 static void finalize_cell(scheme *sc, pointer a) {

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

Summary of changes:
 g10/Makefile.am                                 |   2 +
 g10/t-stutter.c                                 |  14 +-
 g10/test.c                                      |   6 +-
 tests/gpgme/Makefile.am                         |   6 +-
 tests/gpgme/gpgme-defs.scm                      |   2 +-
 tests/gpgme/run-tests.scm                       |  21 ++-
 tests/gpgme/setup.scm                           |   2 +-
 tests/gpgme/wrap.scm                            |   3 +-
 tests/gpgscm/Makefile.am                        |   1 +
 tests/gpgscm/lib.scm                            |  19 +++
 tests/gpgscm/main.c                             |   2 +
 tests/gpgscm/scheme-private.h                   |   7 +
 tests/gpgscm/scheme.c                           |  16 +-
 tests/gpgscm/tests.scm                          | 202 ++++++++++++++++--------
 tests/gpgscm/xml.scm                            | 142 +++++++++++++++++
 tests/gpgsm/Makefile.am                         |   6 +-
 tests/gpgsm/decrypt.scm                         |   4 +-
 tests/gpgsm/encrypt.scm                         |   2 +-
 tests/gpgsm/export.scm                          |   2 +-
 tests/gpgsm/gpgsm-defs.scm                      |   6 +-
 tests/gpgsm/import.scm                          |   4 +-
 tests/gpgsm/run-tests.scm                       |  14 +-
 tests/gpgsm/setup.scm                           |   2 +-
 tests/gpgsm/shell.scm                           |   2 +-
 tests/gpgsm/sign.scm                            |   2 +-
 tests/gpgsm/verify.scm                          |   2 +-
 tests/migrations/Makefile.am                    |   8 +-
 tests/migrations/common.scm                     |   2 +-
 tests/migrations/extended-pkf.scm               |   4 +-
 tests/migrations/from-classic.scm               |   8 +-
 tests/migrations/issue2276.scm                  |   4 +-
 tests/migrations/run-tests.scm                  |   5 +-
 tests/openpgp/4gb-packet.scm                    |   4 +-
 tests/openpgp/Makefile.am                       |   8 +-
 tests/openpgp/armdetach.scm                     |   2 +-
 tests/openpgp/armdetachm.scm                    |   2 +-
 tests/openpgp/armencrypt.scm                    |   2 +-
 tests/openpgp/armencryptp.scm                   |   2 +-
 tests/openpgp/armor.scm                         |   2 +-
 tests/openpgp/armsignencrypt.scm                |   2 +-
 tests/openpgp/armsigs.scm                       |   2 +-
 tests/openpgp/clearsig.scm                      |   2 +-
 tests/openpgp/compression.scm                   |   2 +-
 tests/openpgp/conventional-mdc.scm              |   2 +-
 tests/openpgp/conventional.scm                  |   2 +-
 tests/openpgp/decrypt-dsa.scm                   |   4 +-
 tests/openpgp/decrypt-multifile.scm             |   4 +-
 tests/openpgp/decrypt-session-key.scm           |   4 +-
 tests/openpgp/decrypt-unwrap-verify.scm         |   4 +-
 tests/openpgp/decrypt.scm                       |   4 +-
 tests/openpgp/default-key.scm                   |   4 +-
 tests/openpgp/defs.scm                          |  10 +-
 tests/openpgp/delete-keys.scm                   |   2 +-
 tests/openpgp/detach.scm                        |   2 +-
 tests/openpgp/detachm.scm                       |   2 +-
 tests/openpgp/ecc.scm                           |   8 +-
 tests/openpgp/enarmor.scm                       |   2 +-
 tests/openpgp/encrypt-dsa.scm                   |   2 +-
 tests/openpgp/encrypt-multifile.scm             |   2 +-
 tests/openpgp/encrypt.scm                       |   6 +-
 tests/openpgp/encryptp.scm                      |   2 +-
 tests/openpgp/export.scm                        |   2 +-
 tests/openpgp/genkey1024.scm                    |   2 +-
 tests/openpgp/gpgconf.scm                       |   2 +-
 tests/openpgp/gpgtar.scm                        |   2 +-
 tests/openpgp/gpgv-forged-keyring.scm           |   4 +-
 tests/openpgp/import-revocation-certificate.scm |   4 +-
 tests/openpgp/import.scm                        |  12 +-
 tests/openpgp/issue2015.scm                     |   2 +-
 tests/openpgp/issue2346.scm                     |   4 +-
 tests/openpgp/issue2417.scm                     |   4 +-
 tests/openpgp/issue2419.scm                     |   4 +-
 tests/openpgp/issue2929.scm                     |   2 +-
 tests/openpgp/issue2941.scm                     |   2 +-
 tests/openpgp/key-selection.scm                 |   4 +-
 tests/openpgp/mds.scm                           |   2 +-
 tests/openpgp/multisig.scm                      |   2 +-
 tests/openpgp/quick-key-manipulation.scm        |   2 +-
 tests/openpgp/run-tests.scm                     |  14 +-
 tests/openpgp/seat.scm                          |   2 +-
 tests/openpgp/setup.scm                         |   2 +-
 tests/openpgp/shell.scm                         |   2 +-
 tests/openpgp/signencrypt-dsa.scm               |   2 +-
 tests/openpgp/signencrypt.scm                   |   5 +-
 tests/openpgp/sigs-dsa.scm                      |   2 +-
 tests/openpgp/sigs.scm                          |   2 +-
 tests/openpgp/ssh-export.scm                    |   4 +-
 tests/openpgp/ssh-import.scm                    |   6 +-
 tests/openpgp/tofu.scm                          |  56 +++----
 tests/openpgp/use-exact-key.scm                 |   4 +-
 tests/openpgp/verify-multifile.scm              |   4 +-
 tests/openpgp/verify.scm                        |   4 +-
 tests/openpgp/version.scm                       |   2 +-
 93 files changed, 528 insertions(+), 257 deletions(-)
 create mode 100644 tests/gpgscm/xml.scm


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




More information about the Gnupg-commits mailing list