aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-11-10 14:26:14 +0000
committerEwan Mellor <ewan@xensource.com>2006-11-10 14:26:14 +0000
commitf5982aac5fe63eb410f40363f6e5162600611908 (patch)
tree1acaa263aca2b0f5e940bf7d1bc0c50fff29976d /tools/xm-test
parent6de27d5b5e5ba94d573905d799a75dd3da12ff03 (diff)
downloadxen-f5982aac5fe63eb410f40363f6e5162600611908.tar.gz
xen-f5982aac5fe63eb410f40363f6e5162600611908.tar.bz2
xen-f5982aac5fe63eb410f40363f6e5162600611908.zip
When running tests unattended it's useful to know how long they have
taken, as (significantly) increasing the runtime (without introducing failures) can be considered a regression. This patch adds a block like: ==== Xm-test timing summary: Run Started : Fri, 10 Nov 2006 14:53:18 +1100 Run Stopped : Fri, 10 Nov 2006 14:53:20 +1100 ==== to the generated report. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Diffstat (limited to 'tools/xm-test')
-rwxr-xr-xtools/xm-test/runtest.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/xm-test/runtest.sh b/tools/xm-test/runtest.sh
index f882b04007..22c0736bf2 100755
--- a/tools/xm-test/runtest.sh
+++ b/tools/xm-test/runtest.sh
@@ -141,7 +141,11 @@ get_contact_info() {
run_tests() {
groupentered=$1
output=$2
+ report=$3
+ startfile=${report}.start
+ stopfile=${report}.stop
+ date -R > $startfile
exec < grouptest/$groupentered
while read casename testlist; do
echo Running $casename tests...
@@ -155,6 +159,7 @@ run_tests() {
fi
done
+ date -R > $stopfile
}
@@ -164,7 +169,10 @@ make_text_reports() {
failures=$2
output=$3
reportfile=$4
+ report=$5
summary=summary.tmp
+ startfile=${report}.start
+ stopfile=${report}.stop
echo "Making PASS/FAIL report ($passfail)..."
cat $OUTPUT | egrep '(REASON|PASS|FAIL|XPASS|XFAIL|SKIP)' | perl -pe 's/^(PASS|FAIL|XPASS|XFAIL)(.+)$/$1$2\n/' > $passfail
@@ -175,7 +183,12 @@ make_text_reports() {
NUMFAIL=`grep -c FAIL $output`
NUMXPASS=`grep -c XPASS $output`
NUMXFAIL=`grep -c XFAIL $output`
+ START=`cat $startfile`
+ STOP=`cat $stopfile`
cat > $summary << EOF
+Xm-test timing summary:
+ Run Started : $START
+ Run Stoped : $STOP
Xm-test execution summary:
PASS: $NUMPASS
FAIL: $NUMFAIL
@@ -302,8 +315,8 @@ if [ "$run" != "no" ]; then
if [ "$unsafe" = "no" ]; then
make_environment_report $OSREPORTTEMP $PROGREPORTTEMP
fi
- run_tests $GROUPENTERED $OUTPUT
- make_text_reports $PASSFAIL $FAILURES $OUTPUT $TXTREPORT
+ run_tests $GROUPENTERED $OUTPUT $REPORT
+ make_text_reports $PASSFAIL $FAILURES $OUTPUT $TXTREPORT $REPORT
if [ "$unsafe" = "no" ]; then
make_result_report $OUTPUT $RESULTREPORTTEMP
cat $OSREPORTTEMP $PROGREPORTTEMP $RESULTREPORTTEMP > $XMLREPORT