From 6c6a9cab4b5ba2835560f9e3e6d0aaa861292b0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Wed, 2 May 2012 14:34:45 +0200 Subject: [PATCH] Fixes on queries and test scripts to handle old versions of SXSI. --- tests/non_regression_tests/xmark_all.xml.queries | 3 ++- tests/scripts/check_perf.sh | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/non_regression_tests/xmark_all.xml.queries b/tests/non_regression_tests/xmark_all.xml.queries index 73d4a2a..6d70d8f 100644 --- a/tests/non_regression_tests/xmark_all.xml.queries +++ b/tests/non_regression_tests/xmark_all.xml.queries @@ -25,4 +25,5 @@ /descendant::*/descendant::* /descendant::*/descendant::*/descendant::* /descendant::*/descendant::*/descendant::*/descendant::* -/descendant::*/descendant::*/descendant::*/descendant::*/descendant::*/descendant::*/descendant::*/descendant::* +/descendant::*/descendant::*/descendant::*/descendant::*/descendant::*/descendant::* +#/descendant::*/descendant::* diff --git a/tests/scripts/check_perf.sh b/tests/scripts/check_perf.sh index d077aad..f8dcb24 100755 --- a/tests/scripts/check_perf.sh +++ b/tests/scripts/check_perf.sh @@ -13,6 +13,12 @@ then fi DOC="$1" +STARTQ="$2" +if [ -z "$STARTQ" ] +then + STARTQ=0 +fi + FILENAME=`basename "$DOC"` FILENAME=`echo "$FILENAME" | sed -e 's/\.srx/\.xml/'` @@ -53,6 +59,11 @@ I=1 while read Q do +if [ $I -lt $STARTQ ] +then + I=$(($I + 1)) + continue +fi echo "Query $I" echo "$Q" REF=`getline "$REFERENCE" "$I"` @@ -60,11 +71,11 @@ RCOUNT=`echo "$REF" | cut -f 2 -d ,` RTCOUNT=`echo "$REF" | cut -f 3 -d ,` RTMAT=`echo "$REF" | cut -f 4 -d ,` -./main.native -r 1 -d -c "$DOC" "$Q" > tmp 2>&1 +./main.native -c "$DOC" "$Q" > tmp 2>&1 TCOUNT=`cat tmp | grep 'Execution time' | grep -o '[0-9]\+\.[0-9]*' | sort -g | head -1` CCOUNT=`cat tmp | grep 'Number of results' | grep -o '[0-9]\+'` -./main.native -r 1 -d "$DOC" "$Q" > tmp 2>&1 +./main.native "$DOC" "$Q" > tmp 2>&1 TMAT=`cat tmp | grep 'Execution time' | grep -o '[0-9]\+\.[0-9]*' | sort -g | head -1` MCOUNT=`cat tmp | grep 'Number of results' | grep -o '[0-9]\+'` -- 2.17.1