mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Fix some unit test
Run abi checks only on x86_64 until we have sizes for more archs Don't start a daemon in the tests because that would require XDG_RUNTIME_DIR set
This commit is contained in:
parent
1cedfade3a
commit
4e8d85da2f
7 changed files with 59 additions and 12 deletions
|
|
@ -27,7 +27,11 @@
|
|||
static void test_abi(void)
|
||||
{
|
||||
/* array */
|
||||
#if defined(__x86_64__)
|
||||
spa_assert(sizeof(struct pw_array) == 32);
|
||||
#else
|
||||
fprintf(stderr, "%zd\n", sizeof(struct pw_array));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void test_array(void)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,11 @@
|
|||
|
||||
static void test_abi(void)
|
||||
{
|
||||
#if defined(__x86_64__)
|
||||
spa_assert(sizeof(struct pw_properties) == 24);
|
||||
#else
|
||||
fprintf(stderr, "%zd\n", sizeof(struct pw_properties));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void test_empty(void)
|
||||
|
|
|
|||
|
|
@ -59,8 +59,13 @@ static void test_abi(void)
|
|||
TEST_FUNC(ev, test, process);
|
||||
TEST_FUNC(ev, test, drained);
|
||||
|
||||
#if defined(__x86_64__)
|
||||
spa_assert(sizeof(struct pw_buffer) == 24);
|
||||
spa_assert(sizeof(struct pw_time) == 40);
|
||||
#else
|
||||
fprintf(stderr, "%zd\n", sizeof(struct pw_buffer));
|
||||
fprintf(stderr, "%zd\n", sizeof(struct pw_time));
|
||||
#endif
|
||||
|
||||
spa_assert(PW_VERSION_STREAM_EVENTS == 0);
|
||||
spa_assert(sizeof(ev) == sizeof(test));
|
||||
|
|
@ -142,10 +147,7 @@ static void test_create(void)
|
|||
struct pw_time tm;
|
||||
|
||||
loop = pw_main_loop_new(NULL);
|
||||
context = pw_context_new(pw_main_loop_get_loop(loop),
|
||||
pw_properties_new(
|
||||
PW_KEY_CORE_DAEMON, "1",
|
||||
NULL), 12);
|
||||
context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 12);
|
||||
spa_assert(context != NULL);
|
||||
core = pw_context_connect_self(context, NULL, 0);
|
||||
spa_assert(core != NULL);
|
||||
|
|
@ -194,10 +196,7 @@ static void test_properties(void)
|
|||
struct spa_dict_item items[3];
|
||||
|
||||
loop = pw_main_loop_new(NULL);
|
||||
context = pw_context_new(pw_main_loop_get_loop(loop),
|
||||
pw_properties_new(
|
||||
PW_KEY_CORE_DAEMON, "1",
|
||||
NULL), 12);
|
||||
context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 12);
|
||||
spa_assert(context != NULL);
|
||||
core = pw_context_connect_self(context, NULL, 0);
|
||||
spa_assert(core != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue