Skip to content

Commit 38a2383

Browse files
committed
test: Set catch_system_errors=no on boost unit tests
Summary: Boost does not handle asserts well in unit tests. Encountering one causes test_bitcoin to hang indefinitely. This may explain the occassional timeouts we're experiencing in CI. See https://www.boost.org/doc/libs/1_68_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/catch_system.html Backport of Core [[bitcoin/bitcoin#18183 | PR18183]] Test Plan: Introduce `assert(0);` into a unit test, then: `ninja check` Pre-patch, `ninja check` hangs until killed (Ctrl+C). Post-patch, `ninja check` errors out as expected. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D8014
1 parent b8038e3 commit 38a2383

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/modules/TestSuite.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ function(add_boost_unit_tests_to_suite SUITE NAME)
191191
JUNIT
192192
"--run_test=${_test_name}"
193193
"--logger=${HRF_LOGGER}${JUNIT_LOGGER}"
194+
"--catch_system_errors=no"
194195
)
195196
set_property(
196197
TARGET ${SUITE_TARGET}

0 commit comments

Comments
 (0)