comparison tests/test-transforms-basic.sh @ 118:0fe5abb56a6e test-reorg

Pull more stuff up into include file
author Chris Cannam
date Wed, 08 Oct 2014 14:20:45 +0100
parents 8b4924a9a072
children
comparison
equal deleted inserted replaced
117:5be4995f4029 118:0fe5abb56a6e
1 #!/bin/bash 1 #!/bin/bash
2 2
3 mypath=`dirname $0` 3 . test-include.sh
4 r=$mypath/../sonic-annotator
5 4
6 infile=$mypath/audio/3clicks8.wav 5 infile=$mypath/audio/3clicks8.wav
7 testplug=vamp:vamp-example-plugins:percussiononsets
8 tmpfile1=$mypath/tmp_1_$$ 6 tmpfile1=$mypath/tmp_1_$$
9 tmpfile2=$mypath/tmp_2_$$ 7 tmpfile2=$mypath/tmp_2_$$
10 8
11 trap "rm -f $tmpfile1 $tmpfile2" 0 9 trap "rm -f $tmpfile1 $tmpfile2" 0
12 10
13 . test-include.sh 11 $r --skeleton $percplug > $tmpfile1 2>/dev/null || \
14 12 fail "Fails to run with --skeleton $percplug"
15 $r --skeleton $testplug > $tmpfile1 2>/dev/null || \
16 fail "Fails to run with --skeleton $testplug"
17 13
18 $r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \ 14 $r -t $tmpfile1 -w csv --csv-stdout $infile > $tmpfile2 2>/dev/null || \
19 fail "Fails to run with -t $tmpfile -w csv --csv-stdout $infile" 15 fail "Fails to run with -t $tmpfile -w csv --csv-stdout $infile"
20 16
21 csvcompare $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv || \ 17 csvcompare $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv || \
22 fail "Output mismatch for transforms-basic-skeleton-1.csv" 18 faildiff "Output mismatch for transforms-basic-skeleton-1.csv" $tmpfile2 $mypath/expected/transforms-basic-skeleton-1.csv
23 19
24 for suffix in \ 20 for suffix in \
25 -no-parameters-default-output \ 21 -no-parameters-default-output \
26 -no-parameters \ 22 -no-parameters \
27 "" \ 23 "" \