From 2128d5677ec350c0587674cb6b46b71d0689c242 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Thu, 25 Jul 2019 11:32:47 +0200
Subject: [PATCH] Disable std::cout to prevent polluting of test reports

---
 tests/mpi_test_main.cpp | 3 +++
 tests/test_main.cpp     | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/tests/mpi_test_main.cpp b/tests/mpi_test_main.cpp
index 541d48a37..67004c7f2 100644
--- a/tests/mpi_test_main.cpp
+++ b/tests/mpi_test_main.cpp
@@ -12,6 +12,9 @@ main(int argc, char* argv[])
   parallel::Messenger::create(argc, argv);
   Kokkos::initialize({4, -1, -1, true});
 
+  // Disable outputs from tested classes to the standard output
+  std::cout.setstate(std::ios::badbit);
+
   if (parallel::rank() != 0) {
     setenv("GCOV_PREFIX", "/dev/null", 1);
   }
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index e0ed7b5fe..c7355e990 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -8,6 +8,9 @@ main(int argc, char* argv[])
 {
   Kokkos::initialize({4, -1, -1, true});
 
+  // Disable outputs from tested classes to the standard output
+  std::cout.setstate(std::ios::badbit);
+
   int result = Catch::Session().run(argc, argv);
 
   Kokkos::finalize();
-- 
GitLab