annotate tests/0021/run-test.sh @ 489:4cb6c611f812 api-inversion

Begin removing uses of audiodb_query() audiodb_query() is actually an unsupportable interface. It requires access to the filesystem, does not (and cannot) actually support whole swathes of functionality, is only implementable using code that is no longer part of the core of audioDB (reporter.h), is in the way of fixing memory leaks in the SOAP server, and is horrible to use to boot. So, begin converting the libtests uses of audiodb_query() to audio_query_spec(). In the process, go through the test code and remove useless comments, pointless variables, and commented-out bits of shell scripts.
author mas01cr
date Sat, 10 Jan 2009 15:32:53 +0000
parents fe4dc39b2dd7
children
rev   line source
mas01cr@252 1 #! /bin/bash
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