# HG changeset patch # User Chris Cannam # Date 1326126644 0 # Node ID 52b9d58edb7811b958b5e77acaee42ba45a93b70 # Parent 350f61d5d9be27ac1bb26f66c73fddac938ee962 Ensure expected output (as well as test output) gets canonicalised before comparison. The test in question still fails -- I think now only because of plugin output ordering changes (prior to svcore rev f3fd2988fc9b it also had picked up some incorrect output feature types) diff -r 350f61d5d9be -r 52b9d58edb78 tests/expected/transforms-summaries-percussiononsets-from-rdf.n3 --- a/tests/expected/transforms-summaries-percussiononsets-from-rdf.n3 Mon Jan 09 14:55:17 2012 +0000 +++ b/tests/expected/transforms-summaries-percussiononsets-from-rdf.n3 Mon Jan 09 16:30:44 2012 +0000 @@ -8,6 +8,7 @@ @prefix xsd: . @prefix tl: . @prefix vamp: . +@prefix : <> . :transform_0_onsets vamp:block_size "1024"^^xsd:int ; diff -r 350f61d5d9be -r 52b9d58edb78 tests/test-summaries.sh --- a/tests/test-summaries.sh Mon Jan 09 14:55:17 2012 +0000 +++ b/tests/test-summaries.sh Mon Jan 09 16:30:44 2012 +0000 @@ -6,10 +6,11 @@ infile=$mypath/audio/3clicks8.wav tmpfile=$mypath/tmp_1_$$ tmpcanonical=$mypath/tmp_2_$$ +expcanonical=$mypath/tmp_exp_2_$$ tmpcmp1=$mypath/tmp_3_$$ tmpcmp2=$mypath/tmp_4_$$ -trap "rm -f $tmpfile $tmpcanonical $tmpcmp1 $tmpcmp2" 0 +trap "rm -f $tmpfile $tmpcanonical $expcanonical $tmpcmp1 $tmpcmp2" 0 . test-include.sh @@ -77,8 +78,11 @@ rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical || fail "Fails to produce parseable RDF/TTL for transform $stransform" -compare $tmpcanonical ${sexpected}.n3 || \ - faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical ${sexpected}.n3 +rapper -i turtle ${sexpected}.n3 -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $expcanonical || + fail "Internal error: Failed to canonicalise expected output file $expected.n3" + +compare $tmpcanonical $expcanonical || \ + faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical $expcanonical exit 0 diff -r 350f61d5d9be -r 52b9d58edb78 tests/transforms/transforms-summaries-percussiononsets-detectionfunction.n3 --- a/tests/transforms/transforms-summaries-percussiononsets-detectionfunction.n3 Mon Jan 09 14:55:17 2012 +0000 +++ b/tests/transforms/transforms-summaries-percussiononsets-detectionfunction.n3 Mon Jan 09 16:30:44 2012 +0000 @@ -3,26 +3,26 @@ @prefix examples: . @prefix : <#>. -:transform0 a vamp:Transform; # 8 +:transform0 a vamp:Transform; vamp:plugin examples:percussiononsets ; vamp:output examples:percussiononsets_output_detectionfunction ; vamp:summary_type "mean" . -:transform1 a vamp:Transform; # 11 +:transform1 a vamp:Transform; vamp:plugin examples:percussiononsets ; vamp:output examples:percussiononsets_output_detectionfunction ; vamp:summary_type "median" . -:transform2 a vamp:Transform; # 0 +:transform2 a vamp:Transform; vamp:plugin examples:percussiononsets ; vamp:output examples:percussiononsets_output_onsets . -:transform3 a vamp:Transform; # 14 +:transform3 a vamp:Transform; vamp:plugin examples:percussiononsets ; vamp:output examples:percussiononsets_output_detectionfunction ; vamp:summary_type "mode" . -:transform4 a vamp:Transform; # 23 +:transform4 a vamp:Transform; vamp:plugin examples:percussiononsets ; vamp:output examples:percussiononsets_output_detectionfunction ; vamp:step_size 2048 ;