Browse Source

Avoid Tcl error when report-card tool fails to produce output in tests

dejagnu-1.6.3
Jacob Bachmeyer 5 years ago
parent
commit
1f7ac1cf71
  1. 3
      ChangeLog
  2. 14
      testsuite/report-card.all/onetest.exp

3
ChangeLog

@ -1,5 +1,8 @@
2021-05-18 Jacob Bachmeyer <jcb@gnu.org>
* testsuite/report-card.all/onetest.exp: Avoid Tcl error when item
and totals lines are missing entirely.
* testsuite/runtest.main/pr48155.exp: Fix assumption about exit
code from /bin/false, which is different on Solaris.

14
testsuite/report-card.all/onetest.exp

@ -193,11 +193,17 @@ foreach name $test_names {
}
# skip the footer
expect -re {.+} { exp_continue }
# do the item and totals lines match?
if { $item_line eq $totals_line } {
pass "verify total for $name"
# were item and totals lines even produced?
if { [info exists item_line] && [info exists totals_line] } {
# do the item and totals lines match?
if { $item_line eq $totals_line } {
pass "verify total for $name"
} else {
fail "verify total for $name"
}
} else {
fail "verify total for $name"
# either an item line or the totals line was not seen
unresolved "verify total for $name"
}
if { $separator_count == 2 } {
pass "expected separator lines for $name"

Loading…
Cancel
Save