1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

build: New configure option --enable-all-tests.

* configure.ac: New option --enable-all-tests.
* tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*.
* tests/openpgp/all-tests.scm (all-tests): Use that var instead
of *maintainer-mode*.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests.
--

It is better to have a separate option to run all tests than to put
this on top of --enable-maintainer-mode.  This way we can also make
sure to run all tests during "make distcheck".

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-08-08 17:28:25 +02:00
parent 0bd19dae11
commit fb21aa8b50
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
5 changed files with 28 additions and 3 deletions

View File

@ -20,7 +20,7 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gnupg-builddir-envvar \ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gnupg-builddir-envvar \
--enable-symcryptrun --enable-g13 \ --enable-all-tests --enable-symcryptrun --enable-g13 \
--enable-gpg2-is-gpg --enable-gpgtar --enable-wks-tools --disable-ntbtls --enable-gpg2-is-gpg --enable-gpgtar --enable-wks-tools --disable-ntbtls
GITLOG_TO_CHANGELOG=gitlog-to-changelog GITLOG_TO_CHANGELOG=gitlog-to-changelog

5
README
View File

@ -60,9 +60,12 @@
./configure ./configure
make make
make check
make install make install
(Before doing install you might need to become root.) The "make check" is optional but highly recommended. To run even
more tests you may add "--enable-all-tests" to the configure run.
Before running the "make install" you might need to become root.
If everything succeeds, you have a working GnuPG with support for If everything succeeds, you have a working GnuPG with support for
OpenPGP, S/MIME, ssh-agent, and smartcards. Note that there is no OpenPGP, S/MIME, ssh-agent, and smartcards. Note that there is no

View File

@ -1667,6 +1667,20 @@ AC_ARG_ENABLE(optimization,
CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g` CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g`
fi]) fi])
#
# Configure option --enable-all-tests
#
AC_MSG_CHECKING([whether "make check" shall run all tests])
AC_ARG_ENABLE(all-tests,
AC_HELP_STRING([--enable-all-tests],
[let "make check" run all tests]),
run_all_tests=$enableval, run_all_tests=no)
AC_MSG_RESULT($run_all_tests)
if test "$run_all_tests" = "yes"; then
AC_DEFINE(RUN_ALL_TESTS,1,
[Defined if "make check" shall run all tests])
fi
# #
# We do not want support for the GNUPG_BUILDDIR environment variable # We do not want support for the GNUPG_BUILDDIR environment variable
# in a released version. However, our regression tests suite requires # in a released version. However, our regression tests suite requires

View File

@ -1450,6 +1450,14 @@ ffi_init (scheme *sc, const char *argv0, const char *scriptname,
#endif #endif
); );
ffi_define (sc, "*run-all-tests*",
#if RUN_ALL_TESTS
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));

View File

@ -58,7 +58,7 @@
(path-join "tests" "openpgp" name) (path-join "tests" "openpgp" name)
(in-srcdir "tests" "openpgp" name))) all-tests)) (in-srcdir "tests" "openpgp" name))) all-tests))
(when *maintainer-mode* (when *run-all-tests*
(set! tests (set! tests
(append (append
tests tests