Skip to content

Commit

Permalink
Merge pull request #303 from ValeevGroup/evaleev/debug/np2-test-hangs
Browse files Browse the repository at this point in the history
run unit tests with raised log_level
  • Loading branch information
evaleev authored Sep 2, 2021
2 parents 1b7e2e3 + 96f9a87 commit 6386604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ if(ENABLE_MPI)
NAME tiledarray/unit/run-np-${p}
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${p}
${MPIEXEC_PREFLAGS}
$<TARGET_FILE:${executable}> --log_level=warning --show-progress ${${executable}_np_${p}_args}
$<TARGET_FILE:${executable}> --log_level=unit_scope ${${executable}_np_${p}_args}
${MPIEXEC_POSTFLAGS}
)
set_tests_properties(tiledarray/unit/run-np-${p}
Expand Down
5 changes: 5 additions & 0 deletions tests/ta_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ GlobalFixture::GlobalFixture() {
// to launch a debugger here or elsewhere:
// Debugger::default_debugger()->debug("ready to run");
}

if (world->rank() != 0) {
boost::unit_test::unit_test_log.set_threshold_level(
boost::unit_test::log_all_errors);
}
}

GlobalFixture::~GlobalFixture() {
Expand Down

0 comments on commit 6386604

Please sign in to comment.