comparison tests/0020/run-test.sh @ 423:b09d2eb1a2b2 api-inversion

Cheap hackery abounds. Include an accumulator into the query_loop chain. Somewhat surprisingly, very few tests fail, and those that do are due to over-specific reporting requirements in the case of ties, so rewrite those tests to be more permissive. There are probably codepaths which ignore the accumulator completely; they will still work, because the accumulator will return zero points when it is asked to ->get_points().
author mas01cr
date Wed, 24 Dec 2008 10:55:08 +0000
parents d70d5804a283
children
comparison
equal deleted inserted replaced
422:a7d61291fbda 423:b09d2eb1a2b2
22 echo "query point (0.0,0.5)" 22 echo "query point (0.0,0.5)"
23 intstring 2 > testquery 23 intstring 2 > testquery
24 floatstring 0 0.5 >> testquery 24 floatstring 0 0.5 >> testquery
25 25
26 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput 26 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
27 echo testfeature01 1 > test-expected-output 27 echo testfeature01 1 > test-expected-output1
28 echo testfeature10 1 >> test-expected-output 28 echo testfeature10 1 >> test-expected-output1
29 cmp testoutput test-expected-output 29 echo testfeature10 1 > test-expected-output2
30 echo testfeature01 1 >> test-expected-output2
31 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
30 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput 32 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
31 echo testfeature01 1 > test-expected-output 33 echo testfeature01 1 > test-expected-output1
32 cmp testoutput test-expected-output 34 echo testfeature10 1 > test-expected-output2
35 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
33 36
34 check_server $! 37 check_server $!
35 38
36 echo "query point (0.5,0.0)" 39 echo "query point (0.5,0.0)"
37 intstring 2 > testquery 40 intstring 2 > testquery
38 floatstring 0.5 0 >> testquery 41 floatstring 0.5 0 >> testquery
39 42
40 # FIXME: because there's only one point in each track (and the query),
41 # the ordering is essentially database order. We need these test
42 # cases anyway because we need to test non-segfaulting, non-empty
43 # results...
44
45 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput 43 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -R 5 > testoutput
46 echo testfeature01 1 > test-expected-output 44 echo testfeature01 1 > test-expected-output1
47 echo testfeature10 1 >> test-expected-output 45 echo testfeature10 1 >> test-expected-output1
48 cmp testoutput test-expected-output 46 echo testfeature10 1 > test-expected-output2
47 echo testfeature01 1 >> test-expected-output2
48 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
49 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput 49 ${AUDIODB} -c localhost:10020 -d testdb -Q sequence -l 1 -f testquery -r 1 -R 5 > testoutput
50 echo testfeature01 1 > test-expected-output 50 echo testfeature01 1 > test-expected-output1
51 cmp testoutput test-expected-output 51 echo testfeature10 1 > test-expected-output2
52 cmp testoutput test-expected-output1 || cmp testoutput test-expected-output2
52 53
53 stop_server $! 54 stop_server $!
54 55
55 exit 104 56 exit 104