Mercurial > hg > audiodb
annotate tests/0009/run-test.sh @ 104:97107ee61dba
Temporary signal handling.
"Temporary" because it will not work on platforms which don't have real
signals (Hello, Win32) but nevertheless useful, as otherwise gcov (the
code coverage tool) will not count executions of processes that are
killed by signals (in particular, the server processes started in the
tests).
A brief experiment suggests that we're up to about 80% statement
coverage from our 20 tests.
| author | mas01cr |
|---|---|
| date | Thu, 04 Oct 2007 15:02:29 +0000 |
| parents | 00c3326e8242 |
| children | 3c7c8b84e4f3 2cc06e5b05a5 |
| rev | line source |
|---|---|
| mas01cr@65 | 1 #! /bin/sh |
| mas01cr@65 | 2 |
| mas01cr@65 | 3 . ../test-utils.sh |
| mas01cr@65 | 4 |
| mas01cr@65 | 5 if [ -f testdb ]; then rm -f testdb; fi |
| mas01cr@65 | 6 |
| mas01cr@65 | 7 ${AUDIODB} -d testdb -N |
| mas01cr@65 | 8 |
| mas01cr@65 | 9 intstring 2 > testfeature01 |
| mas01cr@65 | 10 floatstring 0 1 >> testfeature01 |
| mas01cr@65 | 11 intstring 2 > testfeature10 |
| mas01cr@65 | 12 floatstring 1 0 >> testfeature10 |
| mas01cr@65 | 13 |
| mas01cr@65 | 14 ${AUDIODB} -d testdb -I -f testfeature01 |
| mas01cr@65 | 15 ${AUDIODB} -d testdb -I -f testfeature10 |
| mas01cr@65 | 16 |
| mas01cr@65 | 17 echo "query point (0.0,0.5)" |
| mas01cr@65 | 18 intstring 2 > testquery |
| mas01cr@65 | 19 floatstring 0 0.5 >> testquery |
| mas01cr@65 | 20 |
| mas01cr@65 | 21 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput |
| mas01cr@65 | 22 echo testfeature01 0.5 0 0 > test-expected-output |
| mas01cr@65 | 23 echo testfeature10 0 0 0 >> test-expected-output |
| mas01cr@65 | 24 cmp testoutput test-expected-output |
| mas01cr@65 | 25 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -r 1 > testoutput |
| mas01cr@65 | 26 echo testfeature01 0.5 0 0 > test-expected-output |
| mas01cr@65 | 27 cmp testoutput test-expected-output |
| mas01cr@65 | 28 |
| mas01cr@65 | 29 echo "query point (0.5,0.0)" |
| mas01cr@65 | 30 intstring 2 > testquery |
| mas01cr@65 | 31 floatstring 0.5 0 >> testquery |
| mas01cr@65 | 32 |
| mas01cr@65 | 33 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput |
| mas01cr@65 | 34 echo testfeature10 0.5 0 0 > test-expected-output |
| mas01cr@65 | 35 echo testfeature01 0 0 0 >> test-expected-output |
| mas01cr@65 | 36 cmp testoutput test-expected-output |
| mas01cr@65 | 37 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -r 1 > testoutput |
| mas01cr@65 | 38 echo testfeature10 0.5 0 0 > test-expected-output |
| mas01cr@65 | 39 cmp testoutput test-expected-output |
| mas01cr@65 | 40 |
| mas01cr@65 | 41 exit 104 |
