[Spice-devel] [PATCH spice-server 10/16] test-display-base: Always compile with AUTOMATED_TESTS enabled

Frediano Ziglio fziglio at redhat.com
Mon Sep 4 10:57:18 UTC 2017


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 at redhat.com>
---
 server/tests/Makefile.am         | 4 ----
 server/tests/test-display-base.c | 6 ------
 2 files changed, 10 deletions(-)

diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 17414f65..b64add5f 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -24,10 +24,6 @@ AM_CPPFLAGS =					\
 	$(WARN_CFLAGS)				\
 	$(NULL)
 
-if HAVE_AUTOMATED_TESTS
-AM_CPPFLAGS += -DAUTOMATED_TESTS
-endif
-
 noinst_LIBRARIES = libtest.a
 
 libtest_a_SOURCES =				\
diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c
index bad2efa8..101df44d 100644
--- a/server/tests/test-display-base.c
+++ b/server/tests/test-display-base.c
@@ -948,11 +948,7 @@ static void init_automated(void)
 static __attribute__((noreturn))
 void usage(const char *argv0, const int exitcode)
 {
-#ifdef AUTOMATED_TESTS
     const char *autoopt=" [--automated-tests]";
-#else
-    const char *autoopt="";
-#endif
 
     printf("usage: %s%s\n", argv0, autoopt);
     exit(exitcode);
@@ -961,9 +957,7 @@ void usage(const char *argv0, const int exitcode)
 void spice_test_config_parse_args(int argc, char **argv)
 {
     struct option options[] = {
-#ifdef AUTOMATED_TESTS
         {"automated-tests", no_argument, &has_automated_tests, 1},
-#endif
         {NULL, 0, NULL, 0},
     };
     int option_index;
-- 
2.13.5



More information about the Spice-devel mailing list