annotate tests/0020/run-test.sh @ 323:64c844de82d0 large_adb

Fixed an indexing bug where rest of track was ignored after first shingle with power below threshold. Put default O2_LSH_POINT_BITS back to 14 (16384 points), can be altered at compile time with CFLAGS+=-DO2_LSH_POINT_BITS n
author mas01mc
date Thu, 21 Aug 2008 21:02:14 +0000
parents fe4dc39b2dd7
children 57fde215d913
rev   line source
mas01cr@252 1 #! /bin/bash
mas01cr@102 2
mas01cr@102 3 . ../test-utils.sh
mas01cr@102 4
mas01cr@102 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@102 6
mas01cr@102 7 ${AUDIODB} -d testdb -N
mas01cr@102 8
mas01cr@102 9 intstring 2 > testfeature01
mas01cr@102 10 floatstring 0 1 >> testfeature01
mas01cr@102 11 intstring 2 > testfeature10
mas01cr@102 12 floatstring 1 0 >> testfeature10
mas01cr@102 13
mas01cr@102 14 ${AUDIODB} -d testdb -I -f testfeature01
mas01cr@102 15 ${AUDIODB} -d testdb -I -f testfeature10
mas01cr@102 16
mas01cr@102 17 # sequence queries require L2NORM
mas01cr@102 18 ${AUDIODB} -d testdb -L
mas01cr@102 19
mas01cr@102 20 start_server ${AUDIODB} 10020
mas01cr@102 21
mas01cr@102 22 echo "query point (0.0,0.5)"
mas01cr@102 23 intstring 2 > testquery
mas01cr@102 24 floatstring 0 0.5 >> testquery
mas01cr@102 25
mas01cr@102 26 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
mas01cr@102 27 echo testfeature01 1 > test-expected-output
mas01cr@102 28 echo testfeature10 1 >> test-expected-output
mas01cr@102 29 cmp testoutput test-expected-output
mas01cr@102 30 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
mas01cr@102 31 echo testfeature01 1 > test-expected-output
mas01cr@102 32 cmp testoutput test-expected-output
mas01cr@102 33
mas01cr@102 34 check_server $!
mas01cr@102 35
mas01cr@102 36 echo "query point (0.5,0.0)"
mas01cr@102 37 intstring 2 > testquery
mas01cr@102 38 floatstring 0.5 0 >> testquery
mas01cr@102 39
mas01cr@102 40 # FIXME: because there's only one point in each track (and the query),
mas01cr@102 41 # the ordering is essentially database order. We need these test
mas01cr@102 42 # cases anyway because we need to test non-segfaulting, non-empty
mas01cr@102 43 # results...
mas01cr@102 44
mas01cr@102 45 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
mas01cr@102 46 echo testfeature01 1 > test-expected-output
mas01cr@102 47 echo testfeature10 1 >> test-expected-output
mas01cr@102 48 cmp testoutput test-expected-output
mas01cr@102 49 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
mas01cr@102 50 echo testfeature01 1 > test-expected-output
mas01cr@102 51 cmp testoutput test-expected-output
mas01cr@102 52
mas01cr@102 53 stop_server $!
mas01cr@102 54
mas01cr@102 55 exit 104