annotate tests/0023/run-test.sh @ 277:abfb26e08d9c audiodb-debian

Merge trunk changes -r326:386 into audiodb-debian branch. Plus new debian/changelog version. (Should have used an epoch really, but couldn't be bothered; TODO: work out a sane version numbering policy).
author mas01cr
date Tue, 01 Jul 2008 09:12:40 +0000
parents b9f1c375f28a
children
rev   line source
mas01cr@277 1 #! /bin/bash
mas01cr@126 2
mas01cr@126 3 . ../test-utils.sh
mas01cr@126 4
mas01cr@126 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@126 6
mas01cr@126 7 ${AUDIODB} -d testdb -N
mas01cr@126 8
mas01cr@126 9 intstring 2 > testfeature01
mas01cr@126 10 floatstring 0 1 >> testfeature01
mas01cr@126 11 intstring 2 > testfeature10
mas01cr@126 12 floatstring 1 0 >> testfeature10
mas01cr@126 13
mas01cr@126 14 cat > testfeaturefiles <<EOF
mas01cr@126 15 testfeature01
mas01cr@126 16 testfeature10
mas01cr@126 17 EOF
mas01cr@126 18
mas01cr@126 19 ${AUDIODB} -d testdb -B -F testfeaturefiles
mas01cr@126 20
mas01cr@126 21 # sequence queries require L2NORM
mas01cr@126 22 ${AUDIODB} -d testdb -L
mas01cr@126 23
mas01cr@126 24 echo "query point (0.0,0.5)"
mas01cr@126 25 intstring 2 > testquery
mas01cr@126 26 floatstring 0 0.5 >> testquery
mas01cr@126 27 floatstring 0.5 0 >> testquery
mas01cr@126 28
mas01cr@126 29 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 0 > testoutput
mas01cr@126 30 echo testfeature01 0 0 0 > test-expected-output
mas01cr@126 31 echo testfeature10 2 0 0 >> test-expected-output
mas01cr@126 32 cmp testoutput test-expected-output
mas01cr@126 33 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 0 > testoutput
mas01cr@126 34 echo testfeature01 0 0 0 > test-expected-output
mas01cr@126 35 cmp testoutput test-expected-output
mas01cr@126 36
mas01cr@126 37 echo "query point (0.5,0.0)"
mas01cr@126 38
mas01cr@126 39 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 1 > testoutput
mas01cr@126 40 echo testfeature10 0 1 0 > test-expected-output
mas01cr@126 41 echo testfeature01 2 1 0 >> test-expected-output
mas01cr@126 42 cmp testoutput test-expected-output
mas01cr@126 43 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 1 > testoutput
mas01cr@126 44 echo testfeature10 0 1 0 > test-expected-output
mas01cr@126 45 cmp testoutput test-expected-output
mas01cr@126 46
mas01cr@126 47 exit 104