mas01cr@252: #! /bin/bash mas01cr@193: mas01cr@193: . ../test-utils.sh mas01cr@193: mas01cr@193: if [ -f testdb ]; then rm -f testdb; fi mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -N mas01cr@193: mas01cr@193: intstring 2 > testfeature mas01cr@193: floatstring 0 1 >> testfeature mas01cr@193: floatstring 1 0 >> testfeature mas01cr@193: floatstring 1 0 >> testfeature mas01cr@193: floatstring 0 1 >> testfeature mas01cr@193: mas01cr@193: intstring 1 > testpower mas01cr@193: floatstring -0.5 >> testpower mas01cr@193: floatstring -1 >> testpower mas01cr@193: floatstring -1 >> testpower mas01cr@193: floatstring -0.5 >> testpower mas01cr@193: mas01cr@193: expect_clean_error_exit ${AUDIODB} -d testdb -I -f testfeature -w testpower mas01cr@193: ${AUDIODB} -d testdb -P mas01cr@193: expect_clean_error_exit ${AUDIODB} -d testdb -I -f testfeature mas01cr@193: ${AUDIODB} -d testdb -I -f testfeature -w testpower mas01cr@193: mas01cr@193: # sequence queries require L2NORM mas01cr@193: ${AUDIODB} -d testdb -L mas01cr@193: mas01cr@193: echo "query points (0.0,0.5),(0.0,0.5),(0.5,0.0)" mas01cr@193: intstring 2 > testquery mas01cr@193: floatstring 0 0.5 >> testquery mas01cr@193: floatstring 0 0.5 >> testquery mas01cr@193: floatstring 0.5 0 >> testquery mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -R 0.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 0 -R 0.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 1 -R 0.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -p 0 -R 1.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -p 0 -R 0.9 > testoutput mas01cr@193: cat /dev/null > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -p 1 -R 0.9 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: echo "query points (0.0,0.5)p=-0.5,(0.0,0.5)p=-1,(0.5,0.0)p=-1" mas01cr@193: mas01cr@193: intstring 1 > testquerypower mas01cr@193: floatstring -0.5 -1 -1 >> testquerypower mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-1.4 -p 0 -R 1.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-0.8 -p 0 -R 1.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-0.7 -p 0 -R 1.1 > testoutput mas01cr@193: cat /dev/null > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-1.4 -p 1 -R 0.9 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --absolute-threshold=-0.9 -p 1 -R 0.9 > testoutput mas01cr@193: cat /dev/null > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --relative-threshold=0.1 -p 0 -R 1.1 > testoutput mas01cr@193: echo testfeature 1 > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: ${AUDIODB} -d testdb -Q sequence -l 2 -f testquery -w testquerypower --relative-threshold=0.1 -p 0 -R 0.9 > testoutput mas01cr@193: cat /dev/null > test-expected-output mas01cr@193: cmp testoutput test-expected-output mas01cr@193: mas01cr@193: exit 104