test-display-base: Always compile with AUTOMATED_TESTS enabled

There's no need to not compile this feature, it just enable
a parameters which must be passed in order to change test
behaviour.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-09-03 08:08:04 +01:00
parent 06380a737b
commit 6517ea5cbb
3 changed files with 0 additions and 27 deletions

View File

@ -122,12 +122,6 @@ if test "x$have_gstreamer_0_10" = "xyes" || test "x$have_gstreamer_1_0" = "xyes"
AC_SUBST(ORC_LIBS) AC_SUBST(ORC_LIBS)
fi fi
AC_ARG_ENABLE([automated_tests],
AS_HELP_STRING([--enable-automated-tests], [Enable automated tests using spicy-screenshot (part of spice-gtk)]),,
[enable_automated_tests="no"])
AS_IF([test x"$enable_automated_tests" != "xno"], [enable_automated_tests="yes"])
AM_CONDITIONAL(HAVE_AUTOMATED_TESTS, test "x$enable_automated_tests" != "xno")
dnl Check for the presence of Valgrind and do the plumbing to allow dnl Check for the presence of Valgrind and do the plumbing to allow
dnl the running of "make check-valgrind". dnl the running of "make check-valgrind".
AX_VALGRIND_DFLT(memcheck, on) AX_VALGRIND_DFLT(memcheck, on)
@ -214,16 +208,6 @@ AC_SUBST(JPEG_LIBS)
AC_CHECK_LIB(z, deflate, Z_LIBS='-lz', AC_MSG_ERROR([zlib not found])) AC_CHECK_LIB(z, deflate, Z_LIBS='-lz', AC_MSG_ERROR([zlib not found]))
AC_SUBST(Z_LIBS) AC_SUBST(Z_LIBS)
if test "x$enable_automated_tests" = "xyes"; then
AC_MSG_CHECKING([for spicy-screenshot])
spicy-screenshot --help >/dev/null 2>&1
if test $? -ne 0 ; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([spicy-screenshot was not found, this module is part of spice-gtk and is required to compile this package])
fi
AC_MSG_RESULT([found])
fi
AC_ARG_ENABLE([manual], AC_ARG_ENABLE([manual],
AS_HELP_STRING([--enable-manual=@<:@auto/yes/no@:>@], AS_HELP_STRING([--enable-manual=@<:@auto/yes/no@:>@],
@ -327,7 +311,6 @@ AC_MSG_NOTICE([
Smartcard: ${have_smartcard} Smartcard: ${have_smartcard}
GStreamer: ${enable_gstreamer} GStreamer: ${enable_gstreamer}
SASL support: ${have_sasl} SASL support: ${have_sasl}
Automated tests: ${enable_automated_tests}
Manual: ${have_asciidoc} Manual: ${have_asciidoc}
Now type 'make' to build $PACKAGE Now type 'make' to build $PACKAGE

View File

@ -24,10 +24,6 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(NULL) $(NULL)
if HAVE_AUTOMATED_TESTS
AM_CPPFLAGS += -DAUTOMATED_TESTS
endif
noinst_LIBRARIES = libtest.a noinst_LIBRARIES = libtest.a
libtest_a_SOURCES = \ libtest_a_SOURCES = \

View File

@ -948,11 +948,7 @@ static void init_automated(void)
static __attribute__((noreturn)) static __attribute__((noreturn))
void usage(const char *argv0, const int exitcode) void usage(const char *argv0, const int exitcode)
{ {
#ifdef AUTOMATED_TESTS
const char *autoopt=" [--automated-tests]"; const char *autoopt=" [--automated-tests]";
#else
const char *autoopt="";
#endif
printf("usage: %s%s\n", argv0, autoopt); printf("usage: %s%s\n", argv0, autoopt);
exit(exitcode); exit(exitcode);
@ -961,9 +957,7 @@ void usage(const char *argv0, const int exitcode)
void spice_test_config_parse_args(int argc, char **argv) void spice_test_config_parse_args(int argc, char **argv)
{ {
struct option options[] = { struct option options[] = {
#ifdef AUTOMATED_TESTS
{"automated-tests", no_argument, &has_automated_tests, 1}, {"automated-tests", no_argument, &has_automated_tests, 1},
#endif
{NULL, 0, NULL, 0}, {NULL, 0, NULL, 0},
}; };
int option_index; int option_index;