From 830c41e97938bd4bbf7422718bbc90df750b9d78 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 Jan 2021 12:07:16 +0100 Subject: Use unique test bundle names so tests can run in parallel --- test/test_reload_bundle.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/test_reload_bundle.c') diff --git a/test/test_reload_bundle.c b/test/test_reload_bundle.c index c48a295..a8f9044 100644 --- a/test/test_reload_bundle.c +++ b/test/test_reload_bundle.c @@ -29,8 +29,11 @@ main(void) LilvTestEnv* const env = lilv_test_env_new(); LilvWorld* const world = env->world; + lilv_world_load_all(world); + // Create a simple plugin bundle create_bundle(env, + "reload_bundle.lv2", ":plug a lv2:Plugin ; lv2:binary ; rdfs:seeAlso .\n", ":plug a lv2:Plugin ; " @@ -39,8 +42,7 @@ main(void) lilv_world_load_specifications(world); // Load bundle - LilvNode* bundle_uri = lilv_new_uri(world, env->test_bundle_uri); - lilv_world_load_bundle(world, bundle_uri); + lilv_world_load_bundle(world, env->test_bundle_uri); // Check that plugin is present const LilvPlugins* plugins = lilv_world_get_all_plugins(world); @@ -53,11 +55,12 @@ main(void) lilv_node_free(name); // Unload bundle from world and delete it - lilv_world_unload_bundle(world, bundle_uri); + lilv_world_unload_bundle(world, env->test_bundle_uri); delete_bundle(env); // Create a new version of the same bundle, but with a different name create_bundle(env, + "test_reload_bundle.lv2", ":plug a lv2:Plugin ; lv2:binary ; rdfs:seeAlso .\n", ":plug a lv2:Plugin ; " @@ -67,7 +70,7 @@ main(void) assert(lilv_plugins_size(plugins) == 0); // Load new bundle - lilv_world_load_bundle(world, bundle_uri); + lilv_world_load_bundle(world, env->test_bundle_uri); // Check that plugin is present again and is the same LilvPlugin const LilvPlugin* plug2 = lilv_plugins_get_by_uri(plugins, env->plugin1_uri); @@ -81,9 +84,8 @@ main(void) lilv_node_free(name2); // Load new bundle again (noop) - lilv_world_load_bundle(world, bundle_uri); + lilv_world_load_bundle(world, env->test_bundle_uri); - lilv_node_free(bundle_uri); delete_bundle(env); lilv_test_env_free(env); -- cgit v1.2.1