From 61dc0cafad8845b3c668940ed2e574bd503d410f Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 29 Jun 2020 21:51:38 -0500 Subject: Add separator lines when repeating error messages --- ChangeLog | 9 +++++++++ NEWS | 3 +++ lib/framework.exp | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 38c245e..88ff017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2020-06-29 Jacob Bachmeyer + + 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 PR 41824 / PR 41918 diff --git a/NEWS b/NEWS index 2701d96..5267c25 100644 --- a/NEWS +++ b/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 diff --git a/lib/framework.exp b/lib/framework.exp index 9cfff9d..8c74dfa 100644 --- a/lib/framework.exp +++ b/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 -- cgit v1.1