Mercurial > hg > sonic-annotator
diff tests/test-helpfulflags.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 | 2633976fbef5 |
children |
line wrap: on
line diff
--- a/tests/test-helpfulflags.sh Wed Oct 08 13:14:39 2014 +0100 +++ b/tests/test-helpfulflags.sh Wed Oct 08 14:20:45 2014 +0100 @@ -1,15 +1,6 @@ #!/bin/bash -mypath=`dirname $0` -r=$mypath/../sonic-annotator - -testplug=vamp:vamp-example-plugins:percussiononsets -testplug2=vamp:vamp-test-plugin:vamp-test-plugin - -fail() { - echo "Test failed: $1" - exit 1 -} +. test-include.sh $r >/dev/null 2>&1 && \ fail "Return code 0 when run without args (should be a failure code)" @@ -23,22 +14,22 @@ $r --list >/dev/null 2>&1 || \ fail "Fails to run with --list" +$r --list 2>/dev/null | grep -q $percplug || \ + fail "Fails to print $percplug in plugin list (if you haven't got it, install it -- it's needed for other tests)" + $r --list 2>/dev/null | grep -q $testplug || \ fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)" -$r --list 2>/dev/null | grep -q $testplug2 || \ - fail "Fails to print $testplug2 in plugin list (if you haven't got it, install it -- it's needed for other tests)" +$r --skeleton $percplug >/dev/null || \ + fail "Fails to run with --skeleton $percplug" -$r --skeleton $testplug >/dev/null || \ - fail "Fails to run with --skeleton $testplug" +$r -s $percplug >/dev/null || \ + fail "Fails to run with -s $percplug" -$r -s $testplug >/dev/null || \ - fail "Fails to run with -s $testplug" +$r --skeleton $percplug >/dev/null || \ + fail "Fails to run with --skeleton $percplug" -$r --skeleton $testplug >/dev/null || \ - fail "Fails to run with --skeleton $testplug" - -$r --skeleton $testplug | rapper -i turtle - test >/dev/null 2>&1 || \ - fail "Invalid XML skeleton produced with --skeleton $testplug" +$r --skeleton $percplug | rapper -i turtle - test >/dev/null 2>&1 || \ + fail "Invalid XML skeleton produced with --skeleton $percplug" exit 0