mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-04-24 15:10:43 +02:00
tests: common: add API to check if spa lib is installed
Allows to skip tests if specific spa lib is not installed
This commit is contained in:
parent
ece8f7a78d
commit
eb8f9a1a83
1 changed files with 12 additions and 0 deletions
|
|
@ -158,3 +158,15 @@ test_ensure_object_manager_is_installed (WpObjectManager * om, WpCore * core,
|
|||
g_main_loop_run (loop);
|
||||
g_signal_handler_disconnect (om, id);
|
||||
}
|
||||
|
||||
static G_GNUC_UNUSED gboolean
|
||||
test_is_spa_lib_installed (WpBaseTestFixture *f, const gchar *factory_name) {
|
||||
struct spa_handle *handle;
|
||||
|
||||
handle = pw_context_load_spa_handle (f->server.context, factory_name, NULL);
|
||||
if (!handle)
|
||||
return FALSE;
|
||||
|
||||
pw_unload_spa_handle (handle);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue