Add tests for wordbased index.
[SXSI/xpathcomp.git] / tests / non_regression_tests / qizx.sh
index 2226239..763ed53 100755 (executable)
@@ -5,7 +5,7 @@ source utils.sh
 
 function stop_qizx() {
     sleep 2
-    rm -rf mat.xq count.xq
+#    rm -rf mat.xq count.xq
     QIZXPIDS=`ps xwww --format "%p,%a" | grep java | grep qizx | cut -f 1 -d ' '`
     for i in $QIZXPIDS
     do
@@ -40,6 +40,7 @@ function do_qizx() {
     query="$1"
     doc=`basename "$2"`
     repeat="$3"
+    count="$4"
     echo 'let $doc := collection("'"$doc"'") return count($doc'"$query"')' > count.xq
     echo 'let $doc := collection("'"$doc"'") return $doc'"$query" > mat.xq
 
@@ -101,12 +102,15 @@ function do_qizx() {
        then
            break
        fi
-    done
+       done
 
     IT=0
-    while true
-    do
-       OUTPUT=`$QIZX -g /raid0/kn/qizxlib/ -l xmark -r "$repeat" mat.xq -out /dev/null 2>&1`
+    if [ -z "$count" ]
+    then
+
+       while true
+       do
+           OUTPUT=`$QIZX -g /raid0/kn/qizxlib/ -l xmark -r "$repeat" mat.xq -out /dev/null 2>&1`
        if  echo "$OUTPUT" | grep -q 'java' >/dev/null 2>&1
        then
            if [ "$IT" = 5 ]
@@ -135,6 +139,9 @@ function do_qizx() {
            break
        fi
     done
+    else
+       time_mat="999999"
+    fi
 
     echo $time_count
     echo 0