1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0031820: Tests - "dlog get" skips last exception when calling 'test" with echo OFF

Added missing puts to "test" command.
This commit is contained in:
kgv 2020-10-03 12:48:19 +03:00 committed by bugmaster
parent b9ec690a2f
commit afe3ff9aaa

View File

@ -1319,7 +1319,6 @@ proc _run_test {scriptsdir group gridname casefile echo} {
# evaluate test case # evaluate test case
set tmp_imagedir 0 set tmp_imagedir 0
set anExcep ""
if [catch { if [catch {
# set variables identifying test case # set variables identifying test case
uplevel set casename [file tail $casefile] uplevel set casename [file tail $casefile]
@ -1369,15 +1368,21 @@ proc _run_test {scriptsdir group gridname casefile echo} {
uplevel source -encoding utf-8 $scriptsdir/$group/end uplevel source -encoding utf-8 $scriptsdir/$group/end
} }
} res] { } res] {
set anExcep $res if { "$res" == "" } { set res "EMPTY" }
if { "$res" == "" } { set anExcep "EMPTY" } # in echo mode, output error message using dputs command to have it colored,
# note that doing the same in logged mode would duplicate the message
if { ! $dlog_exists || ! $echo } {
puts "Tcl Exception: $res"
} else {
decho off
dputs -red -intense "Tcl Exception: $res"
}
} }
# stop logging # stop logging
if { $dlog_exists } { if { $dlog_exists } {
if { $echo } { if { $echo } {
decho off decho off
if { "$anExcep" != "" } { dputs -red -intense "Tcl Exception: $res" }
} else { } else {
rename puts {} rename puts {}
rename puts-saved puts rename puts-saved puts