annotate tests/test-vamp-test-plugin.sh @ 88:c82736e79739 with-dependencies

Merge from default branch
author Chris Cannam
date Thu, 09 May 2013 13:55:11 +0100
parents 2633976fbef5
children 0fe5abb56a6e
rev   line source
Chris@75 1 #!/bin/bash
Chris@75 2
Chris@75 3 mypath=`dirname $0`
Chris@75 4 r=$mypath/../sonic-annotator
Chris@75 5
Chris@75 6 infile=$mypath/audio/20sec-silence.wav
Chris@75 7 testplug=vamp:vamp-test-plugin:vamp-test-plugin
Chris@75 8 tmpcsv=$mypath/tmp_1_$$.csv
Chris@75 9
Chris@75 10 trap "rm -f $tmpcsv" 0
Chris@75 11
Chris@75 12 . test-include.sh
Chris@75 13
Chris@75 14 fail() {
Chris@75 15 echo "Test failed: $1"
Chris@75 16 exit 1
Chris@75 17 }
Chris@75 18
Chris@75 19 for output in instants curve-oss curve-fsr curve-fsr-timed curve-vsr grid-oss grid-fsr notes-regions; do
Chris@75 20
Chris@75 21 $r -d "$testplug:$output" -w csv --csv-one-file "$tmpcsv" --csv-force "$infile" 2>/dev/null || \
Chris@75 22 fail "Failed to run for plugin $testplug with output $output"
Chris@75 23
Chris@75 24 csvcompare_ignorefirst "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" || \
Chris@75 25 fail "Output differs from expected for $output"
Chris@75 26
Chris@75 27 done
Chris@75 28
Chris@75 29 exit 0
Chris@75 30