add option to skip death tests for use with valgrind checking of unit tests

This commit is contained in:
Axel Kohlmeyer
2024-08-01 17:38:12 -04:00
parent db230cd89e
commit 7a3ba6027b
3 changed files with 18 additions and 1 deletions

View File

@ -32,6 +32,12 @@ using LAMMPS_NS::LAMMPSException;
using ::testing::ContainsRegex;
#if defined(LAMMPS_SKIP_DEATH_TESTS)
#define TEST_FAILURE(errmsg, ...) \
{ \
; \
}
#else
#define TEST_FAILURE(errmsg, ...) \
{ \
::testing::internal::CaptureStdout(); \
@ -39,6 +45,7 @@ using ::testing::ContainsRegex;
auto mesg = ::testing::internal::GetCapturedStdout(); \
ASSERT_THAT(mesg, ContainsRegex(errmsg)); \
}
#endif
// whether to print verbose output (i.e. not capturing LAMMPS screen output).
extern bool verbose;