globally (effectively) --catch_system_errors=no
all boost-test based unit tests
#1849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of our tests require
--catch_system_errors=no
to properly operate, but there is another compelling reason to blanket this option on all tests: gathering core dumps. Default behavior (--catch_system_errors=yes
) will block core dump creation for those tests should they fail. Instead of needing to remember to sprinkle--catch_system_errors=no
in all the variousadd_test()
declarations (prone to missing some), we have some other options,BOOST_TEST_CATCH_SYSTEM_ERRORS
environment variable in CI. This allows CI to gobble up core dumps from any test, but introduces a difference in CI vs non-CI behaviorBOOST_TEST_DEFAULTS_TO_CORE_DUMP
preprocessor macroINTERFACE
library that depends onBoost::unit_test_framework
to addBOOST_TEST_DEFAULTS_TO_CORE_DUMP
; but this still requires remembering in every place we use boost test we need to link toleap_boost_unit_test
instead ofBoost::unit_test_framework
As much as I detest "global" cmake compile definitions, the
BOOST_TEST_DEFAULTS_TO_CORE_DUMP
preprocessor macro seems the best option in terms of being a single location with consistent blanket behavior. Certainly open to opinions though.Work on #640