annotate tests/0004/run-test.sh @ 48:a7aad4c50cb9

Factor out some common utilities and setup code into test-utils.sh, and source that file within each run-test file.
author mas01cr
date Tue, 18 Sep 2007 09:24:52 +0000
parents 538064755914
children cee75159c0bc
rev   line source
mas01cr@45 1 #! /bin/sh
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@48 9 intstring 2 > testfeature
mas01cr@48 10 floatstring 0 1 >> testfeature
mas01cr@48 11 floatstring 1 0 >> testfeature
mas01cr@45 12
mas01cr@45 13 ${AUDIODB} -d testdb -I -f testfeature
mas01cr@45 14
mas01cr@45 15 echo "query point (0.0,0.5)"
mas01cr@48 16 intstring 2 > testquery
mas01cr@48 17 floatstring 0 0.5 >> testquery
mas01cr@45 18
mas01cr@45 19 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
mas01cr@45 20 wc -l testoutput | grep 2
mas01cr@45 21 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
mas01cr@45 22 wc -l testoutput | grep 1
mas01cr@45 23
mas01cr@45 24 echo "query point (0.5,0.0)"
mas01cr@48 25 intstring 2 > testquery
mas01cr@48 26 floatstring 0.5 0 >> testquery
mas01cr@45 27
mas01cr@45 28 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
mas01cr@45 29 wc -l testoutput | grep 2
mas01cr@45 30 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
mas01cr@45 31 wc -l testoutput | grep 1
mas01cr@45 32
mas01cr@45 33 exit 104