ENDIF()
ENDIF()
IF(MEDCOUPLING_BUILD_TESTS)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets InterpKernelTest)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets InterpKernelTest InterpKernelTestUtils)
ENDIF()
ENDIF()
TransformedTriangleTest.cxx
UnitTetra3D2DIntersectionTest.cxx
UnitTetraIntersectionBaryTest.cxx
- TestInterpKernelUtils.cxx
ThreeDSurfProjectionTest.cxx
)
+SET(InterpKernelTestUtils_SOURCES
+ TestInterpKernelUtils.cxx
+)
+
SET(TestINTERP_KERNEL_SOURCES
TestInterpKernel.cxx
)
INSTALL(TARGETS PerfTest DESTINATION ${MEDCOUPLING_INSTALL_BINS})
ENDIF(NOT MEDCOUPLING_MICROMED)
+ADD_LIBRARY(InterpKernelTestUtils SHARED ${InterpKernelTestUtils_SOURCES})
ADD_LIBRARY(InterpKernelTest SHARED ${InterpKernelTest_SOURCES})
SET(InterpKernelTest_LIBS medcoupling interpkernel ${CPPUNIT_LIBRARIES})
IF(NOT MEDCOUPLING_MICROMED)
SET(InterpKernelTest_LIBS medloader ${InterpKernelTest_LIBS})
ENDIF(NOT MEDCOUPLING_MICROMED)
-TARGET_LINK_LIBRARIES(InterpKernelTest ${InterpKernelTest_LIBS})
+TARGET_LINK_LIBRARIES(InterpKernelTest ${InterpKernelTest_LIBS} InterpKernelTestUtils)
ADD_EXECUTABLE(TestINTERP_KERNEL ${TestINTERP_KERNEL_SOURCES})
TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
INSTALL(TARGETS TestINTERP_KERNEL DESTINATION ${MEDCOUPLING_INSTALL_BINS})
INSTALL(TARGETS InterpKernelTest DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
-INSTALL(FILES CppUnitTest.hxx InterpKernelTestExport.hxx DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
+INSTALL(TARGETS InterpKernelTestUtils DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
+INSTALL(FILES CppUnitTest.hxx InterpKernelTestExport.hxx TestInterpKernelUtils.hxx DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
# Application tests
namespace INTERP_TEST
{
- std::string getResourceFile( const std::string& filename )
+ std::string getResourceFile( const std::string& filename, int levelUp)
{
std::string resourceFile = "";
- bool good = false;
-
if ( getenv("MEDCOUPLING_ROOT_DIR") ) {
// use MEDCOUPLING_ROOT_DIR env.var
resourceFile = getenv("MEDCOUPLING_ROOT_DIR");
- resourceFile += "/share/resources/med/";
+ resourceFile += IK_PATH_SEP + "share" + IK_PATH_SEP + "resources" + IK_PATH_SEP + "med" + IK_PATH_SEP;
resourceFile += filename;
std::ifstream my_file(resourceFile);
if (my_file.good())
- good = true;
+ return resourceFile;
}
- if (!good)
+ // else
+ resourceFile = get_current_dir_name();
+ resourceFile += IK_PATH_SEP;
+ for(int i=0; i<levelUp; i++)
+ resourceFile += ".." + IK_PATH_SEP;
+ resourceFile += "resources" + IK_PATH_SEP;
+ resourceFile += filename;
+ std::ifstream my_file(resourceFile);
+ if (!my_file.good())
{
- resourceFile = get_current_dir_name();
- resourceFile += "/../../resources/";
- std::ifstream my_file(resourceFile);
- if (!my_file.good())
- {
- std::stringstream ss;
- ss << "INTERP_TEST::getResourceFile(): could not open resource test file: " << filename << "\n";
- throw INTERP_KERNEL::Exception(ss.str().c_str());
- }
+ std::stringstream ss;
+ ss << "INTERP_TEST::getResourceFile(): could not open resource test file: " << filename << "\n";
+ throw INTERP_KERNEL::Exception(ss.str().c_str());
}
return resourceFile;
#include <string>
+#ifdef WIN32
+# define IK_PATH_SEP std::string("\\")
+#else
+# define IK_PATH_SEP std::string("/")
+#endif
+
namespace INTERP_TEST
{
-
- INTERPKERNELTEST_EXPORT std::string getResourceFile( const std::string& );
-
-} // namespace INTERP_TEST
+ INTERPKERNELTEST_EXPORT std::string getResourceFile( const std::string& filename, int levelUp=2);
+}
#endif // _TESTINTERPKERNELUTILS_HXX_
SET_TESTS_PROPERTIES(SauvLoaderTest PROPERTIES ENVIRONMENT "${tests_env}")
IF(NUMPY_FOUND)
+ # Add Remapper to the Python path:
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH "${CMAKE_CURRENT_BINARY_DIR}/../../MEDCoupling_Swig")
+ SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(MEDLoaderCouplingTrainingSession ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderCouplingTrainingSession.py)
SET_TESTS_PROPERTIES(MEDLoaderCouplingTrainingSession PROPERTIES ENVIRONMENT "${tests_env}")
ENDIF(NUMPY_FOUND)
medutilities.py
)
-FOREACH(testfile ${MEDLOADER_TEST_FILES})
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/${testfile}" "${CMAKE_CURRENT_BINARY_DIR}/${testfile}" COPYONLY)
-ENDFOREACH(testfile)
INSTALL(FILES ${MEDLOADER_TEST_FILES} DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake
med_root_dir=os.getenv("MEDCOUPLING_ROOT_DIR")
if med_root_dir:
- agitateur_file=os.path.join(os.getenv("MEDCOUPLING_ROOT_DIR"),"share","resources","med","agitateur.med")
-else:
- current_dir = os.path.dirname(os.path.realpath(__file__))
- agitateur_file=os.path.join(current_dir, "..", "..", "..", "resources","agitateur.med")
+ agitateur_file = os.path.join(os.getenv("MEDCOUPLING_ROOT_DIR"),"share","resources","med","agitateur.med")
+ if not os.path.exists(agitateur_file):
+ current_dir = os.path.dirname(os.path.realpath(__file__))
+ agitateur_file=os.path.join(current_dir, "..", "..", "..", "resources","agitateur.med")
pass
data=MEDFileData(agitateur_file)
ts=data.getFields()[0].getTimeSteps()
class SauvLoaderTest(unittest.TestCase):
def __getResourcesDirectory(self):
- med_root_dir=os.getenv("MEDCOUPLING_ROOT_DIR")
+ med_root_dir = os.getenv("MEDCOUPLING_ROOT_DIR")
if med_root_dir:
- return os.path.join( os.getenv("MEDCOUPLING_ROOT_DIR"), "share","resources","med")
- else:
- current_dir = os.path.dirname(os.path.realpath(__file__))
- return os.path.join(current_dir, "..", "..", "..", "resources")
+ pth = os.path.join( os.getenv("MEDCOUPLING_ROOT_DIR"), "share","resources","med")
+ if os.path.exists(pth):
+ return pth
+ current_dir = os.path.dirname(os.path.realpath(__file__))
+ pth = os.path.join(current_dir, "..", "..", "..", "resources")
+ if not os.path.exists(pth):
+ raise Exception("SauvLoaderTest: Unable to get resource directory")
+ return pth
pass
def testSauv2Med(self):
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
- ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest # For common CppUnitTest.hxx file
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest # For common CppUnitTest.hxx file and TestIKUtils.hxx
)
SET(TestMEDLoader_SOURCES
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_EXECUTABLE(TestMEDLoader ${TestMEDLoader_SOURCES})
-TARGET_LINK_LIBRARIES(TestMEDLoader medloader ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestMEDLoader TestMEDLoader)
SET_TESTS_PROPERTIES(TestMEDLoader PROPERTIES ENVIRONMENT "${tests_env}")
ADD_EXECUTABLE(TestSauvLoader ${TestSauvLoader_SOURCES})
-TARGET_LINK_LIBRARIES(TestSauvLoader medloader ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestSauvLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestSauvLoader TestSauvLoader)
SET_TESTS_PROPERTIES(TestSauvLoader PROPERTIES ENVIRONMENT "${tests_env}")
#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingMemArray.hxx"
+#include "TestInterpKernelUtils.hxx" // getResourceFile()
#include <cmath>
#include <numeric>
-#include <unistd.h> // get_current_dir_name()
using namespace ParaMEDMEM;
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("pointe.med");
+ string fileName= INTERP_TEST::getResourceFile("pointe.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0);
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("polygones.med");
+ string fileName=INTERP_TEST::getResourceFile("polygones.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
CPPUNIT_ASSERT(meshNames[0]=="Bord");
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("poly3D.med");
+ string fileName=INTERP_TEST::getResourceFile("poly3D.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
CPPUNIT_ASSERT(meshNames[0]=="poly3D");
mesh->decrRef();
}
-std::string MEDLoaderTest::getResourceFile( const std::string& filename ) const
-{
- std::string resourceFile = "";
-
- if ( getenv("MEDCOUPLING_ROOT_DIR") ) {
- // use MEDCOUPLING_ROOT_DIR env.var
- resourceFile = getenv("MEDCOUPLING_ROOT_DIR");
- resourceFile += "/share/resources/med/";
- }
- else {
- resourceFile = get_current_dir_name();
- resourceFile += "/../../../resources/";
- }
-
- resourceFile += filename;
- return resourceFile;
-}
-
-
MEDCouplingUMesh *MEDLoaderTest::build1DMesh_1()
{
double coords[6]={ 0.0, 0.3, 0.75, 1.0, 1.4, 1.3 };
MEDCouplingFieldDouble *buildVecFieldOnGauss_1();
MEDCouplingFieldDouble *buildVecFieldOnGaussNE_1();
- std::string getResourceFile( const std::string& filename ) const;
};
}
#include "MEDFileData.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingMemArray.hxx"
+#include "TestInterpKernelUtils.hxx" // getResourceFile()
#ifdef WIN32
# include <windows.h>
void SauvLoaderTest::testSauv2Med()
{
// read a file containing all types of readable piles
- std::string file = getResourceFile("allPillesTest.sauv");
+ std::string file = INTERP_TEST::getResourceFile("allPillesTest.sauv", 3);
MEDCouplingAutoRefCountObjectPtr<SauvReader> sr=SauvReader::New(file.c_str());
MEDCouplingAutoRefCountObjectPtr<MEDFileData> d2=sr->loadInMEDFileDS();
// write MED
void SauvLoaderTest::testSauv2MedOnA3SubsField()
{
// read SAUV
- std::string sauvFile = getResourceFile("portico_3subs.sauv");
+ std::string sauvFile = INTERP_TEST::getResourceFile("portico_3subs.sauv", 3);
MEDCouplingAutoRefCountObjectPtr<SauvReader> sr=SauvReader::New(sauvFile.c_str());
MEDCouplingAutoRefCountObjectPtr<MEDFileData> d2=sr->loadInMEDFileDS();
// check mesh
void SauvLoaderTest::testMed2Sauv()
{
// read pointe.med
- std::string file = getResourceFile("pointe.med");
+ std::string file = INTERP_TEST::getResourceFile("pointe.med", 3);
MEDCouplingAutoRefCountObjectPtr<MEDFileData> pointeMed=MEDFileData::New(file.c_str());
// add 3 faces to pointeMed
remove(fileToRemove[i]);
}
}
-
-std::string SauvLoaderTest::getResourceFile( const std::string& filename )
-{
- std::string resourceFile = "";
-
- if ( getenv("MEDCOUPLING_ROOT_DIR") ) {
- // use MEDCOUPLING_ROOT_DIR env.var
- resourceFile = getenv("MEDCOUPLING_ROOT_DIR");
- resourceFile += "/share/resources/med/";
- }
- else {
- resourceFile = get_current_dir_name();
- resourceFile += "/../../../resources/";
- }
-
- resourceFile += filename;
-#ifdef WIN32
- std::string fixedpath = resourceFile;
- for ( int i=0; i < fixedpath.length(); ++i )
- if (fixedpath[i] == '/')
- fixedpath[i] = '\\';
- return fixedpath;
-#endif
- return resourceFile;
-}
public:
void tearDown();
- static std::string getResourceFile( const std::string& filename );
};
}
{
execName=getenv("MEDCOUPLING_ROOT_DIR"); //.../INSTALL/MED
execName+="/bin/medpartitioner";
+ std::ifstream my_file(execName);
+ if (my_file.good())
+ return execName;
}
- else
- {
- execName = get_current_dir_name();
- execName += "/../../MEDPartitioner/medpartitioner";
- if (! std::ifstream(execName.c_str()))
- CPPUNIT_FAIL("Can't find medpartitioner, please set MEDCOUPLING_ROOT_DIR");
- }
+ execName = get_current_dir_name();
+ execName += "/../../MEDPartitioner/medpartitioner";
+ if (! std::ifstream(execName.c_str()))
+ CPPUNIT_FAIL("Can't find medpartitioner, please set MEDCOUPLING_ROOT_DIR");
+
return execName;
}
std::string execName;
if ( getenv("MEDCOUPLING_ROOT_DIR") )
{
- execName=getenv("MEDCOUPLING_ROOT_DIR"); //.../INSTALL/MED
+ execName=getenv("MEDCOUPLING_ROOT_DIR");
execName+="/bin/medpartitioner_para";
+ std::ifstream my_file(execName);
+ if (my_file.good())
+ return execName;
}
- else
- {
- execName = get_current_dir_name();
- execName += "/../../MEDPartitioner/medpartitioner_para";
- if (! std::ifstream(execName.c_str()))
- CPPUNIT_FAIL("Can't find medpartitioner_para, please set MEDCOUPLING_ROOT_DIR");
- }
+ execName = get_current_dir_name();
+ execName += "/../../MEDPartitioner/medpartitioner_para";
+ if (! std::ifstream(execName.c_str()))
+ CPPUNIT_FAIL("Can't find medpartitioner_para, please set MEDCOUPLING_ROOT_DIR");
return execName;
}
IF(MEDCOUPLING_PARTITIONER_METIS)
# Python test of partitionner require METIS or PARMETIS?
+ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}/../MEDLoader/Swig)
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(MEDPartitionerTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDPartitionerTest.py)
SET_TESTS_PROPERTIES(MEDPartitionerTest PROPERTIES ENVIRONMENT "${tests_env}")
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
+ ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNELTest # for TestIKUtils.hxx
)
SET(ParaMEDMEMTest_SOURCES
ADD_LIBRARY(ParaMEDMEMTest SHARED ${ParaMEDMEMTest_SOURCES})
SET_TARGET_PROPERTIES(ParaMEDMEMTest PROPERTIES COMPILE_FLAGS "")
-TARGET_LINK_LIBRARIES(ParaMEDMEMTest paramedmem paramedloader medcouplingremapper ${CPPUNIT_LIBRARIES})
+TARGET_LINK_LIBRARIES(ParaMEDMEMTest paramedmem paramedloader medcouplingremapper InterpKernelTestUtils ${CPPUNIT_LIBRARIES})
INSTALL(TARGETS ParaMEDMEMTest DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
SET(TESTSParaMEDMEM)
//
#include "ParaMEDMEMTest.hxx"
+#include "TestInterpKernelUtils.hxx"
#include <cppunit/TestAssert.h>
#include <sstream>
#include <unistd.h>
#endif
-std::string ParaMEDMEMTest::getResourceFile( const std::string& filename )
-{
- std::string resourceFile = "";
-
- if ( getenv("MEDCOUPLING_ROOT_DIR") ) {
- // use MEDCOUPLING_ROOT_DIR env.var
- resourceFile = getenv("MEDCOUPLING_ROOT_DIR");
- resourceFile += "/share/resources/med/";
- }
- else {
- resourceFile = get_current_dir_name();
- resourceFile += "/../../resources/";
- }
-
- resourceFile += filename;
- return resourceFile;
-}
//================================================================================
void testFabienAPI1();
void testFabienAPI2();
- std::string getResourceFile( const std::string& );
std::string getTmpDirectory();
std::string makeTmpFile( const std::string&, const std::string& = "" );
#include "ICoCoMEDField.hxx"
#include "ParaMEDLoader.hxx"
#include "MEDLoader.hxx"
+#include "TestInterpKernelUtils.hxx"
#include <string>
ParaMEDMEM::ParaFIELD* parafield;
ICoCo::MEDField* icocofield ;
- string filename_xml1 = getResourceFile("square1_split");
- string filename_xml2 = getResourceFile("square2_split");
+ string filename_xml1 = "square1_split";
+ string filename_xml2 = "square2_split";
//string filename_seq_wr = makeTmpFile("");
//string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med");
ostringstream strstream;
strstream <<master<<rank+1<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
string master= filename_xml2;
ostringstream strstream;
strstream << master<<(rank-nproc_source+1)<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
ParaMEDMEM::MEDCouplingUMesh* mesh;
ParaMEDMEM::MEDCouplingFieldDouble* mcfield;
- string filename_xml1 = getResourceFile("square1_split");
- string filename_xml2 = getResourceFile("square2_split");
+ string filename_xml1 = "square1_split";
+ string filename_xml2 = "square2_split";
// To remove tmp files from disk
ParaMEDMEMTest_TmpFilesRemover aRemover;
ostringstream strstream;
strstream <<master<<rank+1<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
ParaMEDMEM::ComponentTopology comptopo;
if(srcM=="P0")
{
string master= filename_xml2;
ostringstream strstream;
strstream << master<<(rank-nproc_source+1)<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
ParaMEDMEM::ComponentTopology comptopo;
if(targetM=="P0")
{
tmp_dir = string(tmp_dir_c);
else
tmp_dir = "/tmp";
- string filename_xml1 = getResourceFile("Mesh3D_10_2d");
- string filename_xml2 = getResourceFile("Mesh3D_11");
+ string filename_xml1 = "Mesh3D_10_2d";
+ string filename_xml2 = "Mesh3D_11";
//string filename_seq_wr = makeTmpFile("");
//string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med");
ostringstream strstream;
strstream <<master<<rank+1<<".med";
+ std::string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
string master= filename_xml2;
ostringstream strstream;
strstream << master << ".med";
+ std::string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_6";
- mesh = MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
tmp_dir = string(tmp_dir_c);
else
tmp_dir = "/tmp";
- string filename_xml1 = getResourceFile("square1_split");
- string filename_xml2 = getResourceFile("square2_split");
+ string filename_xml1 = "square1_split";
+ string filename_xml2 = "square2_split";
//string filename_seq_wr = makeTmpFile("");
//string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med");
ostringstream strstream;
strstream <<master<<rank+1<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
string master= filename_xml2;
ostringstream strstream;
strstream << master<<(rank-nproc_source+1)<<".med";
+ string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0);
+ mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
#include "ComponentTopology.hxx"
#include "ICoCoMEDField.hxx"
#include "MEDLoader.hxx"
+#include "TestInterpKernelUtils.hxx"
#include <string>
ParaMEDMEM::ParaMESH* paramesh;
ParaMEDMEM::ParaFIELD* parafield;
- string filename_xml1 = getResourceFile("square1_split");
- string filename_2 = getResourceFile("square1.med");
+ string filename_xml1 = INTERP_TEST::getResourceFile("square1_split");
+ string filename_2 = INTERP_TEST::getResourceFile("square1.med");
//string filename_seq_wr = makeTmpFile("");
//string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med");
INSTALL(FILES MEDRenumber.i MEDRenumberCommon.i DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
INSTALL(FILES MEDRenumberTest.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}/../MEDCoupling_Swig)
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(MEDRenumberTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDRenumberTest.py)
SET_TESTS_PROPERTIES(MEDRenumberTest PROPERTIES ENVIRONMENT "${tests_env}")