comparison tests/test-summaries/test-summaries-testplugin.sh @ 235:6a804920b4a8

Toward checking summary values
author Chris Cannam
date Tue, 01 Mar 2016 12:10:40 +0000
parents
children a0d093495a1f
comparison
equal deleted inserted replaced
234:cee5cab9c85d 235:6a804920b4a8
1 #!/bin/bash
2
3 . ../include.sh
4
5 infile=$audiopath/3clicks8.wav
6 tmpfile=$mypath/tmp_1_$$
7 tmpfile2=$mypath/tmp_2_$$
8
9 trap "rm -f $tmpfile $tmpfile2" 0
10
11 for output in curve-vsr grid-fsr notes-regions; do
12
13 for summary in min max mean median mode sum variance sd count; do
14
15 id="$testplug:$output"
16 expected="$mypath/expected/testplug-$output-$summary.csv"
17
18 cat "$expected" | grep -v '^#' > "$tmpfile2"
19
20 $r -d $id -w csv --csv-stdout -S $summary --summary-only --csv-omit-filename $infile > $tmpfile 2>/dev/null || \
21 fail "Fails to run transform id $id with summary type $summary"
22
23 csvcompare "$tmpfile" "$tmpfile2" ||
24 faildiff "Output mismatch for output $output with summary type $summary" "$tmpfile" "$tmpfile2"
25
26 done
27 done