summaryrefslogtreecommitdiffstats
path: root/test/test_reload_bundle.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-11 12:07:16 +0100
committerDavid Robillard <d@drobilla.net>2021-01-11 12:25:48 +0100
commit830c41e97938bd4bbf7422718bbc90df750b9d78 (patch)
tree3c6980115745347521fd7505183b346353adcca4 /test/test_reload_bundle.c
parent1d0547504963fcbe28dba9d3913a2398df65a938 (diff)
downloadlilv-830c41e97938bd4bbf7422718bbc90df750b9d78.tar.gz
lilv-830c41e97938bd4bbf7422718bbc90df750b9d78.tar.bz2
lilv-830c41e97938bd4bbf7422718bbc90df750b9d78.zip
Use unique test bundle names so tests can run in parallel
Diffstat (limited to 'test/test_reload_bundle.c')
-rw-r--r--test/test_reload_bundle.c14
1 files changed, 8 insertions, 6 deletions
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 <foo" SHLIB_EXT
"> ; rdfs:seeAlso <plugin.ttl> .\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 <foo" SHLIB_EXT
"> ; rdfs:seeAlso <plugin.ttl> .\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);