annotate tests/test-lab-writer/test-lab-writer.sh @ 155:6dc824c3f5e1 labfile

Add lab writer tests (currently failing)
author Chris Cannam
date Tue, 14 Oct 2014 18:39:16 +0100 (2014-10-14)
parents
children 237ccacbb85e
rev   line source
Chris@155 1 #!/bin/bash
Chris@155 2
Chris@155 3 . ../include.sh
Chris@155 4
Chris@155 5 infile=$audiopath/20sec-silence.wav
Chris@155 6 tmplab=$mypath/tmp_1_$$.lab
Chris@155 7
Chris@155 8 trap "rm -f $tmplab" 0
Chris@155 9
Chris@155 10 for output in notes-regions curve-vsr; do
Chris@155 11
Chris@155 12 flag=""
Chris@155 13
Chris@155 14 $r -d "$testplug:$output" -w lab --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \
Chris@155 15 fail "Failed to run for plugin $testplug with output $output and no additional flags"
Chris@155 16
Chris@155 17 csvcompare "$tmplab" "$mypath/expected/$output-no-flags.lab" || \
Chris@155 18 faildiff "Output differs from expected for output $output and no additional flags" "$tmplab" "$mypath/expected/$output-no-flags.lab"
Chris@155 19
Chris@155 20 flag=fill-ends
Chris@155 21
Chris@155 22 $r -d "$testplug:$output" -w lab --lab-$flag --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \
Chris@155 23 fail "Failed to run for plugin $testplug with output $output and $flag flag"
Chris@155 24
Chris@155 25 csvcompare "$tmplab" "$mypath/expected/$output-$flag.lab" || \
Chris@155 26 faildiff "Output differs from expected for output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab"
Chris@155 27 done
Chris@155 28
Chris@155 29 exit 0
Chris@155 30