Browse Source

Add separator lines when repeating error messages

farm
Jacob Bachmeyer 6 years ago
parent
commit
61dc0cafad
  1. 9
      ChangeLog
  2. 3
      NEWS
  3. 4
      lib/framework.exp

9
ChangeLog

@ -1,3 +1,12 @@
2020-06-29 Jacob Bachmeyer <jcb62281+dev@gmail.com>
PR 41824 / PR 41918
* NEWS: Add item for repeated error messages.
* lib/framework.exp (log_and_exit): Add separator lines around the
error dumps repeated at the end of a run.
2020-06-26 Jacob Bachmeyer <jcb62281+dev@gmail.com>
PR 41824 / PR 41918

3
NEWS

@ -11,6 +11,9 @@ X. runtest now responds consistently to all Tcl errors and generates an
UNRESOLVED result when a test script aborts. Previously, calling an
undefined procedure would cause the test run to abort while other Tcl
errors produced only an easily-ignored message.
X. runtest now collects Tcl errors encountered during a test run and prints
the collected errors a second time at the end of the test run after the
summary. Separator lines containing more than 10 hyphens are included.
3. A utility procedure relative_filename has been added. This procedure
computes a relative file name to a given destination from a given base.
4. The utility procedure 'grep' now accepts a '-n' option that

4
lib/framework.exp

@ -384,10 +384,12 @@ proc log_and_exit {} {
if {[llength $::dejagnu::error::list] > 0} {
# print errors again at end of output
foreach { cell } $::dejagnu::error::list {
clone_output "ERROR: [string repeat - 43]"
clone_output "ERROR: in testcase [lindex $cell 0]"
clone_output "ERROR: [lindex $cell 1]"
clone_output "ERROR: tcl error code [lindex $cell 2]"
clone_output "ERROR: tcl error info:\n[lindex $cell 3]"
clone_output "ERROR: \
tcl error info:\n[lindex $cell 3]\n[string repeat - 50]"
}
}
close_logs

Loading…
Cancel
Save