From 344c5591d0d28cb13827ad87c77c450a5d7ca1e3 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Tue, 23 Oct 2018 17:02:39 +0200
Subject: [PATCH] Arrange GCOV_PREFIX definition

---
 tests/mpi_test_main.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/mpi_test_main.cpp b/tests/mpi_test_main.cpp
index ecf49bbe4..b370c1f82 100644
--- a/tests/mpi_test_main.cpp
+++ b/tests/mpi_test_main.cpp
@@ -8,13 +8,11 @@
 
 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");
+  if (commRank() != 0) {
+    setenv("GCOV_PREFIX", "/dev/null", 1);
   }
 
   int result = Catch::Session().run( argc, argv );
-- 
GitLab