From db2757f8127fcf9208ea70273904ac78fcd6bd64 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Fri, 28 Jun 2013 16:24:37 +0800 Subject: tests to embedded tests: replaced in dbus-daemon Signed-off-by: Chengwei Yang Reviewed-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291 --- bus/activation.c | 4 ++-- bus/config-parser-trivial.c | 4 ++-- bus/config-parser.c | 4 ++-- bus/dispatch.c | 4 ++-- bus/expirelist.c | 4 ++-- bus/policy.c | 4 ++-- bus/policy.h | 2 +- bus/signals.c | 6 +++--- bus/test-launch-helper.c | 8 ++++---- bus/test-main.c | 8 ++++---- bus/test-system.c | 8 ++++---- bus/test.c | 2 +- bus/test.h | 2 +- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bus/activation.c b/bus/activation.c index fcb71337..42694409 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2232,7 +2232,7 @@ dbus_activation_systemd_failure (BusActivation *activation, return TRUE; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include @@ -2579,4 +2579,4 @@ bus_activation_service_reload_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index 6ef50f8e..64a05c3a 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -330,7 +330,7 @@ bus_config_parser_get_service_dirs (BusConfigParser *parser) return &parser->service_dirs; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include #include "test.h" @@ -712,5 +712,5 @@ finish: return retval; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/config-parser.c b/bus/config-parser.c index ff73ed03..6b59dfc5 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -2742,7 +2742,7 @@ bus_config_parser_steal_service_context_table (BusConfigParser *parser) return table; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include typedef enum @@ -3636,5 +3636,5 @@ bus_config_parser_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/dispatch.c b/bus/dispatch.c index 7a96f9dc..72d228ae 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -428,7 +428,7 @@ bus_dispatch_remove_connection (DBusConnection *connection) NULL); } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include @@ -4907,4 +4907,4 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) } #endif -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/expirelist.c b/bus/expirelist.c index 1a12ea45..9a3886e9 100644 --- a/bus/expirelist.c +++ b/bus/expirelist.c @@ -281,7 +281,7 @@ bus_expire_list_contains_item (BusExpireList *list, return _dbus_list_find_last (&list->items, item) != NULL; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS typedef struct { @@ -399,4 +399,4 @@ bus_expire_list_test (const DBusString *test_data_dir) return result; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/policy.c b/bus/policy.c index 379cea95..082f3853 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -1302,12 +1302,12 @@ bus_client_policy_check_can_own (BusClientPolicy *policy, return bus_rules_check_can_own (policy->rules, service_name); } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS dbus_bool_t bus_policy_check_can_own (BusPolicy *policy, const DBusString *service_name) { return bus_rules_check_can_own (policy->default_rules, service_name); } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/policy.h b/bus/policy.h index 3ff6f482..d1d3e72b 100644 --- a/bus/policy.h +++ b/bus/policy.h @@ -161,7 +161,7 @@ dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy, BusPolicyRule *rule); void bus_client_policy_optimize (BusClientPolicy *policy); -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS dbus_bool_t bus_policy_check_can_own (BusPolicy *policy, const DBusString *service_name); #endif diff --git a/bus/signals.c b/bus/signals.c index 28506d3f..72487edd 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -64,7 +64,7 @@ bus_match_rule_new (DBusConnection *matches_go_to) rule->refcount = 1; rule->matches_go_to = matches_go_to; -#ifndef DBUS_BUILD_TESTS +#ifndef DBUS_ENABLE_EMBEDDED_TESTS _dbus_assert (rule->matches_go_to != NULL); #endif @@ -2056,7 +2056,7 @@ bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, return TRUE; } -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include "test.h" #include @@ -2811,5 +2811,5 @@ bus_signals_test (const DBusString *test_data_dir) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index ab36b6ec..e88c989c 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -29,7 +29,7 @@ #include #include -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -56,7 +56,7 @@ test_post_hook (const char *name) { check_memleaks (name); } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ #ifdef ACTIVATION_LAUNCHER_DO_OOM @@ -97,7 +97,7 @@ bus_activation_helper_oom_test (void *data) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString config_file; @@ -137,7 +137,7 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); diff --git a/bus/test-main.c b/bus/test-main.c index 0f736c7c..01d22870 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -31,7 +31,7 @@ #include #include "selinux.h" -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -52,7 +52,7 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static DBusInitialFDs *initial_fds = NULL; @@ -84,7 +84,7 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; const char *only; DBusString test_data_dir; @@ -181,7 +181,7 @@ main (int argc, char **argv) return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); diff --git a/bus/test-system.c b/bus/test-system.c index 56a7d4ea..5f02d0ab 100644 --- a/bus/test-system.c +++ b/bus/test-system.c @@ -29,7 +29,7 @@ #include #include -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS static void die (const char *failure) { @@ -50,7 +50,7 @@ check_memleaks (const char *name) die ("memleaks"); } } -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */ static void test_pre_hook (void) @@ -67,7 +67,7 @@ test_post_hook (void) int main (int argc, char **argv) { -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS const char *dir; DBusString test_data_dir; @@ -98,7 +98,7 @@ main (int argc, char **argv) printf ("%s: Success\n", argv[0]); return 0; -#else /* DBUS_BUILD_TESTS */ +#else /* DBUS_ENABLE_EMBEDDED_TESTS */ printf ("Not compiled with test support\n"); diff --git a/bus/test.c b/bus/test.c index 1ca96070..31ef4c8f 100644 --- a/bus/test.c +++ b/bus/test.c @@ -23,7 +23,7 @@ #include -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include "test.h" #include #include diff --git a/bus/test.h b/bus/test.h index 98a2c6ba..38b74e89 100644 --- a/bus/test.h +++ b/bus/test.h @@ -24,7 +24,7 @@ #ifndef BUS_TEST_H #define BUS_TEST_H -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include #include -- cgit v1.2.3