[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/tmp/patches/14-fyi-autotest-duration.patch
From: |
Akim Demaille |
Subject: |
/tmp/patches/14-fyi-autotest-duration.patch |
Date: |
Tue, 07 Aug 2001 09:59:39 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
Always produce testsuite.log, including when there are no
failures. This helps getting information on skipped tests, and
duration of the tests. Err, implement the latter btw.
* lib/autotest/general.m4 (AT_INIT): Set up fd 6 for the log.
Dump information on the first run of each test.
(AT_CLEANUP): Create `at-times' containing the duration of the
test group.
Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Sun, 05 Aug 2001 22:21:13 +0200 akim
+++ lib/autotest/general.m4 Mon, 06 Aug 2001 19:26:55 +0200 akim
@@ -124,7 +124,7 @@ m4_define([AT_data_files],
# Shall we be verbose?
at_verbose=:
at_quiet=echo
-# Shall we keep the debug scripts? Must be `:' when testsuite is
+# Shall we keep the debug scripts? Must be `:' when test suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug=false
# Display help message?
@@ -218,6 +218,30 @@ Tests:
exec 5>/dev/null
fi
+# 6 is the log file. To be preserved if `-d'.
+if $at_debug; then
+ exec 6>/dev/null
+else
+ exec 6>$[0].log
+ {
+ AS_BOX([Test suite log for $at_package $at_version])
+ echo
+
+ # Try to find a few ChangeLogs in case it might help determining the
+ # exact version.
+ find "$at_top_srcdir" -name ChangeLog \
+ -exec echo {} : ';' \
+ -exec sed 's/^/| /;10q' {} ';' \
+ -exec echo ';'
+
+ AS_UNAME
+ echo
+
+ AS_BOX([Running silently the tests])
+ } >&6
+fi
+
+
at_fail_list=
at_skip_list=
at_test_count=0
@@ -252,16 +276,20 @@ Tests:
at_test_count=`expr 1 + $at_test_count`
$at_verbose $at_n "$at_test. $srcdir/`cat at-setup-line`: $at_c"
case $at_status in
- 0) echo ok
+ 0) at_msg="ok"
;;
- 77) echo "ok (skipped near \``cat at-check-line`')"
+ 77) at_msg="ok (skipped near \``cat at-check-line`')"
at_skip_list="$at_skip_list $at_test"
;;
- *) echo "FAILED near \``cat at-check-line`'"
+ *) at_msg="FAILED near \``cat at-check-line`'"
at_fail_list="$at_fail_list $at_test"
- $at_stop_on_error && break
;;
esac
+ echo $at_msg
+ at_log_msg="$at_test. $srcdir/`cat at-setup-line`: $at_msg"
+ at_log_msg="$at_log_msg (`cat at-times`)"
+ echo "$at_log_msg" >&6
+ $at_stop_on_error && test -n "$at_fail_list" && break
$at_debug || rm -rf $at_data_files
;;
esac
@@ -286,7 +314,7 @@ Tests:
fi
# Remove any debugging script resulting from a previous run.
- rm -f debug-*.sh $[0].log
+ rm -f debug-*.sh
echo
echo $at_n "Writing \`debug-NN.sh' scripts, NN =$at_c"
for at_group in $at_fail_list; do
@@ -300,21 +328,15 @@ Tests:
echo ', done'
echo
echo 'You may investigate any problem if you feel able to do so, in which'
- echo 'case the testsuite provide a good starting point.'
+ echo 'case the test suite provides a good starting point.'
echo
echo 'Now, failed tests will be executed again, verbosely, and logged'
echo 'in the file '$[0]'.log.'
{
- AS_BOX([Test suite log for $at_package $at_version])
echo
-
- # Try to find a few ChangeLogs in case it might help determining the
- # exact version.
- find "$at_top_srcdir" -name ChangeLog \
- -exec echo {} : ';' \
- -exec sed 's/^/| /;10q' {} ';' \
- -exec echo ';'
+ echo
+ AS_BOX([Summary of the failures])
# Summary of failed and skipped tests.
if test $at_fail_count != 0; then
@@ -328,8 +350,9 @@ Tests:
echo
fi
- AS_UNAME
- } >>$[0].log
+ AS_BOX([Running verbosely the failing tests])
+ echo
+ } >&6
$SHELL $[0] -v -d $at_fail_list 2>&1 | tee -a $[0].log
AS_BOX([$[0].log is created])
@@ -418,6 +441,7 @@ m4_define([AT_CLEANUP_FILES],
# AT_DATA.
m4_define([AT_CLEANUP],
[AT_CLEANUP_FILES([$1])dnl
+ times >at-times
)
at_status=$?
;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- /tmp/patches/14-fyi-autotest-duration.patch,
Akim Demaille <=