[Pkg-gnupg-commit] [gnupg2] 94/180: gpgscm: Generalize the test runner.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 22:29:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit d43dabf4607d3bcfc217eb9aea34d093f5aa698f
Author: Justus Winter <justus at g10code.com>
Date:   Thu Nov 17 11:06:42 2016 +0100

    gpgscm: Generalize the test runner.
    
    * tests/gpgscm/tests.scm (test::scm) Add explicit name argument.
    (test::binary): Likewise.  Also, add missing unquote.
    * tests/openpgp/run-tests.scm: Adapt accordingly.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/tests.scm      | 17 +++++++++--------
 tests/openpgp/run-tests.scm |  3 ++-
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index dd4c69f..b5df9b7 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -553,18 +553,19 @@
 ;; A single test.
 (define test
   (package
-   (define (scm path . args)
+   (define (scm name path . args)
      ;; Start the process.
-     (define (spawn-scm args in out err)
+     (define (spawn-scm args' in out err)
        (spawn-process-fd `(,*argv0* ,@(verbosity (*verbose*))
-				    ,(locate-test path) , at args) in out err))
-     (new (basename path) #f spawn-scm #f #f CLOSED_FD))
+				    ,(locate-test path)
+				    , at args' , at args) in out err))
+     (new name #f spawn-scm #f #f CLOSED_FD))
 
-   (define (binary path . args)
+   (define (binary name path . args)
      ;; Start the process.
-     (define (spawn-binary args in out err)
-       (spawn-process-fd `(path , at args) in out err))
-     (new (basename path) #f spawn-binary #f #f CLOSED_FD))
+     (define (spawn-binary args' in out err)
+       (spawn-process-fd `(,path , at args' , at args) in out err))
+     (new name #f spawn-binary #f #f CLOSED_FD))
 
    (define (new name directory spawn pid retcode logfd)
      (package
diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index a7c282e..4146411 100644
--- a/tests/openpgp/run-tests.scm
+++ b/tests/openpgp/run-tests.scm
@@ -30,4 +30,5 @@
 		   run-tests-parallel
 		   run-tests-sequential))
        (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*)))
-  (runner (test::scm "setup.scm") (map test::scm tests)))
+  (runner (test::scm "setup.scm" "setup.scm")
+	  (map (lambda (t) (test::scm t t)) tests)))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list