Rework test scripts
[SXSI/xpathcomp.git] / tests / non_regression_tests / test.sh
index dc75a4e..c02a2be 100755 (executable)
@@ -32,9 +32,11 @@ if [ "$1" = "fast" ]
 then
     repeat_monet=1
     repeat_sxsi=1
+    repeat_qizx=2
 else
-    repeat_monet=5
-    repeat_sxsi=3
+    repeat_monet=10
+    repeat_sxsi=10
+    repeat_qizx=4
 fi
 
 
@@ -50,8 +52,14 @@ QLOG="$TESTDOC"_qizx.log
 rm -f "$MLOG" "$SLOG" "$QLOG"
 cat "$TESTDOC".queries | grep -v '^#' | while read line
 do
-    query=`echo "$line" | cut -f 1 -d "%"`
-    query_qizx=`echo "$line" | cut -f 2 -d "%"`
+
+    qname=`echo "$line" | cut -f 1 -d "%"`
+    query=`echo "$line" | cut -f 2 -d "%"`
+    query_qizx=`echo "$line" | cut -f 3 -d "%"`
+    if [ -z "$query_qizx" ]
+    then
+       query_qizx="$query"
+    fi
     echo Test $I "... "
     echo "$query" | sed -e 's|/descendant::|//|g' | sed -e 's|child::||g'
     echo -n Running SXSI
@@ -83,15 +91,15 @@ do
     fi
     echo " ok"
 
-# echo -n Running Qizx/XQuery
-# {
-#      read qizx_count_time
-#      read qizx_mat_time
-#      read qizx_print_time
-#      read qizx_count
-#   } < <(`pwd`/qizx.sh "$query_qizx" "$TESTDOC")
-#
-#   echo " ok"
+    echo -n Running Qizx/XQuery
+    {
+       read qizx_count_time
+       read qizx_mat_time
+       read qizx_print_time
+       read qizx_count
+    } < <(`pwd`/qizx.sh "$query_qizx" "$TESTDOC" "$repeat_qizx")
+
+    echo " ok"
 
     if [ "$monet_count" = "" ]
     then