From 90efb771ec5c357fc38433de5fee123d4e81b20f Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Thu, 18 Oct 2018 19:12:12 +0200
Subject: [PATCH] Add crappy trick to allow coverage file generation in
 parallel

---
 tests/mpi_test_main.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/mpi_test_main.cpp b/tests/mpi_test_main.cpp
index b6f2a172a..ecf49bbe4 100644
--- a/tests/mpi_test_main.cpp
+++ b/tests/mpi_test_main.cpp
@@ -4,11 +4,19 @@
 #include <Kokkos_Core.hpp>
 #include <Messenger.hpp>
 
+#include <cstdlib>
+
 int main( int argc, char* argv[] )
 {
+  setenv("GCOV_PREFIX", "/dev/null", 1);
+
   Messenger::create(argc,  argv);
   Kokkos::initialize({4,-1,-1,true});
 
+  if (commRank() == 0) {
+    unsetenv("GCOV_PREFIX");
+  }
+
   int result = Catch::Session().run( argc, argv );
 
   Kokkos::finalize();
-- 
GitLab