diff options
author | Justus Winter <[email protected]> | 2017-03-09 12:26:06 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-03-09 12:26:06 +0000 |
commit | cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d (patch) | |
tree | a3eb93f9c38c4ce6fbcb767dc5e65b41dbdcac00 /tests/gpgme | |
parent | wks: Put stdout into binary mode for Windows at another place. (diff) | |
download | gnupg-cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d.tar.gz gnupg-cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d.zip |
tests: Rework environment setup.
* tests/gpgscm/tests.scm (test::scm): Add a setup argument.
(test::binary): Likewise.
(run-tests-parallel): Remove setup parameter.
(run-tests-sequential): Likewise.
(make-environment-cache): New function that handles the cache
protocol.
* tests/gpgme/run-tests.scm: Adapt accordingly.
* tests/gpgsm/run-tests.scm: Likewise.
* tests/migrations/run-tests.scm: Likewise.
* tests/openpgp/run-tests.scm: Likewise.
--
This change allows us to have different environments for tests. This
is needed to run more GPGME tests, and to increase concurrency while
running all tests.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgme')
-rw-r--r-- | tests/gpgme/run-tests.scm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/gpgme/run-tests.scm b/tests/gpgme/run-tests.scm index cb17977cb..4d3a7e683 100644 --- a/tests/gpgme/run-tests.scm +++ b/tests/gpgme/run-tests.scm @@ -39,9 +39,10 @@ (let* ((runner (if (member "--parallel" *args*) run-tests-parallel run-tests-sequential)) + (setup-c (make-environment-cache + (test::scm #f "setup.scm" (in-srcdir "setup.scm") "--" "tests" "gpg"))) (tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))) (runner - (test::scm "setup.scm" (in-srcdir "setup.scm") "--" "tests" "gpg") (apply append (map (lambda (cmpnts) @@ -50,6 +51,7 @@ (string-suffix? name ".test")))) (define :path car) (define :key cadr) + (define :setup caddr) (define (find-test name) (apply path-join `(,(if (compiled? name) @@ -59,11 +61,12 @@ "Makefile.am")))) (map (lambda (name) (apply test::scm - `(,name ,(in-srcdir "wrap.scm") --executable - ,(find-test name) - -- ,@(:path cmpnts)))) + `(,(:setup cmpnts) + ,name ,(in-srcdir "wrap.scm") --executable + ,(find-test name) + -- ,@(:path cmpnts)))) (if (null? tests) (all-tests makefile (:key cmpnts)) tests)))) - '((("tests" "gpg") "c_tests") + `((("tests" "gpg") "c_tests" ,setup-c) ;; XXX: Not yet. ;; (("lang" "python" "tests") "py_tests") - (("lang" "qt" "tests") "TESTS")))))) + (("lang" "qt" "tests") "TESTS" ,setup-c)))))) |