tests to embedded tests: replaced in dbus-daemon
authorChengwei Yang <chengwei.yang@intel.com>
Fri, 28 Jun 2013 08:24:37 +0000 (16:24 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 28 Jun 2013 11:13:28 +0000 (12:13 +0100)
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291

13 files changed:
bus/activation.c
bus/config-parser-trivial.c
bus/config-parser.c
bus/dispatch.c
bus/expirelist.c
bus/policy.c
bus/policy.h
bus/signals.c
bus/test-launch-helper.c
bus/test-main.c
bus/test-system.c
bus/test.c
bus/test.h

index fcb7133..4269440 100644 (file)
@@ -2232,7 +2232,7 @@ dbus_activation_systemd_failure (BusActivation *activation,
   return TRUE;
 }
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 
 #include <stdio.h>
 
@@ -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 */
index 6ef50f8..64a05c3 100644 (file)
@@ -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 <stdio.h>
 #include "test.h"
 
@@ -712,5 +712,5 @@ finish:
   return retval;
 }
 
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
 
index ff73ed0..6b59dfc 100644 (file)
@@ -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 <stdio.h>
 
 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 */
 
index 7a96f9d..72d228a 100644 (file)
@@ -428,7 +428,7 @@ bus_dispatch_remove_connection (DBusConnection *connection)
                                  NULL);
 }
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 
 #include <stdio.h>
 
@@ -4907,4 +4907,4 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
 }
 #endif
 
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
index 1a12ea4..9a3886e 100644 (file)
@@ -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 */
index 379cea9..082f385 100644 (file)
@@ -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 */
 
index 3ff6f48..d1d3e72 100644 (file)
@@ -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
index 28506d3..72487ed 100644 (file)
@@ -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 <stdlib.h>
 
@@ -2811,5 +2811,5 @@ bus_signals_test (const DBusString *test_data_dir)
   return TRUE;
 }
 
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
 
index ab36b6e..e88c989 100644 (file)
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 #include <dbus/dbus-internals.h>
 
-#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");
   
index 0f736c7..01d2287 100644 (file)
@@ -31,7 +31,7 @@
 #include <dbus/dbus-message-internal.h>
 #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");
   
index 56a7d4e..5f02d0a 100644 (file)
@@ -29,7 +29,7 @@
 #include <dbus/dbus-sysdeps.h>
 #include <dbus/dbus-internals.h>
 
-#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");
 
index 1ca9607..31ef4c8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <config.h>
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 #include "test.h"
 #include <dbus/dbus-internals.h>
 #include <dbus/dbus-list.h>
index 98a2c6b..38b74e8 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef BUS_TEST_H
 #define BUS_TEST_H
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 
 #include <dbus/dbus.h>
 #include <dbus/dbus-string.h>