Mercurial > hg > audiodb
annotate tests/0021/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 | ae045842d29f |
children |
rev | line source |
---|---|
mas01cr@277 | 1 #! /bin/bash |
mas01cr@112 | 2 |
mas01cr@112 | 3 . ../test-utils.sh |
mas01cr@112 | 4 |
mas01cr@112 | 5 if [ -f testdb ]; then rm -f testdb; fi |
mas01cr@112 | 6 |
mas01cr@112 | 7 ${AUDIODB} -d testdb -N |
mas01cr@112 | 8 |
mas01cr@112 | 9 intstring 2 > testfeature |
mas01cr@112 | 10 floatstring 0 0.5 >> testfeature |
mas01cr@112 | 11 floatstring 0.5 0 >> testfeature |
mas01cr@112 | 12 |
mas01cr@112 | 13 ${AUDIODB} -d testdb -I -f testfeature |
mas01cr@112 | 14 |
mas01cr@112 | 15 # sequence queries require L2NORM |
mas01cr@112 | 16 ${AUDIODB} -d testdb -L |
mas01cr@112 | 17 |
mas01cr@112 | 18 start_server ${AUDIODB} 10021 |
mas01cr@112 | 19 |
mas01cr@112 | 20 echo "query point (0.0,0.5)" |
mas01cr@112 | 21 intstring 2 > testquery |
mas01cr@112 | 22 floatstring 0 0.5 >> testquery |
mas01cr@112 | 23 |
mas01cr@112 | 24 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@112 | 25 echo testfeature 1 0 0 > test-expected-output |
mas01cr@112 | 26 cmp testoutput test-expected-output |
mas01cr@112 | 27 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@112 | 28 echo testfeature 0 0 0 > test-expected-output |
mas01cr@112 | 29 cmp testoutput test-expected-output |
mas01cr@112 | 30 |
mas01cr@112 | 31 check_server $! |
mas01cr@112 | 32 |
mas01cr@112 | 33 echo "query point (0.5,0.0)" |
mas01cr@112 | 34 intstring 2 > testquery |
mas01cr@112 | 35 floatstring 0.5 0 >> testquery |
mas01cr@112 | 36 |
mas01cr@112 | 37 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@112 | 38 echo testfeature 1 0 1 > test-expected-output |
mas01cr@112 | 39 cmp testoutput test-expected-output |
mas01cr@112 | 40 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@112 | 41 echo testfeature 0 0 1 > test-expected-output |
mas01cr@112 | 42 cmp testoutput test-expected-output |
mas01cr@112 | 43 |
mas01cr@112 | 44 stop_server $! |
mas01cr@112 | 45 |
mas01cr@112 | 46 exit 104 |