view 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
parents
children 237ccacbb85e
line wrap: on
line source
#!/bin/bash

. ../include.sh

infile=$audiopath/20sec-silence.wav
tmplab=$mypath/tmp_1_$$.lab

trap "rm -f $tmplab" 0

for output in notes-regions curve-vsr; do

    flag=""

    $r -d "$testplug:$output" -w lab --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \
	fail "Failed to run for plugin $testplug with output $output and no additional flags"

    csvcompare "$tmplab" "$mypath/expected/$output-no-flags.lab" || \
	faildiff "Output differs from expected for output $output and no additional flags" "$tmplab" "$mypath/expected/$output-no-flags.lab"

    flag=fill-ends

    $r -d "$testplug:$output" -w lab --lab-$flag --lab-stdout "$infile" 2>/dev/null > "$tmplab" || \
	fail "Failed to run for plugin $testplug with output $output and $flag flag"

    csvcompare "$tmplab" "$mypath/expected/$output-$flag.lab" || \
	faildiff "Output differs from expected for output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab"
done

exit 0