changeset 121:5200446bbc6b test-reorg

Check for multiple transforms. But one of these tests fails, so we'd better go back to development branch and sort out why!
author Chris Cannam
date Wed, 08 Oct 2014 15:38:34 +0100
parents dcecd6997214
children eb0f3a2029b8
files tests/test-transforms-basic/expected/multiple.csv tests/test-transforms-basic/test-transforms-basic.sh
diffstat 2 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-transforms-basic/expected/multiple.csv	Wed Oct 08 15:38:34 2014 +0100
@@ -0,0 +1,18 @@
+"./../audio/3clicks8.wav",0.011609977
+,0.162539682
+,0.290249433
+,0.394739229
+,0.782312925
+,0.777868481
+,1.648616780
+,1.650680272
+,2.414875283
+,2.417346939
+,2.414875283
+,3.041814059
+,3.134693877
+,3.157913832
+,3.599092970
+,3.831292517
+,4.504671202
+,4.748480725
--- a/tests/test-transforms-basic/test-transforms-basic.sh	Wed Oct 08 15:26:48 2014 +0100
+++ b/tests/test-transforms-basic/test-transforms-basic.sh	Wed Oct 08 15:38:34 2014 +0100
@@ -59,5 +59,25 @@
     done
 done
 
+# Check we can't run with multiple transforms if one or more is missing!
+
+$r -t $mypath/transforms/percussiononsets-set-step-and-block-size.n3 \
+   -t $mypath/transforms/squiggly.n3 \
+   -t $mypath/transforms/percussiononsets-start-and-duration.n3 \
+    -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null && \
+    fail "Incorrectly seems to succeed in running with a missing transform file"
+
+
+# Check we can run with multiple transforms if they're all present
+
+$r -t $mypath/transforms/percussiononsets-set-step-and-block-size.n3 \
+   -t $mypath/transforms/percussiononsets-set-parameters.xml \
+   -t $mypath/transforms/percussiononsets-start-and-duration.n3 \
+    -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
+    fail "Fails to run with multiple transforms"
+
+csvcompare $tmpfile2 $mypath/expected/multiple.csv || \
+    faildiff "Output mismatch for multiple transforms" $tmpfile2 $mypath/expected/multiple.csv
+
 exit 0