annotate tests/0010/run-test.sh @ 498:342822c2d49a

Merge api-inversion branch (-r656:771, but I don't expect to return to that branch) into the trunk. I expect there to be minor performance regressions (e.g. in the SOAP server index cacheing, which I have forcibly removed) and minor unplugged memory leaks (e.g. in audioDB::query(), where I don't free up the datum). I hope that these leaks and performance regressions can be plugged in short order. I also expect that some (but maybe not all) of the issues currently addressed in the memory-leaks branch are superseded or fixed by this merge. There remains much work to be done; go forth and do it.
author mas01cr
date Sat, 10 Jan 2009 16:47:57 +0000
parents fe4dc39b2dd7
children
rev   line source
mas01cr@252 1 #! /bin/bash
mas01cr@69 2
mas01cr@69 3 . ../test-utils.sh
mas01cr@69 4
mas01cr@69 5 if [ -f testdb ]; then rm -f testdb; fi
mas01cr@69 6
mas01cr@69 7 ${AUDIODB} -d testdb -N
mas01cr@69 8
mas01cr@69 9 intstring 2 > testfeature01
mas01cr@69 10 floatstring 0 1 >> testfeature01
mas01cr@69 11 intstring 2 > testfeature10
mas01cr@69 12 floatstring 1 0 >> testfeature10
mas01cr@69 13
mas01cr@69 14 ${AUDIODB} -d testdb -I -f testfeature01
mas01cr@69 15 ${AUDIODB} -d testdb -I -f testfeature10
mas01cr@69 16
mas01cr@69 17 # sequence queries require L2NORM
mas01cr@69 18 ${AUDIODB} -d testdb -L
mas01cr@69 19
mas01cr@69 20 echo "query point (0.0,0.5)"
mas01cr@69 21 intstring 2 > testquery
mas01cr@69 22 floatstring 0 0.5 >> testquery
mas01cr@69 23
mas01cr@498 24 # because we have a tie, we treat both possible answers as correct.
mas01cr@498 25 # This is the only way to preserve my sanity right now. -- CSR,
mas01cr@498 26 # 2008-12-15.
mas01cr@498 27
mas01cr@69 28 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
mas01cr@498 29 echo testfeature01 1 > test-expected-output1
mas01cr@498 30 echo testfeature10 1 >> test-expected-output1
mas01cr@498 31 echo testfeature10 1 > test-expected-output2
mas01cr@498 32 echo testfeature01 1 >> test-expected-output2
mas01cr@498 33 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
mas01cr@69 34 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
mas01cr@498 35 echo testfeature01 1 > test-expected-output1
mas01cr@498 36 echo testfeature10 1 > test-expected-output2
mas01cr@498 37 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
mas01cr@69 38
mas01cr@69 39 echo "query point (0.5,0.0)"
mas01cr@69 40 intstring 2 > testquery
mas01cr@69 41 floatstring 0.5 0 >> testquery
mas01cr@69 42
mas01cr@69 43 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
mas01cr@498 44 echo testfeature01 1 > test-expected-output1
mas01cr@498 45 echo testfeature10 1 >> test-expected-output1
mas01cr@498 46 echo testfeature10 1 > test-expected-output2
mas01cr@498 47 echo testfeature01 1 >> test-expected-output2
mas01cr@498 48 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
mas01cr@69 49 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
mas01cr@498 50 echo testfeature01 1 > test-expected-output1
mas01cr@498 51 echo testfeature10 1 > test-expected-output2
mas01cr@498 52 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
mas01cr@69 53
mas01cr@69 54 exit 104