X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fnon_regression_tests%2Fqizx.sh;fp=tests%2Fnon_regression_tests%2Fqizx.sh;h=8de0697cca1496194ac12af9ceafcfdca7cde5b2;hb=4b52da1a20a4fe031930bb96d2ca46bec06dc529;hp=0000000000000000000000000000000000000000;hpb=a223af3254fb51c279cfbccdc18c59484fdca74e;p=SXSI%2Fxpathcomp.git diff --git a/tests/non_regression_tests/qizx.sh b/tests/non_regression_tests/qizx.sh new file mode 100755 index 0000000..8de0697 --- /dev/null +++ b/tests/non_regression_tests/qizx.sh @@ -0,0 +1,40 @@ +#!/bin/bash +QIZX="./alarm 600 22000000 /raid0/kn/qizx/qizx-fe-4.1p1/bin/qizx" + +function do_qizx() { + + query="$1" + doc=`basename "$2" .xml` + echo 'let $doc := collection("'"$doc"'") return count($doc'"$query"')' > count.xq + echo 'let $doc := collection("'"$doc"'") return $doc'"$query" > mat.xq + { + read count; + } < <($QIZX -g /raid0/kn/qizxlib/ -l xmark count.xq 2>&1 ) + { + read time_count; + } < <($QIZX -g /raid0/kn/qizxlib/ -l xmark -mr 4 count.xq 2>&1 | grep evaluation | cut -f2 -d ',' | grep -o '[0-9.]*' | head -1 ) + + { + read time_mat; + } < <($QIZX -g /raid0/kn/qizxlib/ -l xmark -mr 2 mat.xq 2>&1 | grep evaluation | cut -f2 -d ',' | grep -o '[0-9.]*' | sort -g | head -1 ) + + echo $time_count + echo 0 + echo $time_mat + echo $count + +} + +#UGLY HACK TO TRICK QIZX EVALUATION VERSION +# OLD_DATE=`date +"%m/%d/%Y"` + +# function reset_time() { +# CUR_TIME=`date +"%H:%M:%S"` +# sudo date -s "$OLD_DATE $CUR_TIME" >/dev/null 2>&1 +# } +# trap reset_time INT TERM + +#CUR_TIME=`date +"%H:%M:%S"` +#sudo date -s "03/11/2011 $CUR_TIME" >/dev/null 2>&1 +do_qizx "$@" +#reset_time