comparison tests/0036/run-test.sh @ 277:abfb26e08d9c audiodb-debian

Merge trunk changes -r326:386 into audiodb-debian branch. Plus new debian/changelog version. (Should have used an epoch really, but couldn't be bothered; TODO: work out a sane version numbering policy).
author mas01cr
date Tue, 01 Jul 2008 09:12:40 +0000
parents
children
comparison
equal deleted inserted replaced
246:cbf51690c78c 277:abfb26e08d9c
1 #! /bin/bash
2
3 . ../test-utils.sh
4
5 if [ -f testdb ]; then rm -f testdb; fi
6
7 ${AUDIODB} -d testdb -N
8
9 intstring 2 > testfeature01
10 floatstring 0 1 >> testfeature01
11 floatstring 1 0 >> testfeature01
12 intstring 2 > testfeature10
13 floatstring 1 0 >> testfeature10
14 floatstring 0 1 >> testfeature10
15
16 cat > testfeaturefiles <<EOF
17 testfeature01
18 testfeature10
19 EOF
20
21 ${AUDIODB} -d testdb -B -F testfeaturefiles
22
23 # sequence queries require L2NORM
24 ${AUDIODB} -d testdb -L
25
26 echo "query point (0.0,0.5)"
27 intstring 2 > testquery
28 floatstring 0 0.5 >> testquery
29
30 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery > testoutput
31 echo testfeature01 1 > test-expected-output
32 echo 0 0 0 >> test-expected-output
33 echo 2 0 1 >> test-expected-output
34 echo testfeature10 1 >> test-expected-output
35 echo 0 0 1 >> test-expected-output
36 echo 2 0 0 >> test-expected-output
37 cmp testoutput test-expected-output
38
39 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 2 > testoutput
40 cmp testoutput test-expected-output
41
42 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 5 > testoutput
43 cmp testoutput test-expected-output
44
45 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 1 > testoutput
46 echo testfeature01 0 > test-expected-output
47 echo 0 0 0 >> test-expected-output
48 echo testfeature10 0 >> test-expected-output
49 echo 0 0 1 >> test-expected-output
50 cmp testoutput test-expected-output
51
52 echo "query point (0.5,0.0)"
53 intstring 2 > testquery
54 floatstring 0.5 0 >> testquery
55
56 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery > testoutput
57 echo testfeature01 1 > test-expected-output
58 echo 0 0 1 >> test-expected-output
59 echo 2 0 0 >> test-expected-output
60 echo testfeature10 1 >> test-expected-output
61 echo 0 0 0 >> test-expected-output
62 echo 2 0 1 >> test-expected-output
63 cmp testoutput test-expected-output
64
65 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 2 > testoutput
66 cmp testoutput test-expected-output
67
68 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 5 > testoutput
69 cmp testoutput test-expected-output
70
71 ${AUDIODB} -d testdb -Q nsequence -l 1 -f testquery -n 1 > testoutput
72 echo testfeature01 0 > test-expected-output
73 echo 0 0 1 >> test-expected-output
74 echo testfeature10 0 >> test-expected-output
75 echo 0 0 0 >> test-expected-output
76 cmp testoutput test-expected-output
77
78 exit 104