annotate tests/0032/run-test.sh @ 199:72a037f2b1e4

Alter timesTable handling. Instead of inserting N boundary points per track, insert N (start,end) pairs. Since N boundaries define only N-1 intervals, we were losing information on insert -- this means that dump/restore cycles of existing times-enabled databases WILL NOT WORK. The input format for times files is still the same, albeit a little tighter: there must be exactly N+1 floats in the file. - make times table default length twice as big (done!) - ensure exactly n+1 times read in from timesFile (done!) - store (beginning, end) in times table (done!) - update file format version (done!) - ensure dump exactly n+1 times (done!) - adjust uses of timesTable to read at 2k and 2k+1 (done!) - timesdata[x] in sequence query is duration of sequence of appropriate length from point [x] (done!) - dbdurs calculation (done!) - don't decrement j when using times in sequence query (done!) - tests! (NOT DONE)
author mas01cr
date Fri, 23 Nov 2007 15:43:51 +0000
parents 8c81cacf5aab
children 3c7c8b84e4f3 2cc06e5b05a5
rev   line source
mas01cr@196 1 #! /bin/sh
mas01cr@196 2
mas01cr@196 3 . ../test-utils.sh
mas01cr@196 4
mas01cr@196 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@196 6
mas01cr@196 7 ${AUDIODB} -d testdb -N
mas01cr@196 8
mas01cr@196 9 intstring 2 > testfeature01
mas01cr@196 10 floatstring 0 1 >> testfeature01
mas01cr@196 11 intstring 2 > testfeature10
mas01cr@196 12 floatstring 1 0 >> testfeature10
mas01cr@196 13
mas01cr@196 14 ${AUDIODB} -d testdb -I -f testfeature01
mas01cr@196 15 ${AUDIODB} -d testdb -I -f testfeature10
mas01cr@196 16
mas01cr@196 17 echo "query point (0.0,0.5)"
mas01cr@196 18 intstring 2 > testquery
mas01cr@196 19 floatstring 0 0.5 >> testquery
mas01cr@196 20
mas01cr@196 21 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput
mas01cr@196 22 echo testfeature01 0.5 0 0 > test-expected-output
mas01cr@196 23 echo testfeature10 0 0 0 >> test-expected-output
mas01cr@196 24 cmp testoutput test-expected-output
mas01cr@196 25 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K /dev/null > testoutput
mas01cr@196 26 cat /dev/null > test-expected-output
mas01cr@196 27 cmp testoutput test-expected-output
mas01cr@196 28
mas01cr@196 29 echo testfeature01 > testkl.txt
mas01cr@196 30 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
mas01cr@196 31 echo testfeature01 0.5 0 0 > test-expected-output
mas01cr@196 32 cmp testoutput test-expected-output
mas01cr@196 33
mas01cr@196 34 echo testfeature10 > testkl.txt
mas01cr@196 35 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
mas01cr@196 36 echo testfeature10 0 0 0 > test-expected-output
mas01cr@196 37 cmp testoutput test-expected-output
mas01cr@196 38
mas01cr@196 39 echo testfeature10 > testkl.txt
mas01cr@196 40 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt -r 1 > testoutput
mas01cr@196 41 echo testfeature10 0 0 0 > test-expected-output
mas01cr@196 42 cmp testoutput test-expected-output
mas01cr@196 43
mas01cr@196 44 echo "query point (0.5,0.0)"
mas01cr@196 45 intstring 2 > testquery
mas01cr@196 46 floatstring 0.5 0 >> testquery
mas01cr@196 47
mas01cr@196 48 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput
mas01cr@196 49 echo testfeature10 0.5 0 0 > test-expected-output
mas01cr@196 50 echo testfeature01 0 0 0 >> test-expected-output
mas01cr@196 51 cmp testoutput test-expected-output
mas01cr@196 52 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K /dev/null > testoutput
mas01cr@196 53 cat /dev/null > test-expected-output
mas01cr@196 54 cmp testoutput test-expected-output
mas01cr@196 55
mas01cr@196 56 echo testfeature10 > testkl.txt
mas01cr@196 57 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
mas01cr@196 58 echo testfeature10 0.5 0 0 > test-expected-output
mas01cr@196 59 cmp testoutput test-expected-output
mas01cr@196 60
mas01cr@196 61 echo testfeature01 > testkl.txt
mas01cr@196 62 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
mas01cr@196 63 echo testfeature01 0 0 0 > test-expected-output
mas01cr@196 64 cmp testoutput test-expected-output
mas01cr@196 65
mas01cr@196 66 echo testfeature01 > testkl.txt
mas01cr@196 67 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt -r 1 > testoutput
mas01cr@196 68 echo testfeature01 0 0 0 > test-expected-output
mas01cr@196 69 cmp testoutput test-expected-output
mas01cr@196 70
mas01cr@196 71 exit 104