# HG changeset patch # User Chris Cannam # Date 1473935483 -3600 # Node ID ffa60ff17a8635b692b32a577593fba492a8a3b4 # Parent 0774f36cb1511b2cca533e46401f3641baf03331 Add test for new fsr-mixed output of Vamp Test Plugin diff -r 0774f36cb151 -r ffa60ff17a86 .hgsubstate --- a/.hgsubstate Thu Sep 15 11:31:03 2016 +0100 +++ b/.hgsubstate Thu Sep 15 11:31:23 2016 +0100 @@ -1,4 +1,4 @@ 896aefe629c85b05ae0880ec93a396b9e3a5a304 dataquay 1e4f338ae482429a7ab9bdd0825242042354152f sv-dependency-builds 16955f929d377f80412f86f7f51e104749993d38 svcore -f8a3bd2d86cbf7c33b010594b2320e481000646d vamp-plugin-sdk +4101e3f80aa0f2b352577e85c9af1568bc290612 vamp-plugin-sdk diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-jams-writer/expected/curve-fsr.json --- a/tests/test-jams-writer/expected/curve-fsr.json Thu Sep 15 11:31:03 2016 +0100 +++ b/tests/test-jams-writer/expected/curve-fsr.json Thu Sep 15 11:31:23 2016 +0100 @@ -13,7 +13,7 @@ "annotator": { "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin", "output_id": "curve-fsr", - "plugin_version": "3", + "plugin_version": "4", "step_size": 1024, "block_size": 1024, "sample_rate": 44100, diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-jams-writer/expected/grid-oss.json --- a/tests/test-jams-writer/expected/grid-oss.json Thu Sep 15 11:31:03 2016 +0100 +++ b/tests/test-jams-writer/expected/grid-oss.json Thu Sep 15 11:31:23 2016 +0100 @@ -13,7 +13,7 @@ "annotator": { "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin", "output_id": "grid-oss", - "plugin_version": "3", + "plugin_version": "4", "step_size": 1024, "block_size": 1024, "sample_rate": 44100, diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-jams-writer/expected/instants.json --- a/tests/test-jams-writer/expected/instants.json Thu Sep 15 11:31:03 2016 +0100 +++ b/tests/test-jams-writer/expected/instants.json Thu Sep 15 11:31:23 2016 +0100 @@ -13,7 +13,7 @@ "annotator": { "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin", "output_id": "instants", - "plugin_version": "3", + "plugin_version": "4", "step_size": 1024, "block_size": 1024, "sample_rate": 44100, diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-jams-writer/expected/notes-regions.json --- a/tests/test-jams-writer/expected/notes-regions.json Thu Sep 15 11:31:03 2016 +0100 +++ b/tests/test-jams-writer/expected/notes-regions.json Thu Sep 15 11:31:23 2016 +0100 @@ -13,7 +13,7 @@ "annotator": { "plugin_id": "vamp:vamp-test-plugin:vamp-test-plugin", "output_id": "notes-regions", - "plugin_version": "3", + "plugin_version": "4", "step_size": 1024, "block_size": 1024, "sample_rate": 44100, diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-fsr-mixed.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-vamp-test-plugin/expected/vamp-test-plugin-curve-fsr-mixed.csv Thu Sep 15 11:31:23 2016 +0100 @@ -0,0 +1,10 @@ +,2.400000000,0,"1 of 10: 0 at 2.4 snap to 2.4" +,2.800000000,0.1,"2 of 10: 0.1 at 2.9 snap to 2.8" +,3.200000000,0.2,"3 of 10: 0.2 at 3.14 snap to 3.2" +,3.600000000,0.3,"4 of 10: 0.3 at 3.5 snap to 3.6" +,4.000000000,0.4,"5 of 10: 0.4 at 4" +,4.400000000,0.5,"6 of 10: 0.5 at 4.4" +,4.000000000,0.6,"7 of 10: 0.6 at 3.9 snap to 4" +,4.400000000,0.7,"8 of 10: 0.7 at 4.4 snap to 4.4" +,4.800000000,0.8,"9 of 10: 0.8 at 4.8" +,5.200000000,0.9,"10 of 10: 0.9 at 5 snap to 5.2" diff -r 0774f36cb151 -r ffa60ff17a86 tests/test-vamp-test-plugin/test-vamp-test-plugin.sh --- a/tests/test-vamp-test-plugin/test-vamp-test-plugin.sh Thu Sep 15 11:31:03 2016 +0100 +++ b/tests/test-vamp-test-plugin/test-vamp-test-plugin.sh Thu Sep 15 11:31:23 2016 +0100 @@ -7,13 +7,16 @@ trap "rm -f $tmpcsv" 0 -for output in instants curve-oss curve-fsr curve-fsr-timed curve-vsr grid-oss grid-fsr notes-regions; do +$r --transform-minversion $testplug 4 || \ + fail "Vamp Test Plugin version is too old (at least v4 required)" + +for output in instants curve-oss curve-fsr curve-fsr-timed curve-fsr-mixed curve-vsr grid-oss grid-fsr notes-regions; do $r -d "$testplug:$output" -w csv --csv-one-file "$tmpcsv" --csv-force "$infile" 2>/dev/null || \ fail "Failed to run for plugin $testplug with output $output" csvcompare_ignorefirst "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" || \ - fail "Output differs from expected for $output" + faildiff "Output differs from expected for $output" "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" done