mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
tests: Make it possible to run all tests using our infrastructure.
* Makefile.am (TESTS_ENVIRONMENT): New variable. (check-all): New phony target to run all tests. * tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests whether the GPGME test suite is available instead of exiting the process. * tests/gpgscm/init.scm (export): New macro. * tests/gpgscm/tests.scm (run-tests): New function. (load-tests): Likewise. * tests/gpgme/run-tests.scm: Simplify and move the parsing of the list of tests to 'all-tests.scm'. * tests/gpgsm/run-tests.scm: Likewise. * tests/migrations/run-tests.scm: Likewise. * tests/openpgp/run-tests.scm: Likewise. * tests/gpgme/Makefile.am: To select the tests to run, use the variable 'TESTS'. This harmonizes the interface with the automake test suite. * tests/gpgsm/Makefile.am: Likewise. * tests/migrations/Makefile.am: Likewise. * tests/openpgp/Makefile.am: Likewise. * tests/openpgp/README: Likewise. * agent/all-tests.scm: New file. * common/all-tests.scm: Likewise. * g10/all-tests.scm: Likewise. * g13/all-tests.scm: Likewise. * tests/gpgme/all-tests.scm: Likewise. * tests/gpgsm/all-tests.scm: Likewise. * tests/migrations/all-tests.scm: Likewise. * tests/openpgp/all-tests.scm: Likewise. * tests/run-tests.scm: Likewise. -- This change allows us to run all tests in parallel and write one XML report capturing the results of every test. It also lays the foundation to parametrize test suites. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
78d6a25a2d
commit
f4365790da
27 changed files with 502 additions and 124 deletions
|
@ -26,16 +26,17 @@
|
|||
;; Set objdir so that the tests can locate built programs.
|
||||
(setenv "objdir" (getcwd) #f)
|
||||
|
||||
(let* ((tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
|
||||
(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 (name)
|
||||
(test::scm setup
|
||||
(path-join "tests" "openpgp" name)
|
||||
(in-srcdir "tests" "openpgp" name))) tests)))
|
||||
(define setup
|
||||
(make-environment-cache (test::scm
|
||||
#f
|
||||
(path-join "tests" "openpgp" "setup.scm")
|
||||
(in-srcdir "tests" "openpgp" "setup.scm"))))
|
||||
|
||||
(define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
|
||||
|
||||
(run-tests (if (null? tests)
|
||||
(load-tests "tests" "openpgp")
|
||||
(map (lambda (name)
|
||||
(test::scm setup
|
||||
(path-join "tests" "openpgp" name)
|
||||
(in-srcdir "tests" "openpgp" name))) tests)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue