annotate tests/0043/run-test.sh @ 584:e3790284fd4a

Merged through librdf storage hooks and apache2 module. Squashed commit of the following: commit a6cfca8f04036e12e7d7fcd55c47224e802582f0 Author: Michael Jewell <mjewell@harrison.(none)> Date: Fri Jul 31 15:23:32 2009 +0100 Removed leftover bits and bobs. commit f1f0dd074d0767de3e24ba636779fd8701d73d9e Author: Michael Jewell <mjewell@harrison.(none)> Date: Fri Jul 31 15:07:20 2009 +0100 Simple test of database creation via librdf. commit 90e6350538e004d8785137e5ff2ac878c22a5d42 Author: Michael Jewell <mjewell@harrison.(none)> Date: Fri Jul 31 15:05:10 2009 +0100 Added the apache2 module which will hook into the librdf storage module commit c75bf53763b7078c83ae97fcf247da2576baa79a Author: Michael Jewell <mjewell@harrison.(none)> Date: Fri Jul 31 15:04:53 2009 +0100 Added sparql librdf source - requires the librdf sources to compile. commit 0646f0190112a73ddb2533537e2cc9832c066b52 Author: Michael Jewell <mjewell@harrison.(none)> Date: Mon Jul 27 12:12:26 2009 +0100 Adding execution to mod_audiodb commit 8f83f27ba4d917278bca0c7cb665d930e28c86df Author: Michael Jewell <mjewell@harrison.(none)> Date: Wed Jul 22 12:15:57 2009 +0100 Some initial returns for the sparql handler. commit dc639aed11943a5b0c379eb47cf293f76908b1b7 Author: Michael Jewell <mjewell@harrison.(none)> Date: Wed Jul 22 12:06:20 2009 +0100 Added a little setup.sh script to do libtoolize/autoconf etc. commit 3a679da499db647fc82cf2797daeb5cc44ed7655 Author: Michael Jewell <mjewell@harrison.(none)> Date: Wed Jul 22 12:03:42 2009 +0100 Adding initial bits for apache mod
author mas01mj
date Fri, 31 Jul 2009 14:36:12 +0000
parents da901c62e569
children
rev   line source
mas01mc@339 1 #! /bin/bash
mas01mc@339 2
mas01mc@339 3 . ../test-utils.sh
mas01mc@339 4
mas01mc@339 5 if [ -f testdb ]; then rm -f testdb; fi
mas01mc@339 6
mas01mc@339 7 # Directories to store database / features
mas01mc@339 8 DBDIR=dbdir
mas01mc@339 9 FDIR=fdir
mas01mc@339 10 mkdir ${DBDIR}
mas01mc@339 11 mkdir ${FDIR}
mas01mc@339 12
mas01mc@339 13 # Make LARGE_ADB
mas01mc@339 14 ${AUDIODB} -d testdb -N --ntracks 50000 --adb_root ${DBDIR}
mas01mc@339 15 ${AUDIODB} -d testdb -P --adb_root ${DBDIR}
mas01mc@339 16 ${AUDIODB} -d testdb -L --adb_root ${DBDIR}
mas01mc@339 17
mas01mc@339 18 ${AUDIODB} -d testdb -S --adb_root ${DBDIR} | grep "flags:" > testoutput
mas01mc@339 19 echo "flags: l2norm[on] minmax[off] power[on] times[off] largeADB[on]" > test-expected-output
mas01mc@339 20 cmp testoutput test-expected-output
mas01mc@339 21
mas01mc@339 22 intstring 2 > ${FDIR}/testfeature
mas01mc@339 23 floatstring 0 1 >> ${FDIR}/testfeature
mas01mc@339 24 floatstring 1 0 >> ${FDIR}/testfeature
mas01mc@339 25 floatstring 1 0 >> ${FDIR}/testfeature
mas01mc@339 26 floatstring 0 1 >> ${FDIR}/testfeature
mas01mc@339 27
mas01mc@339 28 intstring 1 > ${FDIR}/testpower
mas01mc@339 29 floatstring -0.5 >> ${FDIR}/testpower
mas01mc@339 30 floatstring -1 >> ${FDIR}/testpower
mas01mc@339 31 floatstring -1 >> ${FDIR}/testpower
mas01mc@339 32 floatstring -0.5 >> ${FDIR}/testpower
mas01mc@339 33
mas01mc@339 34 echo testfeature > ${FDIR}/testList.txt
mas01mc@339 35 echo testpower > ${FDIR}/pwrList.txt
mas01mc@339 36 echo key1 > ${FDIR}/keyList.txt
mas01mc@339 37
mas01mc@339 38 echo testfeature >> ${FDIR}/testList.txt
mas01mc@339 39 echo testpower >> ${FDIR}/pwrList.txt
mas01mc@339 40 echo key2 >> ${FDIR}/keyList.txt
mas01mc@339 41
mas01mc@339 42 pushd ${FDIR}
mas01mc@339 43 ../${AUDIODB} -d testdb -B -F testList.txt -W pwrList.txt -K keyList.txt --adb_root ../${DBDIR}
mas01mc@339 44 rm testList.txt pwrList.txt keyList.txt
mas01mc@339 45 popd
mas01mc@339 46 # Cleanup
mas01mc@339 47
mas01mc@339 48
mas01mc@339 49 echo "query points (0.0,0.5),(0.0,0.5),(0.5,0.0)"
mas01mc@339 50 intstring 2 > testquery
mas01mc@339 51 floatstring 0 0.5 >> testquery
mas01mc@339 52 floatstring 0 0.5 >> testquery
mas01mc@339 53 floatstring 0.5 0 >> testquery
mas01mc@339 54
mas01mc@339 55 cp ${FDIR}/testpower .
mas01mc@339 56
mas01mc@339 57 # LARGE_ADB requires an INDEX
mas01mc@339 58 ${AUDIODB} -d testdb -X -R 1 -l 1 --adb_root ${DBDIR} --adb_feature_root ${FDIR}
mas01mc@339 59
mas01mc@339 60 # LARGE_ADB query from key
mas01mc@339 61 ${AUDIODB} -d testdb -Q sequence -l 1 -k key1 -R 1 --absolute-threshold -4.5 --adb_root ${DBDIR} --adb_feature_root ${FDIR} > testoutput
mas01mc@339 62 echo key2 1 > test-expected-output
mas01mc@339 63 cmp testoutput test-expected-output
mas01mc@339 64
mas01mc@339 65 # LARGE_ADB query from feature file and power file
mas01mc@339 66 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -w testpower -R 1 --absolute-threshold -4.5 \
mas01mc@339 67 --adb_root ${DBDIR} --adb_feature_root ${FDIR} > testoutput
mas01mc@339 68 echo key1 1 > test-expected-output
mas01mc@339 69 echo key2 1 >> test-expected-output
mas01mc@339 70 cmp testoutput test-expected-output
mas01mc@339 71
mas01mc@339 72 # WS
mas01mc@339 73 WSPORT=10020
mas01mc@339 74 ${AUDIODB} -s ${WSPORT} --adb_root ${DBDIR} --adb_feature_root ${FDIR} &
mas01mc@339 75 # HACK: deal with race on process creation
mas01mc@339 76 sleep 1
mas01mc@339 77 trap 'kill $!; exit 1' ERR
mas01mc@339 78
mas01mc@339 79 # LARGE_ADB WS query from key
mas01mc@339 80 ${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 81 echo key2 0 0 0 > test-expected-output
mas01mc@339 82 cmp testoutput test-expected-output
mas01mc@339 83
mas01mc@339 84 # LARGE_ADB WS query from feature file and power file tests
mas01mc@339 85 ${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 86 echo key1 1 > test-expected-output
mas01mc@339 87 echo key2 1 >> test-expected-output
mas01mc@339 88 cmp testoutput test-expected-output
mas01mc@339 89
mas01mc@339 90 stop_server $!
mas01mc@339 91
mas01mc@339 92 # TEST LARGE_ADB WS WITH PRELOADED INDEX
mas01mc@339 93 WSPORT=10020
mas01mc@339 94 ${AUDIODB} -s ${WSPORT} --load_index -d testdb -R 1 -l 1 --adb_root ${DBDIR} --adb_feature_root ${FDIR} &
mas01mc@339 95 # HACK: deal with race on process creation
mas01mc@339 96 sleep 1
mas01mc@339 97 trap 'kill $!; exit 1' ERR
mas01mc@339 98
mas01mc@339 99 # LARGE_ADB WS query from key
mas01mc@339 100 ${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 101 echo key2 0 0 0 > test-expected-output
mas01mc@339 102 cmp testoutput test-expected-output
mas01mc@339 103
mas01mc@339 104 # LARGE_ADB WS query from feature file and power file tests
mas01mc@339 105 ${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 106 echo key1 1 > test-expected-output
mas01mc@339 107 echo key2 1 >> test-expected-output
mas01mc@339 108 cmp testoutput test-expected-output
mas01mc@339 109
mas01mc@339 110 stop_server $!
mas01mc@339 111
mas01mc@339 112 # Clean up
mas01mc@339 113 . clean.sh
mas01mc@339 114
mas01mc@339 115 exit 104