diff --git a/unit_tests/test_main.cpp b/unit_tests/test_main.cpp index 8009e59d..49120ede 100644 --- a/unit_tests/test_main.cpp +++ b/unit_tests/test_main.cpp @@ -16,23 +16,29 @@ int main(int argc, char *argv[]) { std::cerr << argv[0] << " (KokkosComm " << KOKKOSCOMM_VERSION_MAJOR << "." << KOKKOSCOMM_VERSION_MINOR << "." << KOKKOSCOMM_VERSION_PATCH << ")\n"; } Kokkos::initialize(); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " did initialize()\n"; // Intialize google test ::testing::InitGoogleTest(&argc, argv); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " did ::testing::InitGoogleTest()\n"; // Add a test environment, which will initialize a test communicator // (a duplicate of MPI_COMM_WORLD) ::testing::AddGlobalTestEnvironment(new gtest_mpi::MPITestEnvironment()); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " did testing::AddGlobalTestEnvironment()\n"; auto& test_listeners = ::testing::UnitTest::GetInstance()->listeners(); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " did ::testing::UnitTest::GetInstance()->listeners()\n"; // Remove default listener and replace with the custom MPI listener delete test_listeners.Release(test_listeners.default_result_printer()); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " removed default listener\n"; test_listeners.Append(new gtest_mpi::PrettyMPIUnitTestResultPrinter()); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " added MPI listener\n"; // run tests - auto exit_code = RUN_ALL_TESTS(); + if (0 == rank) std::cerr << __FILE__ << ":" << __LINE__ << " ran tests\n"; // Finalize MPI before exiting Kokkos::finalize();