mas01mc@339: #! /bin/bash mas01mc@339: mas01mc@339: . ../test-utils.sh mas01mc@339: mas01mc@339: if [ -f testdb ]; then rm -f testdb; fi mas01mc@339: mas01mc@339: # Make LARGE_ADB mas01mc@339: ${AUDIODB} -d testdb -N --ntracks 50000 mas01mc@339: ${AUDIODB} -d testdb -P mas01mc@339: ${AUDIODB} -d testdb -L mas01mc@339: mas01mc@339: ${AUDIODB} -d testdb -S | grep "flags:" > testoutput mas01mc@339: echo "flags: l2norm[on] minmax[off] power[on] times[off] largeADB[on]" > test-expected-output mas01mc@339: cmp testoutput test-expected-output mas01mc@339: mas01mc@339: intstring 2 > testfeature mas01mc@339: floatstring 0 1 >> testfeature mas01mc@339: floatstring 1 0 >> testfeature mas01mc@339: floatstring 1 0 >> testfeature mas01mc@339: floatstring 0 1 >> testfeature mas01mc@339: mas01mc@339: intstring 1 > testpower mas01mc@339: floatstring -0.5 >> testpower mas01mc@339: floatstring -1 >> testpower mas01mc@339: floatstring -1 >> testpower mas01mc@339: floatstring -0.5 >> testpower mas01mc@339: mas01mc@339: echo testfeature > testList.txt mas01mc@339: echo testpower > pwrList.txt mas01mc@339: echo key1 > keyList.txt mas01mc@339: mas01mc@339: echo testfeature >> testList.txt mas01mc@339: echo testpower >> pwrList.txt mas01mc@339: echo key2 >> keyList.txt mas01mc@339: mas01mc@339: ${AUDIODB} -d testdb -B -F testList.txt -W pwrList.txt -K keyList.txt mas01mc@339: # Cleanup mas01mc@339: rm testList.txt pwrList.txt keyList.txt mas01mc@339: mas01mc@339: echo "query points (0.0,0.5),(0.0,0.5),(0.5,0.0)" mas01mc@339: intstring 2 > testquery mas01mc@339: floatstring 0 0.5 >> testquery mas01mc@339: floatstring 0 0.5 >> testquery mas01mc@339: floatstring 0.5 0 >> testquery mas01mc@339: mas01mc@339: # LARGE_ADB requires an INDEX mas01mc@339: ${AUDIODB} -d testdb -X -R 1 -l 1 mas01mc@339: mas01mc@339: # LARGE_ADB query from key mas01mc@339: ${AUDIODB} -d testdb -Q sequence -l 1 -k key1 -R 1 --absolute-threshold -4.5 > testoutput mas01mc@339: echo key2 1 > test-expected-output mas01mc@339: cmp testoutput test-expected-output mas01mc@339: mas01mc@339: # LARGE_ADB query from feature file and power file mas01mc@339: ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -w testpower -R 1 --absolute-threshold -4.5 > testoutput mas01mc@339: echo key1 1 > test-expected-output mas01mc@339: echo key2 1 >> test-expected-output mas01mc@339: cmp testoutput test-expected-output mas01mc@339: mas01mc@339: # WS mas01mc@339: WSPORT=10020 mas01mc@339: start_server ${AUDIODB} ${WSPORT} mas01mc@339: mas01mc@339: # LARGE_ADB WS query from key mas01mc@339: ${AUDIODB} -c localhost:${WSPORT} -d testdb -Q sequence -l 1 -k key1 -R 1 --absolute-threshold -4.5 -n 1 --lsh_exact > testoutput mas01mc@339: echo key2 0 0 0 > test-expected-output mas01mc@339: cmp testoutput test-expected-output mas01mc@339: mas01mc@339: # LARGE_ADB WS query from feature file and power file tests mas01mc@339: ${AUDIODB} -c localhost:${WSPORT} -d testdb -Q sequence -l 1 -f testquery -w testpower -R 1 --absolute-threshold -4.5 -n 1 > testoutput mas01mc@339: echo key1 1 > test-expected-output mas01mc@339: echo key2 1 >> test-expected-output mas01mc@339: cmp testoutput test-expected-output mas01mc@339: mas01mc@339: stop_server $! mas01mc@339: mas01mc@339: exit 104