annotate tests/0021/run-test.sh @ 171:bb934f91d85c powertable

Web services interface to the powertable functionality. * Implemented as a completely new SOAP method, called sequenceQuery * lightly tested with http://doc.gold.ac.uk/~mas01cr/poweradb.php (lacuna: need to pass relative-threshold and absolute-threshold always, even when they don't make sense.) Several uglinesses in the code, some of which will be resolved once all the various branches are merged into the trunk.
author mas01cr
date Wed, 14 Nov 2007 14:00:53 +0000
parents 74fb7524999c
children fe4dc39b2dd7
rev   line source
mas01cr@109 1 #! /bin/sh
mas01cr@109 2
mas01cr@109 3 . ../test-utils.sh
mas01cr@109 4
mas01cr@109 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@109 6
mas01cr@109 7 ${AUDIODB} -d testdb -N
mas01cr@109 8
mas01cr@109 9 intstring 2 > testfeature
mas01cr@109 10 floatstring 0 0.5 >> testfeature
mas01cr@109 11 floatstring 0.5 0 >> testfeature
mas01cr@109 12
mas01cr@109 13 ${AUDIODB} -d testdb -I -f testfeature
mas01cr@109 14
mas01cr@109 15 # sequence queries require L2NORM
mas01cr@109 16 ${AUDIODB} -d testdb -L
mas01cr@109 17
mas01cr@109 18 start_server ${AUDIODB} 10021
mas01cr@109 19
mas01cr@109 20 echo "query point (0.0,0.5)"
mas01cr@109 21 intstring 2 > testquery
mas01cr@109 22 floatstring 0 0.5 >> testquery
mas01cr@109 23
mas01cr@109 24 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput
mas01cr@109 25 echo testfeature 1 0 0 > test-expected-output
mas01cr@109 26 cmp testoutput test-expected-output
mas01cr@109 27 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput
mas01cr@109 28 echo testfeature 0 0 0 > test-expected-output
mas01cr@109 29 cmp testoutput test-expected-output
mas01cr@109 30
mas01cr@109 31 check_server $!
mas01cr@109 32
mas01cr@109 33 echo "query point (0.5,0.0)"
mas01cr@109 34 intstring 2 > testquery
mas01cr@109 35 floatstring 0.5 0 >> testquery
mas01cr@109 36
mas01cr@109 37 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput
mas01cr@109 38 echo testfeature 1 0 1 > test-expected-output
mas01cr@109 39 cmp testoutput test-expected-output
mas01cr@109 40 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput
mas01cr@109 41 echo testfeature 0 0 1 > test-expected-output
mas01cr@109 42 cmp testoutput test-expected-output
mas01cr@109 43
mas01cr@109 44 stop_server $!
mas01cr@109 45
mas01cr@109 46 exit 104