mas01cr@277: #! /bin/bash mas01cr@107: mas01cr@107: . ../test-utils.sh mas01cr@107: mas01cr@107: if [ -f testdb ]; then rm -f testdb; fi mas01cr@107: mas01cr@107: ${AUDIODB} -d testdb -N mas01cr@107: mas01cr@107: intstring 2 > testfeature01 mas01cr@107: floatstring 0 1 >> testfeature01 mas01cr@107: intstring 2 > testfeature10 mas01cr@107: floatstring 1 0 >> testfeature10 mas01cr@107: mas01cr@107: ${AUDIODB} -d testdb -I -f testfeature01 mas01cr@107: ${AUDIODB} -d testdb -I -f testfeature10 mas01cr@107: mas01cr@107: # sequence queries require L2NORM mas01cr@107: ${AUDIODB} -d testdb -L mas01cr@107: mas01cr@107: start_server ${AUDIODB} 10018 mas01cr@107: mas01cr@107: echo "query point (0.0,0.5)" mas01cr@107: intstring 2 > testquery mas01cr@107: floatstring 0 0.5 >> testquery mas01cr@107: mas01cr@107: ${AUDIODB} -c localhost:10018 -d testdb -Q sequence -l 1 -f testquery > testoutput mas01cr@107: echo testfeature01 0 0 0 > test-expected-output mas01cr@107: echo testfeature10 2 0 0 >> test-expected-output mas01cr@107: cmp testoutput test-expected-output mas01cr@107: ${AUDIODB} -c localhost:10018 -d testdb -Q sequence -l 1 -f testquery -r 1 > testoutput mas01cr@107: echo testfeature01 0 0 0 > test-expected-output mas01cr@107: cmp testoutput test-expected-output mas01cr@107: mas01cr@107: check_server $! mas01cr@107: mas01cr@107: echo "query point (0.5,0.0)" mas01cr@107: intstring 2 > testquery mas01cr@107: floatstring 0.5 0 >> testquery mas01cr@107: mas01cr@107: ${AUDIODB} -c localhost:10018 -d testdb -Q sequence -l 1 -f testquery > testoutput mas01cr@107: echo testfeature10 0 0 0 > test-expected-output mas01cr@107: echo testfeature01 2 0 0 >> test-expected-output mas01cr@107: cmp testoutput test-expected-output mas01cr@107: ${AUDIODB} -c localhost:10018 -d testdb -Q sequence -l 1 -f testquery -r 1 > testoutput mas01cr@107: echo testfeature10 0 0 0 > test-expected-output mas01cr@107: cmp testoutput test-expected-output mas01cr@107: mas01cr@107: stop_server $! mas01cr@107: mas01cr@107: exit 104