Mercurial > hg > audiodb
annotate tests/0009/run-test.sh @ 67:e13b4f62b4f5
Improve the test driver a little bit: display a short description file
if present, and exit with an error status if any test fails. (Also
slightly nicer formatting of incremental progress.)
author | mas01cr |
---|---|
date | Wed, 26 Sep 2007 14:18:07 +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 |