Chris@235: #!/bin/bash Chris@235: Chris@235: . ../include.sh Chris@235: Chris@235: infile=$audiopath/3clicks8.wav Chris@235: tmpfile=$mypath/tmp_1_$$ Chris@235: tmpfile2=$mypath/tmp_2_$$ Chris@235: Chris@235: trap "rm -f $tmpfile $tmpfile2" 0 Chris@235: Chris@236: for output in curve-vsr grid-fsr; do Chris@235: Chris@235: for summary in min max mean median mode sum variance sd count; do Chris@235: Chris@236: # grid-fsr is bulkier, and we're only really concerned that Chris@236: # we're getting a sane result per bin, so just do min and max Chris@236: # there Chris@236: if [ "$output" = "grid-fsr" ]; then Chris@236: case "$summary" in Chris@236: mean|median|mode|sum|variance|sd|count) continue;; Chris@236: esac Chris@236: fi Chris@236: Chris@235: id="$testplug:$output" Chris@235: expected="$mypath/expected/testplug-$output-$summary.csv" Chris@235: Chris@235: cat "$expected" | grep -v '^#' > "$tmpfile2" Chris@235: Chris@235: $r -d $id -w csv --csv-stdout -S $summary --summary-only --csv-omit-filename $infile > $tmpfile 2>/dev/null || \ Chris@235: fail "Fails to run transform id $id with summary type $summary" Chris@235: Chris@235: csvcompare "$tmpfile" "$tmpfile2" || Chris@235: faildiff "Output mismatch for output $output with summary type $summary" "$tmpfile" "$tmpfile2" Chris@235: Chris@235: done Chris@235: done