Mercurial > hg > audiodb
annotate tests/0023/run-test.sh @ 636:9cda689dcc20
Use an appropriate data copier for the platform's bit width
Dispatch on sb-vm:n-word-bits, though I think sbcl itself should
probably define a system-area-double-float-copy bit-bash function.
This also fixes a thinko, where only half of the times data was being
copied, even on 64-bit platforms. Sheesh. Fixes #32
author | mas01cr |
---|---|
date | Tue, 29 Sep 2009 16:23:42 +0000 |
parents | fe4dc39b2dd7 |
children |
rev | line source |
---|---|
mas01cr@252 | 1 #! /bin/bash |
mas01cr@124 | 2 |
mas01cr@124 | 3 . ../test-utils.sh |
mas01cr@124 | 4 |
mas01cr@124 | 5 if [ -f testdb ]; then rm -f testdb; fi |
mas01cr@124 | 6 |
mas01cr@124 | 7 ${AUDIODB} -d testdb -N |
mas01cr@124 | 8 |
mas01cr@124 | 9 intstring 2 > testfeature01 |
mas01cr@124 | 10 floatstring 0 1 >> testfeature01 |
mas01cr@124 | 11 intstring 2 > testfeature10 |
mas01cr@124 | 12 floatstring 1 0 >> testfeature10 |
mas01cr@124 | 13 |
mas01cr@124 | 14 cat > testfeaturefiles <<EOF |
mas01cr@124 | 15 testfeature01 |
mas01cr@124 | 16 testfeature10 |
mas01cr@124 | 17 EOF |
mas01cr@124 | 18 |
mas01cr@124 | 19 ${AUDIODB} -d testdb -B -F testfeaturefiles |
mas01cr@124 | 20 |
mas01cr@124 | 21 # sequence queries require L2NORM |
mas01cr@124 | 22 ${AUDIODB} -d testdb -L |
mas01cr@124 | 23 |
mas01cr@124 | 24 echo "query point (0.0,0.5)" |
mas01cr@124 | 25 intstring 2 > testquery |
mas01cr@124 | 26 floatstring 0 0.5 >> testquery |
mas01cr@124 | 27 floatstring 0.5 0 >> testquery |
mas01cr@124 | 28 |
mas01cr@124 | 29 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 0 > testoutput |
mas01cr@124 | 30 echo testfeature01 0 0 0 > test-expected-output |
mas01cr@124 | 31 echo testfeature10 2 0 0 >> test-expected-output |
mas01cr@124 | 32 cmp testoutput test-expected-output |
mas01cr@124 | 33 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 0 > testoutput |
mas01cr@124 | 34 echo testfeature01 0 0 0 > test-expected-output |
mas01cr@124 | 35 cmp testoutput test-expected-output |
mas01cr@124 | 36 |
mas01cr@124 | 37 echo "query point (0.5,0.0)" |
mas01cr@124 | 38 |
mas01cr@124 | 39 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 1 > testoutput |
mas01cr@125 | 40 echo testfeature10 0 1 0 > test-expected-output |
mas01cr@125 | 41 echo testfeature01 2 1 0 >> test-expected-output |
mas01cr@124 | 42 cmp testoutput test-expected-output |
mas01cr@124 | 43 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 1 > testoutput |
mas01cr@125 | 44 echo testfeature10 0 1 0 > test-expected-output |
mas01cr@124 | 45 cmp testoutput test-expected-output |
mas01cr@124 | 46 |
mas01cr@124 | 47 exit 104 |