mas01cr@277: #! /bin/bash mas01cr@78: mas01cr@78: . ../test-utils.sh mas01cr@78: mas01cr@78: if [ -f testdb ]; then rm -f testdb; fi mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -N mas01cr@78: mas01cr@78: intstring 2 > testfeature01 mas01cr@78: floatstring 0 1 >> testfeature01 mas01cr@78: intstring 2 > testfeature10 mas01cr@78: floatstring 1 0 >> testfeature10 mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -I -f testfeature01 mas01cr@78: ${AUDIODB} -d testdb -I -f testfeature10 mas01cr@78: mas01cr@78: # sequence queries require L2NORM mas01cr@78: ${AUDIODB} -d testdb -L mas01cr@78: mas01cr@78: echo "query point (0.0,0.5)" mas01cr@78: intstring 2 > testquery mas01cr@78: floatstring 0 0.5 >> testquery mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput mas01cr@78: echo testfeature01 1 > test-expected-output mas01cr@78: echo testfeature10 1 >> test-expected-output mas01cr@78: cmp testoutput test-expected-output mas01cr@78: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput mas01cr@78: echo testfeature01 1 > test-expected-output mas01cr@78: cmp testoutput test-expected-output mas01cr@78: mas01cr@78: echo "query point (0.5,0.0)" mas01cr@78: intstring 2 > testquery mas01cr@78: floatstring 0.5 0 >> testquery mas01cr@78: mas01cr@78: # FIXME: because there's only one point in each track (and the query), mas01cr@78: # the ordering is essentially database order. We need these test mas01cr@78: # cases anyway because we need to test non-segfaulting, non-empty mas01cr@78: # results... mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput mas01cr@78: echo testfeature01 1 > test-expected-output mas01cr@78: echo testfeature10 1 >> test-expected-output mas01cr@78: cmp testoutput test-expected-output mas01cr@78: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput mas01cr@78: echo testfeature01 1 > test-expected-output mas01cr@78: cmp testoutput test-expected-output mas01cr@78: mas01cr@78: exit 104