annotate tests/0004/run-test.sh @ 497:9d8aee621afb api-inversion

More libtests fixups. Include audiodb_close() calls everywhere (whoops). Add the facility to run tests under valgrind. Unfortunately the error-exitcode flag doesn't actually cause an error exit if the only thing wrong is memory leaks, but it will if there are actual memory errors, which is a start.
author mas01cr
date Sat, 10 Jan 2009 16:07:43 +0000
parents fe4dc39b2dd7
children
rev   line source
mas01cr@252 1 #! /bin/bash
mas01cr@45 2
mas01cr@48 3 . ../test-utils.sh
mas01cr@45 4
mas01cr@45 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@45 6
mas01cr@45 7 ${AUDIODB} -d testdb -N
mas01cr@45 8
mas01cr@239 9 ${AUDIODB} -d testdb -L
mas01cr@239 10
mas01cr@48 11 intstring 2 > testfeature
mas01cr@48 12 floatstring 0 1 >> testfeature
mas01cr@48 13 floatstring 1 0 >> testfeature
mas01cr@45 14
mas01cr@45 15 ${AUDIODB} -d testdb -I -f testfeature
mas01cr@45 16
mas01cr@45 17 echo "query point (0.0,0.5)"
mas01cr@48 18 intstring 2 > testquery
mas01cr@48 19 floatstring 0 0.5 >> testquery
mas01cr@45 20
mas01cr@45 21 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
mas01cr@63 22 echo testfeature 0.5 0 0 > test-expected-output
mas01cr@63 23 echo testfeature 0 0 1 >> test-expected-output
mas01cr@63 24 cmp testoutput test-expected-output
mas01cr@45 25 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
mas01cr@63 26 echo testfeature 0.5 0 0 > test-expected-output
mas01cr@63 27 cmp testoutput test-expected-output
mas01cr@45 28
mas01cr@45 29 echo "query point (0.5,0.0)"
mas01cr@48 30 intstring 2 > testquery
mas01cr@48 31 floatstring 0.5 0 >> testquery
mas01cr@45 32
mas01cr@45 33 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
mas01cr@63 34 echo testfeature 0.5 0 1 > test-expected-output
mas01cr@63 35 echo testfeature 0 0 0 >> test-expected-output
mas01cr@63 36 cmp testoutput test-expected-output
mas01cr@45 37 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
mas01cr@63 38 echo testfeature 0.5 0 1 > test-expected-output
mas01cr@63 39 cmp testoutput test-expected-output
mas01cr@45 40
mas01cr@45 41 exit 104