]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
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 fcb7133722d869b8d51661761e2701d82d195d21..426944093bc701180914316bca065d4780332ffd 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 6ef50f8ea4dc8d05fa472a67e10abf9e20810a83..64a05c3a76117b4dbc959df60d753b23bb704f93 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 ff73ed03cb8e78bf691ea3f4803d5f7f5e6450f2..6b59dfc589fad5429a77f5a1dc8f38fa0360d7a7 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 7a96f9dc15977b2de8c700eaa68f4b2e1139bf62..72d228ae1ced2e40216436bb2b5cded3ff01b9f6 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 1a12ea456af2e00fdd95460c2a60a4876f7c8ad9..9a3886e979b53aa7525e35a51c367f8c556b318b 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 379cea95ce68390790c4bfc41aa2e251aeb6adea..082f3853b82794bf22e80fbbce5aea1c2fe329b8 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 3ff6f482f1ad89f4de6c0eca99ffca7d7c073cd8..d1d3e72b7f1b10d1430648c315f027747dace547 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 28506d3fdf6b18c7879d9b8d73bb57bb60a04f96..72487eddcae54564557891b74716557fe1b9577f 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 ab36b6ec4b79a7faf494b81998331d766424eb78..e88c989c8a68f775f5876b8a5a7f1d4a38af9295 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 0f736c7c727c717092be7f1dd4d27c853382ffc0..01d228704c1d52a5da06c18fe42b082a3383b5ef 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 56a7d4ea2d17b41020c650e733805ee8547ba380..5f02d0ab42eae15f63fa711be8767d90c8918e12 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 1ca960706f43ccf3487940372b3b888a0462a3a0..31ef4c8fc67dfdfd165568790cf23d9357d458ac 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 98a2c6ba2997e36e1c82a0837ee81ed1e2e13852..38b74e89cfaf49219a16c5e88b6709d1f1722608 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>