From db911232e6077e669fa51c27122b62d5f44f3225 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Wed, 10 Jul 2013 13:36:49 +0800 Subject: [PATCH 3/3] TEST: remove redundant test build detection in libdbus Remove test build detection codes in libbus 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 --- dbus/dbus-test.c | 9 --------- dbus/dbus-test.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c index e7c770c..45c30b3 100644 --- a/dbus/dbus-test.c +++ b/dbus/dbus-test.c @@ -28,7 +28,6 @@ #include #include -#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -84,8 +83,6 @@ run_data_test (const char *test_name, } } -#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ - /** * An exported symbol to be run in order to execute * unit tests. Should not be used by any app other @@ -97,7 +94,6 @@ run_data_test (const char *test_name, void dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *specific_test) { -#ifdef DBUS_ENABLE_EMBEDDED_TESTS if (!_dbus_threads_init_debug ()) die ("debug threads init"); @@ -133,9 +129,7 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci run_test ("memory", specific_test, _dbus_memory_test); -#if 1 run_test ("mem-pool", specific_test, _dbus_mem_pool_test); -#endif run_test ("list", specific_test, _dbus_list_test); @@ -164,8 +158,5 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci run_data_test ("auth", specific_test, _dbus_auth_test, test_data_dir); printf ("%s: completed successfully\n", "dbus-test"); -#else - printf ("Not compiled with unit tests, not running any\n"); -#endif } diff --git a/dbus/dbus-test.h b/dbus/dbus-test.h index f254388..28d1725 100644 --- a/dbus/dbus-test.h +++ b/dbus/dbus-test.h @@ -54,7 +54,7 @@ dbus_bool_t _dbus_object_tree_test (void); dbus_bool_t _dbus_credentials_test (const char *test_data_dir); void dbus_internal_do_not_use_run_tests (const char *test_data_dir, - const char *specific_test); + const char *specific_test); dbus_bool_t dbus_internal_do_not_use_try_message_file (const DBusString *filename, DBusValidity expected_validity); dbus_bool_t dbus_internal_do_not_use_try_message_data (const DBusString *data, -- 1.7.9.5