annotate tests/test-helpfulflags.sh @ 85:dcd7abe066d5 with-dependencies

Win32 build fixes
author Chris Cannam <chris.cannam@eecs.qmul.ac.uk>
date Thu, 09 May 2013 13:32:35 +0100
parents 2633976fbef5
children 0fe5abb56a6e
rev   line source
Chris@0 1 #!/bin/bash
Chris@0 2
Chris@0 3 mypath=`dirname $0`
Chris@42 4 r=$mypath/../sonic-annotator
Chris@0 5
Chris@0 6 testplug=vamp:vamp-example-plugins:percussiononsets
Chris@75 7 testplug2=vamp:vamp-test-plugin:vamp-test-plugin
Chris@0 8
Chris@0 9 fail() {
Chris@0 10 echo "Test failed: $1"
Chris@0 11 exit 1
Chris@0 12 }
Chris@0 13
Chris@0 14 $r >/dev/null 2>&1 && \
Chris@0 15 fail "Return code 0 when run without args (should be a failure code)"
Chris@0 16
Chris@0 17 $r 2>&1 >/dev/null | grep -q "for help" || \
Chris@0 18 fail "Improper response when run without args"
Chris@0 19
Chris@0 20 $r --help 2>&1 | grep -q Copy || \
Chris@0 21 fail "Expected help not printed when run with --help"
Chris@0 22
Chris@0 23 $r --list >/dev/null 2>&1 || \
Chris@0 24 fail "Fails to run with --list"
Chris@0 25
Chris@0 26 $r --list 2>/dev/null | grep -q $testplug || \
Chris@0 27 fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
Chris@0 28
Chris@75 29 $r --list 2>/dev/null | grep -q $testplug2 || \
Chris@75 30 fail "Fails to print $testplug2 in plugin list (if you haven't got it, install it -- it's needed for other tests)"
Chris@75 31
Chris@0 32 $r --skeleton $testplug >/dev/null || \
Chris@0 33 fail "Fails to run with --skeleton $testplug"
Chris@0 34
Chris@0 35 $r -s $testplug >/dev/null || \
Chris@0 36 fail "Fails to run with -s $testplug"
Chris@0 37
Chris@0 38 $r --skeleton $testplug >/dev/null || \
Chris@0 39 fail "Fails to run with --skeleton $testplug"
Chris@0 40
Chris@0 41 $r --skeleton $testplug | rapper -i turtle - test >/dev/null 2>&1 || \
Chris@0 42 fail "Invalid XML skeleton produced with --skeleton $testplug"
Chris@0 43
Chris@0 44 exit 0