Commit db2757f8 authored by Chengwei Yang's avatar Chengwei Yang Committed by Simon McVittie

tests to embedded tests: replaced in dbus-daemon

Signed-off-by: default avatarChengwei Yang <chengwei.yang@intel.com>
Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
parent dec90256
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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
......
......@@ -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 */
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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>
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment