Commit 4df87387 authored by Chengwei Yang's avatar Chengwei Yang Committed by Simon McVittie

tests to embedded tests: replaced in libdbus

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 11c5dc12
......@@ -648,7 +648,7 @@ dbus_address_unescape_value (const char *value,
/** @} */ /* End of public API */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
......
......@@ -22,7 +22,7 @@
*/
#include <config.h>
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-auth-script.h"
#include "dbus-auth.h"
......@@ -800,4 +800,4 @@ _dbus_auth_script_run (const DBusString *filename)
}
/** @} */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -33,7 +33,7 @@
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include "dbus-auth-script.h"
#include <stdio.h>
......@@ -167,4 +167,4 @@ _dbus_auth_test (const char *test_data_dir)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -115,7 +115,7 @@ void _dbus_connection_get_stats (DBusConnection *connection,
dbus_uint32_t *out_peak_fds);
/* if DBUS_BUILD_TESTS */
/* if DBUS_ENABLE_EMBEDDED_TESTS */
const char* _dbus_connection_get_address (DBusConnection *connection);
/* This _dbus_bus_* stuff doesn't really belong here, but dbus-bus-internal.h seems
......
......@@ -446,7 +446,7 @@ _dbus_connection_wakeup_mainloop (DBusConnection *connection)
(*connection->wakeup_main_function) (connection->wakeup_main_data);
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* Gets the locks so we can examine them
*
......@@ -6283,7 +6283,7 @@ dbus_connection_get_outgoing_unix_fds (DBusConnection *connection)
return res;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* Returns the address of the transport object of this connection
*
......
......@@ -33,7 +33,7 @@
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
#include <string.h>
......@@ -203,4 +203,4 @@ _dbus_credentials_test (const char *test_data_dir)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -348,7 +348,7 @@ _dbus_data_slot_list_free (DBusDataSlotList *list)
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......@@ -459,4 +459,4 @@ _dbus_data_slot_test (void)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -1401,7 +1401,7 @@ _dbus_hash_table_get_n_entries (DBusHashTable *table)
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......@@ -1828,4 +1828,4 @@ _dbus_hash_test (void)
return ret;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -861,7 +861,7 @@ _dbus_get_local_machine_uuid_encoded (DBusString *uuid_str)
if (!_dbus_read_local_machine_uuid (&machine_uuid, FALSE,
&error))
{
#ifndef DBUS_BUILD_TESTS
#ifndef DBUS_ENABLE_EMBEDDED_TESTS
/* For the test suite, we may not be installed so just continue silently
* here. But in a production build, we want to be nice and loud about
* this.
......@@ -940,7 +940,7 @@ _dbus_real_assert_not_reached (const char *explanation,
}
#endif /* DBUS_DISABLE_ASSERT */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
static dbus_bool_t
run_failing_each_malloc (int n_mallocs,
const char *description,
......@@ -1035,6 +1035,6 @@ _dbus_test_oom_handling (const char *description,
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
/** @} */
......@@ -266,7 +266,7 @@ void _dbus_verbose_bytes_of_string (const DBusString *str,
extern const char *_dbus_no_memory_message;
#define _DBUS_SET_OOM(error) dbus_set_error_const ((error), DBUS_ERROR_NO_MEMORY, _dbus_no_memory_message)
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/* Memory debugging */
void _dbus_set_fail_alloc_counter (int until_next_fail);
int _dbus_get_fail_alloc_counter (void);
......@@ -290,7 +290,7 @@ dbus_bool_t _dbus_test_oom_handling (const char *description,
#define _dbus_decrement_fail_alloc_counter() (FALSE)
#define _dbus_disable_mem_pools() (FALSE)
#define _dbus_get_malloc_blocks_outstanding (0)
#endif /* !DBUS_BUILD_TESTS */
#endif /* !DBUS_ENABLE_EMBEDDED_TESTS */
typedef void (* DBusShutdownFunction) (void *data);
dbus_bool_t _dbus_register_shutdown_func (DBusShutdownFunction function,
......
......@@ -80,7 +80,7 @@
* Maximum number of keys in the keyring before
* we just ignore the rest
*/
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#define MAX_KEYS_IN_FILE 10
#else
#define MAX_KEYS_IN_FILE 256
......@@ -1023,7 +1023,7 @@ _dbus_keyring_get_hex_key (DBusKeyring *keyring,
/** @} */ /* end of exposed API */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......@@ -1156,5 +1156,5 @@ _dbus_keyring_test (void)
return FALSE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -788,7 +788,7 @@ _dbus_list_length_is_one (DBusList **list)
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......
......@@ -922,7 +922,7 @@ _dbus_loop_quit (DBusLoop *loop)
int
_dbus_get_oom_wait (void)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/* make tests go fast */
return 0;
#else
......
......@@ -1501,7 +1501,7 @@ _dbus_first_type_in_signature_c_str (const char *str,
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......@@ -1992,4 +1992,4 @@ _dbus_marshal_test (void)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -23,7 +23,7 @@
#include <config.h>
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-marshal-byteswap.h"
#include "dbus-test.h"
#include <stdio.h>
......@@ -102,4 +102,4 @@ _dbus_marshal_byteswap_test (void)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -23,7 +23,7 @@
#include <config.h>
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-marshal-recursive.h"
#include "dbus-marshal-basic.h"
......@@ -3574,4 +3574,4 @@ container_destroy (TestTypeNode *node)
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -22,7 +22,7 @@
*/
#include <config.h>
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
......@@ -585,4 +585,4 @@ _dbus_marshal_validate_test (void)
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -97,7 +97,7 @@
* @{
*/
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
static dbus_bool_t debug_initialized = FALSE;
static int fail_nth = -1;
static size_t fail_size = 0;
......@@ -240,7 +240,7 @@ _dbus_get_fail_alloc_failures (void)
return n_failures_per_failure;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* Called when about to alloc some memory; if
* it returns #TRUE, then the allocation should
......@@ -294,7 +294,7 @@ _dbus_decrement_fail_alloc_counter (void)
return FALSE;
}
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
/**
* Get the number of outstanding malloc()'d blocks.
......@@ -460,7 +460,7 @@ set_guards (void *real_block,
void*
dbus_malloc (size_t bytes)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
_dbus_initialize_malloc_debug ();
if (_dbus_decrement_fail_alloc_counter ())
......@@ -472,7 +472,7 @@ dbus_malloc (size_t bytes)
if (bytes == 0) /* some system mallocs handle this, some don't */
return NULL;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
else if (fail_size != 0 && bytes > fail_size)
return NULL;
else if (guards)
......@@ -499,7 +499,7 @@ dbus_malloc (size_t bytes)
void *mem;
mem = malloc (bytes);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (mem)
{
_dbus_atomic_inc (&n_blocks_outstanding);
......@@ -530,7 +530,7 @@ dbus_malloc (size_t bytes)
void*
dbus_malloc0 (size_t bytes)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
_dbus_initialize_malloc_debug ();
if (_dbus_decrement_fail_alloc_counter ())
......@@ -543,7 +543,7 @@ dbus_malloc0 (size_t bytes)
if (bytes == 0)
return NULL;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
else if (fail_size != 0 && bytes > fail_size)
return NULL;
else if (guards)
......@@ -571,7 +571,7 @@ dbus_malloc0 (size_t bytes)
void *mem;
mem = calloc (bytes, 1);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (mem)
{
_dbus_atomic_inc (&n_blocks_outstanding);
......@@ -601,7 +601,7 @@ void*
dbus_realloc (void *memory,
size_t bytes)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
_dbus_initialize_malloc_debug ();
if (_dbus_decrement_fail_alloc_counter ())
......@@ -617,7 +617,7 @@ dbus_realloc (void *memory,
dbus_free (memory);
return NULL;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
else if (fail_size != 0 && bytes > fail_size)
return NULL;
else if (guards)
......@@ -677,7 +677,7 @@ dbus_realloc (void *memory,
void *mem;
mem = realloc (memory, bytes);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (mem == NULL && malloc_cannot_fail)
{
_dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
......@@ -700,7 +700,7 @@ dbus_realloc (void *memory,
void
dbus_free (void *memory)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (guards)
{
check_guards (memory, TRUE);
......@@ -724,7 +724,7 @@ dbus_free (void *memory)
if (memory) /* we guarantee it's safe to free (NULL) */
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#ifdef DBUS_DISABLE_ASSERT
_dbus_atomic_dec (&n_blocks_outstanding);
#else
......@@ -912,7 +912,7 @@ dbus_shutdown (void)
/** @} */ /** End of public API docs block */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
/**
......
......@@ -213,7 +213,7 @@ _dbus_mem_pool_free (DBusMemPool *pool)
void*
_dbus_mem_pool_alloc (DBusMemPool *pool)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (_dbus_disable_mem_pools ())
{
DBusMemBlock *block;
......@@ -280,7 +280,7 @@ _dbus_mem_pool_alloc (DBusMemPool *pool)
/* Need a new block */
DBusMemBlock *block;
int alloc_size;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
int saved_counter;
#endif
......@@ -294,7 +294,7 @@ _dbus_mem_pool_alloc (DBusMemPool *pool)
alloc_size = sizeof (DBusMemBlock) - ELEMENT_PADDING + pool->block_size;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/* We save/restore the counter, so that memory pools won't
* cause a given function to have different number of
* allocations on different invocations. i.e. when testing
......@@ -310,7 +310,7 @@ _dbus_mem_pool_alloc (DBusMemPool *pool)
else
block = dbus_malloc (alloc_size);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
_dbus_set_fail_alloc_counter (saved_counter);
_dbus_assert (saved_counter == _dbus_get_fail_alloc_counter ());
#endif
......@@ -349,7 +349,7 @@ _dbus_mem_pool_dealloc (DBusMemPool *pool,
{
VALGRIND_MEMPOOL_FREE (pool, element);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (_dbus_disable_mem_pools ())
{
DBusMemBlock *block;
......@@ -449,7 +449,7 @@ _dbus_mem_pool_get_stats (DBusMemPool *pool,
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
#include <time.h>
......@@ -644,4 +644,4 @@ _dbus_mem_pool_test (void)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -24,7 +24,7 @@
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-message-factory.h"
#include "dbus-message-private.h"
#include "dbus-signature.h"
......@@ -1302,4 +1302,4 @@ _dbus_message_data_iter_get_and_next (DBusMessageDataIter *iter,
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -24,7 +24,7 @@
#ifndef DBUS_MESSAGE_FACTORY_H
#define DBUS_MESSAGE_FACTORY_H
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include <dbus/dbus-string.h>
#include <dbus/dbus-marshal-basic.h>
......@@ -56,6 +56,6 @@ dbus_bool_t _dbus_message_data_iter_get_and_next (DBusMessageDataIter *iter,
DBUS_END_DECLS
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
#endif /* DBUS_MESSAGE_FACTORY_H */
......@@ -45,7 +45,7 @@
* @{
*/
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* Reads arguments from a message iterator given a variable argument
* list. Only arguments of basic type and arrays of fixed-length
......@@ -76,11 +76,11 @@ dbus_message_iter_get_args (DBusMessageIter *iter,
return retval;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include "dbus-message-factory.h"
#include <stdio.h>
......@@ -1542,4 +1542,4 @@ _dbus_message_test (const char *test_data_dir)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -56,7 +56,7 @@ static void dbus_message_finalize (DBusMessage *message);
* @{
*/
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
static dbus_bool_t
_dbus_enable_message_cache (void)
{
......
......@@ -173,7 +173,7 @@ dbus_get_version (int *major_version_p,
/** @} */ /* End of public API */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
......
......@@ -503,7 +503,7 @@ unlock:
connection = tree->connection;
/* Unlock and call application code */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (connection)
#endif
{
......@@ -515,7 +515,7 @@ unlock:
if (unregister_function)
(* unregister_function) (connection, user_data);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (connection)
#endif
dbus_connection_unref (connection);
......@@ -638,7 +638,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree,
DBUS_INTERFACE_INTROSPECTABLE,
"Introspect"))
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -653,7 +653,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree,
if (!_dbus_string_init (&xml))
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -698,7 +698,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree,
if (!dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &v_STRING))
goto out;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -711,7 +711,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree,
result = DBUS_HANDLER_RESULT_HANDLED;
out:
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -762,7 +762,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
path = NULL;
if (!dbus_message_get_path_decomposed (message, &path))
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -777,7 +777,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
if (path == NULL)
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -846,7 +846,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
_dbus_verbose (" (invoking a handler)\n");
#endif
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -863,7 +863,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
message,
user_data);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
_dbus_connection_lock (tree->connection);
......@@ -886,7 +886,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
}
else
{
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -1057,7 +1057,7 @@ _dbus_object_tree_list_registered_and_unlock (DBusObjectTree *tree,
parent_path,
child_entries);
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (tree->connection)
#endif
{
......@@ -1214,7 +1214,7 @@ flatten_path (const char **path)
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#ifndef DOXYGEN_SHOULD_SKIP_THIS
......@@ -1962,4 +1962,4 @@ _dbus_object_tree_test (void)
#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -31,7 +31,7 @@
#include "dbus-string.h"
#include "dbus-protocol.h"
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* @defgroup DBusServerDebugPipe DBusServerDebugPipe
......@@ -427,5 +427,5 @@ _dbus_transport_open_debug_pipe (DBusAddressEntry *entry,
/** @} */
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -26,7 +26,7 @@
#include "dbus-server-unix.h"
#include "dbus-server-socket.h"
#include "dbus-string.h"
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-server-debug-pipe.h"
#endif
#include "dbus-address.h"
......@@ -529,7 +529,7 @@ static const struct {
} listen_funcs[] = {
{ _dbus_server_listen_socket }
, { _dbus_server_listen_platform_specific }
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
, { _dbus_server_listen_debug_pipe }
#endif
};
......@@ -1188,7 +1188,7 @@ dbus_server_get_data (DBusServer *server,
/** @} */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <string.h>
......@@ -1244,4 +1244,4 @@ _dbus_server_test (void)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -511,7 +511,7 @@ _dbus_sha_compute (const DBusString *data,
/** @} */ /* end of exported functions */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-test.h"
#include <stdio.h>
......@@ -966,4 +966,4 @@ _dbus_sha_test (const char *test_data_dir)
return TRUE;
}
#endif /* DBUS_BUILD_TESTS */
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
......@@ -410,7 +410,7 @@ dbus_type_is_valid (int typecode)
/** @} */ /* end of DBusSignature group */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* @ingroup DBusSignatureInternals
......
......@@ -44,7 +44,7 @@ typedef struct {
#define MINIMUM_SIZE 8
/* If we're in the regression tests, force reallocation to happen sooner */
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#define DEFAULT_SIZE_HINT 1
#else
#define DEFAULT_SIZE_HINT MINIMUM_SIZE
......
......@@ -63,7 +63,7 @@ struct DBusBabysitter
int refcount;
HANDLE start_sync_event;
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
HANDLE end_sync_event;
#endif
......@@ -109,7 +109,7 @@ _dbus_babysitter_new (void)
return NULL;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
sitter->end_sync_event = CreateEvent (NULL, FALSE, FALSE, NULL);
if (sitter->end_sync_event == NULL)
{
......@@ -250,7 +250,7 @@ _dbus_babysitter_unref (DBusBabysitter *sitter)
sitter->start_sync_event = NULL;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (sitter->end_sync_event != NULL)
{
CloseHandle (sitter->end_sync_event);
......@@ -628,7 +628,7 @@ babysitter (void *parameter)
sitter->child_handle = NULL;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
SetEvent (sitter->end_sync_event);
#endif
......@@ -753,7 +753,7 @@ _dbus_babysitter_set_result_function (DBusBabysitter *sitter,
sitter->finished_data = user_data;
}
#ifdef DBUS_BUILD_TESTS
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
static char *
get_test_exec (const char *exe,
......
......@@ -936,7 +936,7 @@ do_exec (int child_err_report_fd,
DBusSpawnChildSetupFunc child_setup,