Chris@155: #!/bin/bash Chris@155: Chris@155: . ../include.sh Chris@155: Chris@155: infile=$audiopath/20sec-silence.wav Chris@155: tmplab=$mypath/tmp_1_$$.lab Chris@155: Chris@155: trap "rm -f $tmplab" 0 Chris@155: Chris@206: for output in notes-regions curve-vsr grid-oss; do Chris@155: Chris@155: flag="" Chris@155: Chris@155: $r -d "$testplug:$output" -w lab --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \ Chris@155: fail "Failed to run for plugin $testplug with output $output and no additional flags" Chris@155: Chris@155: csvcompare "$tmplab" "$mypath/expected/$output-no-flags.lab" || \ Chris@155: faildiff "Output differs from expected for output $output and no additional flags" "$tmplab" "$mypath/expected/$output-no-flags.lab" Chris@155: Chris@155: flag=fill-ends Chris@155: Chris@155: $r -d "$testplug:$output" -w lab --lab-$flag --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \ Chris@155: fail "Failed to run for plugin $testplug with output $output and $flag flag" Chris@155: Chris@155: csvcompare "$tmplab" "$mypath/expected/$output-$flag.lab" || \ Chris@155: faildiff "Output differs from expected for output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab" Chris@155: done Chris@155: Chris@159: # Do it all over again, but using the CSV writer. The Lab writer is Chris@159: # actually redundant, it's equivalent to -w csv --csv-separator '\t' Chris@159: # --csv-end-times --csv-omit-filename Chris@159: Chris@206: for output in notes-regions curve-vsr grid-oss; do Chris@159: Chris@159: flag="" Chris@159: Chris@159: $r -d "$testplug:$output" -w csv --csv-separator '\t' --csv-end-times --csv-omit-filename --csv-stdout "$infile" 2>/dev/null > "$tmplab" || \ Chris@159: fail "Failed to run for plugin $testplug and CSV writer with output $output and no additional flags" Chris@159: Chris@159: csvcompare "$tmplab" "$mypath/expected/$output-no-flags.lab" || \ Chris@159: faildiff "Output differs from expected for CSV writer with output $output and no additional flags" "$tmplab" "$mypath/expected/$output-no-flags.lab" Chris@159: Chris@159: flag=fill-ends Chris@159: Chris@159: $r -d "$testplug:$output" -w csv --csv-separator '\t' --csv-end-times --csv-omit-filename --csv-$flag --csv-stdout "$infile" 2>/dev/null > "$tmplab" || \ Chris@159: fail "Failed to run for plugin $testplug and CSV writer with output $output and $flag flag" Chris@159: Chris@159: csvcompare "$tmplab" "$mypath/expected/$output-$flag.lab" || \ Chris@159: faildiff "Output differs from expected for CSV writer with output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab" Chris@159: done Chris@159: Chris@206: for output in grid-oss; do Chris@206: for digits in 0 6 2; do Chris@206: Chris@206: $r -d "$testplug:$output" -w lab --lab-stdout --lab-digits "$digits" "$infile" 2>/dev/null > "$tmplab" || \ Chris@206: fail "Failed to run for plugin $testplug with output $output and digits $digits" Chris@206: Chris@207: # no fuzz here Chris@207: cmp -s "$tmplab" "$mypath/expected/$output-$digits.lab" || \ Chris@206: faildiff "Output differs from expected for CSV writer with output $output and digits $digits" "$tmplab" "$mypath/expected/$output-$digits.lab" Chris@206: Chris@206: done Chris@206: done Chris@206: Chris@155: exit 0 Chris@155: