changeset 281:c8162c2992f8 piper-nopiper

Further test updates. The AF results should match to 3dp with different MAD builds. The onset position results hopefully should match completely now prefix sorted, let's see.
author Chris Cannam
date Tue, 29 Nov 2016 17:14:21 +0000
parents cb29834ce827
children b9757a8eed6f
files tests/test-audioformat/expected/percussiononsets-mp3.csv tests/test-audioformat/test-audioformat.sh tests/test-multiple-audio/expected/all-files.csv tests/test-multiple-audio/expected/multiplexed.csv tests/test-multiple-audio/expected/playlist.csv tests/test-multiple-audio/test-multiple-audio.sh
diffstat 6 files changed, 62 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-audioformat/expected/percussiononsets-mp3.csv	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-audioformat/expected/percussiononsets-mp3.csv	Tue Nov 29 17:14:21 2016 +0000
@@ -1,4 +1,3 @@
-"./../audio/3clicks.mp3",0.011609978
-,0.801088436
-,1.671836735
-,2.438095238
+"./../audio/3clicks.mp3",0.777868481
+,1.648616780
+,2.403265306
--- a/tests/test-audioformat/test-audioformat.sh	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-audioformat/test-audioformat.sh	Tue Nov 29 17:14:21 2016 +0000
@@ -28,15 +28,8 @@
     $r -t $transform -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
 	fail "Fails to run transform $transform against audio file $infile"
 
-    if [ "$extension" = "wav" ]; then
-	csvcompare $tmpfile2 $expected || \
-	    faildiff "Output mismatch for transform $transform with audio file $infile" $tmpfile2 $expected
-    else
-	csvcompare $tmpfile2 $expected || \
-	    ( echo "NOTE: Output mismatch for transform $transform with audio file $infile" ; \
-	      echo "This may be the result of differences in the audio file decoder, so I am not" ; \
-	      echo "failing the test, but I recommend that you check the results." )
-    fi
+    csvcompare $tmpfile2 $expected || \
+	faildiff "Output mismatch for transform $transform for format $extension with audio file $infile" $tmpfile2 $expected
 done
 
 # Check the normalise flag
--- a/tests/test-multiple-audio/expected/all-files.csv	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-multiple-audio/expected/all-files.csv	Tue Nov 29 17:14:21 2016 +0000
@@ -1,36 +1,36 @@
-"./../audio/20sec-silence.wav",0.000000000,20.015600907,mean,2.89986e-5,"(mean value, continuous-time average)"
-,0.000000000,20.015600907,median,3.05174e-5,"(median value, continuous-time average)"
-,0.000000000,20.015600907,mode,3.05174e-5,"(modal value, continuous-time average)"
-,0.000000000,20.015600907,mean,3.96499e-5,"(mean value, continuous-time average)"
-"./../audio/3clicks.mp3",0.000000000,4.992290250,mean,0.00028653,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,1.64364e-5,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,1.39156e-5,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.000923752,"(mean value, continuous-time average)"
-"./../audio/3clicks.ogg",0.000000000,4.992290250,mean,0.00030312,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,2.42053e-5,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,1.98849e-5,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.00108189,"(mean value, continuous-time average)"
-"./../audio/3clicks8.wav",0.000000000,4.992290250,mean,0.00369413,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,0.00353596,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,0.00333629,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.00419638,"(mean value, continuous-time average)"
-"./../audio/3clicks8quiet.wav",0.000000000,4.992290250,mean,0.00548326,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,0.00548263,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,0.00515389,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.00563474,"(mean value, continuous-time average)"
-"./../audio/6clicks.ogg",0.000000000,9.961360545,mean,0.00396273,"(mean value, continuous-time average)"
-,0.000000000,9.961360545,median,0.00372425,"(median value, continuous-time average)"
-,0.000000000,9.961360545,mode,0.00358366,"(modal value, continuous-time average)"
-,0.000000000,9.961360545,mean,0.00468354,"(mean value, continuous-time average)"
-"./../audio/6clicks8.wav",0.000000000,9.961360545,mean,0.00368836,"(mean value, continuous-time average)"
-,0.000000000,9.961360545,median,0.00353795,"(median value, continuous-time average)"
-,0.000000000,9.961360545,mode,0.00345758,"(modal value, continuous-time average)"
-,0.000000000,9.961360545,mean,0.00417255,"(mean value, continuous-time average)"
-"./../audio/id3v2-iso-8859-1.mp3",0.000000000,4.992290250,mean,0.00028653,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,1.64364e-5,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,1.39156e-5,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.000923752,"(mean value, continuous-time average)"
-"./../audio/id3v2-ucs-2.mp3",0.000000000,4.992290250,mean,0.00028653,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,1.64364e-5,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,1.39156e-5,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.000923752,"(mean value, continuous-time average)"
+"./../audio/20sec-silence.wav",0.000000000,20.015600907,mean,2.9e-5,"(mean value, continuous-time average)"
+,0.000000000,20.015600907,median,3.05e-5,"(median value, continuous-time average)"
+,0.000000000,20.015600907,mode,3.05e-5,"(modal value, continuous-time average)"
+,0.000000000,20.015600907,mean,3.96e-5,"(mean value, continuous-time average)"
+"./../audio/3clicks.mp3",0.000000000,4.992290250,mean,0.000287,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,1.64e-5,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,1.39e-5,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.000924,"(mean value, continuous-time average)"
+"./../audio/3clicks.ogg",0.000000000,4.992290250,mean,0.000303,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,2.42e-5,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,1.99e-5,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.00108,"(mean value, continuous-time average)"
+"./../audio/3clicks8.wav",0.000000000,4.992290250,mean,0.00369,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,0.00354,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,0.00334,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.0042,"(mean value, continuous-time average)"
+"./../audio/3clicks8quiet.wav",0.000000000,4.992290250,mean,0.00548,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,0.00548,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,0.00515,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.00563,"(mean value, continuous-time average)"
+"./../audio/6clicks.ogg",0.000000000,9.961360545,mean,0.00396,"(mean value, continuous-time average)"
+,0.000000000,9.961360545,median,0.00372,"(median value, continuous-time average)"
+,0.000000000,9.961360545,mode,0.00358,"(modal value, continuous-time average)"
+,0.000000000,9.961360545,mean,0.00468,"(mean value, continuous-time average)"
+"./../audio/6clicks8.wav",0.000000000,9.961360545,mean,0.00369,"(mean value, continuous-time average)"
+,0.000000000,9.961360545,median,0.00354,"(median value, continuous-time average)"
+,0.000000000,9.961360545,mode,0.00346,"(modal value, continuous-time average)"
+,0.000000000,9.961360545,mean,0.00417,"(mean value, continuous-time average)"
+"./../audio/id3v2-iso-8859-1.mp3",0.000000000,4.992290250,mean,0.000287,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,1.64e-5,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,1.39e-5,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.000924,"(mean value, continuous-time average)"
+"./../audio/id3v2-ucs-2.mp3",0.000000000,4.992290250,mean,0.000287,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,1.64e-5,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,1.39e-5,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.000924,"(mean value, continuous-time average)"
--- a/tests/test-multiple-audio/expected/multiplexed.csv	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-multiple-audio/expected/multiplexed.csv	Tue Nov 29 17:14:21 2016 +0000
@@ -1,4 +1,4 @@
-"3clicks.mp3",0.000000000,9.961360545,mean,0.00202865,"(mean value, continuous-time average)"
-,0.000000000,9.961360545,median,0.00186213,"(median value, continuous-time average)"
-,0.000000000,9.961360545,mode,0.00179183,"(modal value, continuous-time average)"
-,0.000000000,9.961360545,mean,0.00250658,"(mean value, continuous-time average)"
+"3clicks.mp3",0.000000000,9.961360545,mean,0.00203,"(mean value, continuous-time average)"
+,0.000000000,9.961360545,median,0.00186,"(median value, continuous-time average)"
+,0.000000000,9.961360545,mode,0.00179,"(modal value, continuous-time average)"
+,0.000000000,9.961360545,mean,0.00251,"(mean value, continuous-time average)"
--- a/tests/test-multiple-audio/expected/playlist.csv	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-multiple-audio/expected/playlist.csv	Tue Nov 29 17:14:21 2016 +0000
@@ -1,8 +1,8 @@
-"3clicks.mp3",0.000000000,4.992290250,mean,0.00028653,"(mean value, continuous-time average)"
-,0.000000000,4.992290250,median,1.64364e-5,"(median value, continuous-time average)"
-,0.000000000,4.992290250,mode,1.39156e-5,"(modal value, continuous-time average)"
-,0.000000000,4.992290250,mean,0.000923752,"(mean value, continuous-time average)"
-"6clicks.ogg",0.000000000,9.961360545,mean,0.00396273,"(mean value, continuous-time average)"
-,0.000000000,9.961360545,median,0.00372425,"(median value, continuous-time average)"
-,0.000000000,9.961360545,mode,0.00358366,"(modal value, continuous-time average)"
-,0.000000000,9.961360545,mean,0.00468354,"(mean value, continuous-time average)"
+"3clicks.mp3",0.000000000,4.992290250,mean,0.000287,"(mean value, continuous-time average)"
+,0.000000000,4.992290250,median,1.64e-5,"(median value, continuous-time average)"
+,0.000000000,4.992290250,mode,1.39e-5,"(modal value, continuous-time average)"
+,0.000000000,4.992290250,mean,0.000924,"(mean value, continuous-time average)"
+"6clicks.ogg",0.000000000,9.961360545,mean,0.00396,"(mean value, continuous-time average)"
+,0.000000000,9.961360545,median,0.00372,"(median value, continuous-time average)"
+,0.000000000,9.961360545,mode,0.00358,"(modal value, continuous-time average)"
+,0.000000000,9.961360545,mean,0.00468,"(mean value, continuous-time average)"
--- a/tests/test-multiple-audio/test-multiple-audio.sh	Tue Nov 29 16:51:23 2016 +0000
+++ b/tests/test-multiple-audio/test-multiple-audio.sh	Tue Nov 29 17:14:21 2016 +0000
@@ -24,7 +24,7 @@
 # would have to regenerate it if we added more test audio files. Note
 # that the -r flag is not supposed to pick up playlist files, only
 # audio files
-$r -t $transform -w csv --csv-stdout -r --summary-only $audiopath > $tmpfile1 2>/dev/null || \
+$r -t $transform -w csv --csv-digits 3 --csv-stdout -r --summary-only $audiopath > $tmpfile1 2>/dev/null || \
     fail "Fails to run transform $transform with recursive dir option"
 
 expected=$mypath/expected/all-files
@@ -37,7 +37,7 @@
 # Here we strip any leading path from the audio file in the output,
 # because the playlist reader will have resolved files to absolute
 # paths and those will differ between systems
-$r -t $transform -w csv --csv-stdout $audiopath/playlist.m3u --summary-only 2>/dev/null > "$tmpfile2" || \
+$r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/playlist.m3u --summary-only 2>/dev/null > "$tmpfile2" || \
     fail "Fails to run transform $transform with playlist input"
 
 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -51,7 +51,7 @@
 
 # Strip paths again, just so we can use the same output comparison
 # file as above
-$r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
+$r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
     fail "Fails to run transform $transform with 2-file input"
 
 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -63,7 +63,7 @@
 
 # 4. Multiple files supplied directly on command line, with file: URL
 
-$r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 file://`pwd`/$audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
+$r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 file://`pwd`/$audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
     fail "Fails to run transform $transform with 2-file input"
 
 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -77,7 +77,7 @@
 
     # 5. Remote playlist file referring to remote audio files
 
-    $r -t $transform -w csv --csv-stdout $urlbase/playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \
+    $r -t $transform -w csv --csv-digits 3 --csv-stdout $urlbase/playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \
 	fail "Fails to run transform $transform with remote playlist input"
 
     cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -89,7 +89,7 @@
 
     # 6. Local playlist file referring to mixture of remote and local audio files
 
-    $r -t $transform -w csv --csv-stdout $audiopath/remote-playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \
+    $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/remote-playlist.m3u --summary-only 2>/dev/null > $tmpfile2 || \
 	fail "Fails to run transform $transform with playlist of remote files"
 
     cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -101,7 +101,7 @@
 
     # 7. Multiple remote files supplied directly on command line
 
-    $r -t $transform -w csv --csv-stdout $urlbase/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
+    $r -t $transform -w csv --csv-digits 3 --csv-stdout $urlbase/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
 	fail "Fails to run transform $transform with 2-file remote input"
 
     cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -113,7 +113,7 @@
 
     # 8. Mixture of remote and local files supplied on command line
 
-    $r -t $transform -w csv --csv-stdout $audiopath/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
+    $r -t $transform -w csv --csv-digits 3 --csv-stdout $audiopath/3clicks.mp3 $urlbase/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
 	fail "Fails to run transform $transform with 2-file remote input"
 
     cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"
@@ -126,7 +126,7 @@
 
 # 9. As 3, but multiplexing rather than extracting separately from each file
 
-$r -t $transform --multiplex -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
+$r -t $transform --multiplex --csv-digits 3 -w csv --csv-stdout $audiopath/3clicks.mp3 $audiopath/6clicks.ogg --summary-only 2>/dev/null > $tmpfile2 || \
     fail "Fails to run transform $transform with 2-file input"
 
 cat "$tmpfile2" | sed 's,^"[^"]*/,",' > "$tmpfile1"