summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-06-28 16:24:37 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-28 12:13:28 +0100
commitdb2757f8127fcf9208ea70273904ac78fcd6bd64 (patch)
tree5024956f6e5ae00ef57cdd53c072f876f644f39e /bus
parentdec9025626e556e58e2dbfbb9eacea17e70ce87b (diff)
downloaddbus-db2757f8127fcf9208ea70273904ac78fcd6bd64.tar.gz
tests to embedded tests: replaced in dbus-daemon
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
Diffstat (limited to 'bus')
-rw-r--r--bus/activation.c4
-rw-r--r--bus/config-parser-trivial.c4
-rw-r--r--bus/config-parser.c4
-rw-r--r--bus/dispatch.c4
-rw-r--r--bus/expirelist.c4
-rw-r--r--bus/policy.c4
-rw-r--r--bus/policy.h2
-rw-r--r--bus/signals.c6
-rw-r--r--bus/test-launch-helper.c8
-rw-r--r--bus/test-main.c8
-rw-r--r--bus/test-system.c8
-rw-r--r--bus/test.c2
-rw-r--r--bus/test.h2
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 <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 */
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 <stdio.h>
#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 <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 */
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 <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 */
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 <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 */
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 <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");
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 <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");
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 <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");
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 <config.h>
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "test.h"
#include <dbus/dbus-internals.h>
#include <dbus/dbus-list.h>
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 <dbus/dbus.h>
#include <dbus/dbus-string.h>