Salome HOME
Merge branch 'occ/24009'
[tools/medcoupling.git] / src / ParaMEDMEMTest / ParaMEDMEMTest.cxx
index 128c04049aa56ed342d71b04d50befa274f7b4c3..ac62ccc4cc32c65b09a574460a8b9fe30979b1cd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,7 @@
 //
 
 #include "ParaMEDMEMTest.hxx"
+#include "TestInterpKernelUtils.hxx"
 #include <cppunit/TestAssert.h>
 
 #include <sstream>
 #include <unistd.h>
 #endif
 
-//================================================================================
-/*!
- * \brief Get path to the resources file.
- *
- * When running 'make test' source file is taken from MED_SRC/resources folder.
- * Otherwise, file is searched in ${MED_ROOT_DIR}/share/salome/resources/med folder.
- * 
- * \param filename name of the resource file (should not include a path)
- * \return full path to the resource file
- */
-//================================================================================
-
-std::string ParaMEDMEMTest::getResourceFile( const std::string& filename )
-{
-  std::string resourceFile = "";
-
-  if ( getenv("top_srcdir") ) {
-    // we are in 'make test' step
-    resourceFile = getenv("top_srcdir");
-    resourceFile += "/resources/";
-  }
-  else if ( getenv("MED_ROOT_DIR") ) {
-    // use MED_ROOT_DIR env.var
-    resourceFile = getenv("MED_ROOT_DIR");
-    resourceFile += "/share/salome/resources/med/";
-  }
-  resourceFile += filename;
-  return resourceFile;
-}
 
 
 //================================================================================
@@ -92,7 +64,7 @@ std::string ParaMEDMEMTest::getTmpDirectory()
 
 //================================================================================
 /*!
- * \brief Creates a copy of source file (if source file is specified) 
+ * \brief Creates a copy of source file (if source file is specified)
  * in the temporary directory and returns a path to the tmp file
  *
  * \param tmpfile name of the temporary file (without path)