summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--test/lilv_test.c30
-rw-r--r--wscript2
3 files changed, 19 insertions, 16 deletions
diff --git a/NEWS b/NEWS
index ea1a118..a44d3e6 100644
--- a/NEWS
+++ b/NEWS
@@ -7,11 +7,12 @@ lilv (0.16.1) unstable;
* Allow passing NULL port_class to lilv_plugin_get_port_by_designation
* Call GetProcAddress with correct calling convention on Windows
* Add support for running plugins from Python by Kaspar Emanuel
+ * Clean up after test suite so multiple runs are successful
* lv2info: Don't display invalid control maxes and defaults
(patch from Robin Gareus)
* lilvmm.hpp: Add wrappers for UI API
- -- David Robillard <d@drobilla.net> Thu, 19 Dec 2013 12:48:38 -0500
+ -- David Robillard <d@drobilla.net> Mon, 30 Dec 2013 12:13:25 -0500
lilv (0.16.0) stable;
diff --git a/test/lilv_test.c b/test/lilv_test.c
index 1639be7..96596ca 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -1314,23 +1314,23 @@ test_state(void)
// Save state to a directory
int ret = lilv_state_save(world, &map, &unmap, state, NULL,
- "state.lv2", "state.ttl");
+ "state/state.lv2", "state.ttl");
TEST_ASSERT(!ret);
// Load state from directory
LilvState* state5 = lilv_state_new_from_file(world, &map, NULL,
- "state.lv2/state.ttl");
+ "state/state.lv2/state.ttl");
TEST_ASSERT(lilv_state_equals(state, state5)); // Round trip accuracy
// Save state with URI to a directory
const char* state_uri = "http://example.org/state";
ret = lilv_state_save(world, &map, &unmap, state, state_uri,
- "state6.lv2", "state6.ttl");
+ "state/state6.lv2", "state6.ttl");
TEST_ASSERT(!ret);
// Load default bundle into world and load state from it
- uint8_t* state6_path = (uint8_t*)lilv_path_absolute("state6.lv2/");
+ uint8_t* state6_path = (uint8_t*)lilv_path_absolute("state/state6.lv2/");
SerdNode state6_uri = serd_node_new_file_uri(state6_path, 0, 0, true);
LilvNode* test_state_bundle = lilv_new_uri(world, (const char*)state6_uri.buf);
LilvNode* test_state_node = lilv_new_uri(world, state_uri);
@@ -1369,13 +1369,13 @@ test_state(void)
// Get instance state state
LilvState* fstate = lilv_state_new_from_instance(
plugin, instance, &map,
- file_dir, copy_dir, link_dir, "fstate.lv2",
+ file_dir, copy_dir, link_dir, "state/fstate.lv2",
get_port_value, world, 0, ffeatures);
// Get another instance state
LilvState* fstate2 = lilv_state_new_from_instance(
plugin, instance, &map,
- file_dir, copy_dir, link_dir, "fstate2.lv2",
+ file_dir, copy_dir, link_dir, "state/fstate2.lv2",
get_port_value, world, 0, ffeatures);
// Should be identical
@@ -1386,7 +1386,7 @@ test_state(void)
// Get yet another instance state
LilvState* fstate3 = lilv_state_new_from_instance(
- plugin, instance, &map, file_dir, copy_dir, link_dir, "fstate3.lv2",
+ plugin, instance, &map, file_dir, copy_dir, link_dir, "state/fstate3.lv2",
get_port_value, world, 0, ffeatures);
// Should be different
@@ -1394,12 +1394,12 @@ test_state(void)
// Save state to a directory
ret = lilv_state_save(world, &map, &unmap, fstate, NULL,
- "fstate.lv2", "fstate.ttl");
+ "state/fstate.lv2", "fstate.ttl");
TEST_ASSERT(!ret);
// Load state from directory
LilvState* fstate4 = lilv_state_new_from_file(world, &map, NULL,
- "fstate.lv2/fstate.ttl");
+ "state/fstate.lv2/fstate.ttl");
TEST_ASSERT(lilv_state_equals(fstate, fstate4)); // Round trip accuracy
// Restore instance state to loaded state
@@ -1408,18 +1408,18 @@ test_state(void)
// Take a new snapshot and ensure it matches
LilvState* fstate5 = lilv_state_new_from_instance(
plugin, instance, &map,
- file_dir, copy_dir, link_dir, "fstate5.lv2",
+ file_dir, copy_dir, link_dir, "state/fstate5.lv2",
get_port_value, world, 0, ffeatures);
TEST_ASSERT(lilv_state_equals(fstate3, fstate5));
// Save state to a (different) directory again
ret = lilv_state_save(world, &map, &unmap, fstate, NULL,
- "fstate6.lv2", "fstate6.ttl");
+ "state/fstate6.lv2", "fstate6.ttl");
TEST_ASSERT(!ret);
// Reload it and ensure it's identical to the other loaded version
LilvState* fstate6 = lilv_state_new_from_file(world, &map, NULL,
- "fstate6.lv2/fstate6.ttl");
+ "state/fstate6.lv2/fstate6.ttl");
TEST_ASSERT(lilv_state_equals(fstate4, fstate6));
// Run, changing rec file (without changing size)
@@ -1428,18 +1428,18 @@ test_state(void)
// Take a new snapshot
LilvState* fstate7 = lilv_state_new_from_instance(
plugin, instance, &map,
- file_dir, copy_dir, link_dir, "fstate7.lv2",
+ file_dir, copy_dir, link_dir, "state/fstate7.lv2",
get_port_value, world, 0, ffeatures);
TEST_ASSERT(!lilv_state_equals(fstate6, fstate7));
// Save the changed state to a (different) directory again
ret = lilv_state_save(world, &map, &unmap, fstate7, NULL,
- "fstate7.lv2", "fstate7.ttl");
+ "state/fstate7.lv2", "fstate7.ttl");
TEST_ASSERT(!ret);
// Reload it and ensure it's changed
LilvState* fstate72 = lilv_state_new_from_file(world, &map, NULL,
- "fstate7.lv2/fstate7.ttl");
+ "state/fstate7.lv2/fstate7.ttl");
TEST_ASSERT(lilv_state_equals(fstate72, fstate7));
TEST_ASSERT(!lilv_state_equals(fstate6, fstate72));
diff --git a/wscript b/wscript
index 7f48032..cfc1ff5 100644
--- a/wscript
+++ b/wscript
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import os
+import shutil
import subprocess
import sys
import waflib.Options as Options
@@ -406,6 +407,7 @@ def test(ctx):
os.environ['PATH'] = 'test' + os.pathsep + os.getenv('PATH')
autowaf.run_tests(ctx, APPNAME, ['lilv_test'], dirs=['./src','./test'])
autowaf.post_test(ctx, APPNAME)
+ shutil.rmtree('state')
def lint(ctx):
subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-readability/todo,-build/include,-runtime/sizeof src/* lilv/*', shell=True)