From 3557a2d7827e0ee2d61b0306bb94f0376378aa5f Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 9 Jul 2013 21:27:37 +0800 Subject: [PATCH 1/3] TEST: remove redundant test build detection in bus daemon Remove test build detection codes in bus daemon since these files are only used by test and will not built if test disabled. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66753 Signed-off-by: Chengwei Yang --- bus/test-launch-helper.c | 9 --------- bus/test-main.c | 10 ---------- bus/test-system.c | 9 --------- 3 files changed, 28 deletions(-) diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index e88c989..350c1d1 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -29,7 +29,6 @@ #include #include -#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -56,7 +55,6 @@ test_post_hook (const char *name) { check_memleaks (name); } -#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ #ifdef ACTIVATION_LAUNCHER_DO_OOM @@ -97,7 +95,6 @@ bus_activation_helper_oom_test (void *data) int main (int argc, char **argv) { -#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString config_file; @@ -137,11 +134,5 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_ENABLE_EMBEDDED_TESTS */ - - printf ("Not compiled with test support\n"); - - return 0; -#endif } diff --git a/bus/test-main.c b/bus/test-main.c index 01d2287..b0cf5f4 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -31,7 +31,6 @@ #include #include "selinux.h" -#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -52,7 +51,6 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static DBusInitialFDs *initial_fds = NULL; @@ -84,7 +82,6 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; const char *only; DBusString test_data_dir; @@ -178,13 +175,6 @@ main (int argc, char **argv) #endif printf ("%s: Success\n", argv[0]); - return 0; -#else /* DBUS_ENABLE_EMBEDDED_TESTS */ - - printf ("Not compiled with test support\n"); - - return 0; -#endif } diff --git a/bus/test-system.c b/bus/test-system.c index 5f02d0a..c4390e9 100644 --- a/bus/test-system.c +++ b/bus/test-system.c @@ -29,7 +29,6 @@ #include #include -#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -50,7 +49,6 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static void test_pre_hook (void) @@ -67,7 +65,6 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString test_data_dir; @@ -98,10 +95,4 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_ENABLE_EMBEDDED_TESTS */ - - printf ("Not compiled with test support\n"); - - return 0; -#endif } -- 1.7.9.5