Mercurial > hg > audiodb
annotate tests/0021/run-test.sh @ 589:9119f2fa3efe
Header file rearrangement
Make it so that lshlib.h is slightly more like a header file to include
to use the LSH ("class G") class, and slightly less a header file for
developing that class, by removing all the #includes and moving them to
the one-file lshlib.cpp instead.
Make audioDB-internals.h slightly more of a project header file, by
including there all the headers we actually need.
Remove some assert()s (which do nothing) and some Uns32Ts (-> uint32_t)
author | mas01cr |
---|---|
date | Tue, 11 Aug 2009 21:42:13 +0000 |
parents | fe4dc39b2dd7 |
children |
rev | line source |
---|---|
mas01cr@252 | 1 #! /bin/bash |
mas01cr@109 | 2 |
mas01cr@109 | 3 . ../test-utils.sh |
mas01cr@109 | 4 |
mas01cr@109 | 5 if [ -f testdb ]; then rm -f testdb; fi |
mas01cr@109 | 6 |
mas01cr@109 | 7 ${AUDIODB} -d testdb -N |
mas01cr@109 | 8 |
mas01cr@109 | 9 intstring 2 > testfeature |
mas01cr@109 | 10 floatstring 0 0.5 >> testfeature |
mas01cr@109 | 11 floatstring 0.5 0 >> testfeature |
mas01cr@109 | 12 |
mas01cr@109 | 13 ${AUDIODB} -d testdb -I -f testfeature |
mas01cr@109 | 14 |
mas01cr@109 | 15 # sequence queries require L2NORM |
mas01cr@109 | 16 ${AUDIODB} -d testdb -L |
mas01cr@109 | 17 |
mas01cr@109 | 18 start_server ${AUDIODB} 10021 |
mas01cr@109 | 19 |
mas01cr@109 | 20 echo "query point (0.0,0.5)" |
mas01cr@109 | 21 intstring 2 > testquery |
mas01cr@109 | 22 floatstring 0 0.5 >> testquery |
mas01cr@109 | 23 |
mas01cr@109 | 24 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@109 | 25 echo testfeature 1 0 0 > test-expected-output |
mas01cr@109 | 26 cmp testoutput test-expected-output |
mas01cr@109 | 27 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@109 | 28 echo testfeature 0 0 0 > test-expected-output |
mas01cr@109 | 29 cmp testoutput test-expected-output |
mas01cr@109 | 30 |
mas01cr@109 | 31 check_server $! |
mas01cr@109 | 32 |
mas01cr@109 | 33 echo "query point (0.5,0.0)" |
mas01cr@109 | 34 intstring 2 > testquery |
mas01cr@109 | 35 floatstring 0.5 0 >> testquery |
mas01cr@109 | 36 |
mas01cr@109 | 37 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery > testoutput |
mas01cr@109 | 38 echo testfeature 1 0 1 > test-expected-output |
mas01cr@109 | 39 cmp testoutput test-expected-output |
mas01cr@109 | 40 ${AUDIODB} -c localhost:10021 -d testdb -Q sequence -l 1 -f testquery -n 1 > testoutput |
mas01cr@109 | 41 echo testfeature 0 0 1 > test-expected-output |
mas01cr@109 | 42 cmp testoutput test-expected-output |
mas01cr@109 | 43 |
mas01cr@109 | 44 stop_server $! |
mas01cr@109 | 45 |
mas01cr@109 | 46 exit 104 |