test: handle running without a server

The security context test requires a running server, exit gracefully for
now when there is server running, like in the CI.
This commit is contained in:
Wim Taymans 2024-03-15 12:25:30 +01:00
parent 7e9e261fa6
commit 76ce2f77a4

View file

@ -103,6 +103,8 @@ static void test_create(void)
context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 12);
spa_assert_se(context != NULL);
core = pw_context_connect(context, NULL, 0);
if (core == NULL && errno == EHOSTDOWN)
return;
spa_assert_se(core != NULL);
spa_zero(info);