diff options
author | Oran Agra <oran@redislabs.com> | 2021-04-18 11:55:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-18 11:55:54 +0300 |
commit | f4b5a4d8698cfee563ee0c054bd97ef5b46c5d26 (patch) | |
tree | a1d4c4c113834f6bbd2a10422050a52f19feadd6 /tests/support/test.tcl | |
parent | a60016e0619d489f1c282aad6acd36f9d44e3459 (diff) | |
download | redis-f4b5a4d8698cfee563ee0c054bd97ef5b46c5d26.tar.gz |
Improve testsuite print of log file (#8805)
1. the `dump_logs` option would have printed only logs of servers that were
spawn before the test proc started, and not ones that the test proc
started inside it.
2. when a server proc catches an exception it should normally forward the
exception upwards, specifically when it's an assertion that should be
caught by a test proc above. however, in `durable` mode, we caught all
exceptions printed them to stdout and let the code continue,
this was wrong to do for assertions, which should have still been
propagated to the test function.
3. don't bother to search for crash log to print if we printed the the
entire log anyway
4. if no crash log was found, no need to print anything (i.e. the fact it
wasn't found)
5. rename warnings_from_file to crashlog_from_file
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 39aebe156..29d0cbf41 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -165,6 +165,8 @@ proc test {name code {okpattern undefined} {options undefined}} { if {[catch {set retval [uplevel 1 $code]} error]} { set assertion [string match "assertion:*" $error] if {$assertion || $::durable} { + # durable prevents the whole tcl test from exiting on an exception. + # an assertion is handled gracefully anyway. set msg [string range $error 10 end] lappend details $msg if {!$assertion} { |