Mercurial > hg > sonic-annotator
comparison tests/test-summaries.sh @ 59:52b9d58edb78
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)
author | Chris Cannam |
---|---|
date | Mon, 09 Jan 2012 16:30:44 +0000 |
parents | 94d988cef54e |
children | fae326c22df5 |
comparison
equal
deleted
inserted
replaced
58:350f61d5d9be | 59:52b9d58edb78 |
---|---|
4 r=$mypath/../sonic-annotator | 4 r=$mypath/../sonic-annotator |
5 | 5 |
6 infile=$mypath/audio/3clicks8.wav | 6 infile=$mypath/audio/3clicks8.wav |
7 tmpfile=$mypath/tmp_1_$$ | 7 tmpfile=$mypath/tmp_1_$$ |
8 tmpcanonical=$mypath/tmp_2_$$ | 8 tmpcanonical=$mypath/tmp_2_$$ |
9 expcanonical=$mypath/tmp_exp_2_$$ | |
9 tmpcmp1=$mypath/tmp_3_$$ | 10 tmpcmp1=$mypath/tmp_3_$$ |
10 tmpcmp2=$mypath/tmp_4_$$ | 11 tmpcmp2=$mypath/tmp_4_$$ |
11 | 12 |
12 trap "rm -f $tmpfile $tmpcanonical $tmpcmp1 $tmpcmp2" 0 | 13 trap "rm -f $tmpfile $tmpcanonical $expcanonical $tmpcmp1 $tmpcmp2" 0 |
13 | 14 |
14 . test-include.sh | 15 . test-include.sh |
15 | 16 |
16 faildiff() { | 17 faildiff() { |
17 echo "Test failed: $1" | 18 echo "Test failed: $1" |
75 fail "Fails to run transform $stransform with RDF output" | 76 fail "Fails to run transform $stransform with RDF output" |
76 | 77 |
77 rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical || | 78 rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical || |
78 fail "Fails to produce parseable RDF/TTL for transform $stransform" | 79 fail "Fails to produce parseable RDF/TTL for transform $stransform" |
79 | 80 |
80 compare $tmpcanonical ${sexpected}.n3 || \ | 81 rapper -i turtle ${sexpected}.n3 -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $expcanonical || |
81 faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical ${sexpected}.n3 | 82 fail "Internal error: Failed to canonicalise expected output file $expected.n3" |
83 | |
84 compare $tmpcanonical $expcanonical || \ | |
85 faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical $expcanonical | |
82 | 86 |
83 exit 0 | 87 exit 0 |
84 | 88 |