mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
tests: Do not run all tests unless in maintainer mode.
* configure.ac: Leak the maintainer mode flag into 'config.h'. * tests/gpgscm/ffi.c: Pass it into the scheme environment. * tests/openpgp/all-tests.scm: Only run tests against non-default configurations (keyring, extended-key-format) in maintainer mode. -- Werner is concerned that the tests do take up too much time and asked me to reduce the runtime of the tests for normal users. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
a611cba142
commit
b0112dbca9
@ -1541,6 +1541,11 @@ if test "$development_version" = yes; then
|
|||||||
[Defined if this is not a regular release])
|
[Defined if this is not a regular release])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
||||||
|
AC_DEFINE(MAINTAINER_MODE,1,
|
||||||
|
[Defined if this build is in maintainer mode])
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
|
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
|
||||||
|
|
||||||
GNUPG_CHECK_GNUMAKE
|
GNUPG_CHECK_GNUMAKE
|
||||||
|
@ -1442,6 +1442,14 @@ ffi_init (scheme *sc, const char *argv0, const char *scriptname,
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ffi_define (sc, "*maintainer-mode*",
|
||||||
|
#if MAINTAINER_MODE
|
||||||
|
sc->T
|
||||||
|
#else
|
||||||
|
sc->F
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
ffi_define (sc, "*stdin*",
|
ffi_define (sc, "*stdin*",
|
||||||
sc->vptr->mk_port_from_file (sc, stdin, port_input));
|
sc->vptr->mk_port_from_file (sc, stdin, port_input));
|
||||||
|
@ -51,18 +51,28 @@
|
|||||||
(parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
|
(parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
|
||||||
(lambda (filename port key) (parse-makefile port key))
|
(lambda (filename port key) (parse-makefile port key))
|
||||||
"XTESTS"))
|
"XTESTS"))
|
||||||
(append
|
|
||||||
(map (lambda (name)
|
(define tests
|
||||||
(test::scm setup
|
(map (lambda (name)
|
||||||
(path-join "tests" "openpgp" name)
|
(test::scm setup
|
||||||
(in-srcdir "tests" "openpgp" name))) all-tests)
|
(path-join "tests" "openpgp" name)
|
||||||
(map (lambda (name)
|
(in-srcdir "tests" "openpgp" name))) all-tests))
|
||||||
(test::scm setup-use-keyring
|
|
||||||
(qualify (path-join "tests" "openpgp" name) "use-keyring")
|
(when *maintainer-mode*
|
||||||
(in-srcdir "tests" "openpgp" name)
|
(set! tests
|
||||||
"--use-keyring")) all-tests)
|
(append
|
||||||
(map (lambda (name)
|
tests
|
||||||
(test::scm setup-extended-key-format
|
(map (lambda (name)
|
||||||
(qualify (path-join "tests" "openpgp" name) "extended-key-format")
|
(test::scm setup-use-keyring
|
||||||
(in-srcdir "tests" "openpgp" name)
|
(qualify (path-join "tests" "openpgp" name)
|
||||||
"--extended-key-format")) all-tests)))
|
"use-keyring")
|
||||||
|
(in-srcdir "tests" "openpgp" name)
|
||||||
|
"--use-keyring")) all-tests)
|
||||||
|
(map (lambda (name)
|
||||||
|
(test::scm setup-extended-key-format
|
||||||
|
(qualify (path-join "tests" "openpgp" name)
|
||||||
|
"extended-key-format")
|
||||||
|
(in-srcdir "tests" "openpgp" name)
|
||||||
|
"--extended-key-format")) all-tests))))
|
||||||
|
|
||||||
|
tests)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user