From: abn Date: Wed, 20 Jan 2016 08:37:08 +0000 (+0100) Subject: Ensure sequential run of MEDLoader 1,2,3 tests. X-Git-Tag: V7_8_0a2~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fabn%2Fml_test123;p=tools%2Fmedcoupling.git Ensure sequential run of MEDLoader 1,2,3 tests. --- diff --git a/src/MEDLoader/Swig/CMakeLists.txt b/src/MEDLoader/Swig/CMakeLists.txt index 29a81d6dc..84888e2af 100644 --- a/src/MEDLoader/Swig/CMakeLists.txt +++ b/src/MEDLoader/Swig/CMakeLists.txt @@ -72,7 +72,7 @@ INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${ME SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${MEDCOUPLING_INSTALL_PYTHON}) -INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest1.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderTest4.py SauvLoaderTest.py MEDLoaderExamplesTest.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py MEDLoaderSplitter.py medutilities.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS}) +INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest1.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderTest123.py MEDLoaderTest4.py SauvLoaderTest.py MEDLoaderExamplesTest.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py MEDLoaderSplitter.py medutilities.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS}) INSTALL(FILES med2sauv PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) INSTALL(FILES sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) INSTALL(FILES case2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MEDCOUPLING_INSTALL_BINS} ) @@ -80,7 +80,7 @@ INSTALL(FILES med2case PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EX SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) -ADD_TEST(MEDLoaderTest1_2_3 ${PYTHON_EXECUTABLE} -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR} -p MEDLoaderTest[123].py) +ADD_TEST(MEDLoaderTest1_2_3 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest123.py) SET_TESTS_PROPERTIES(MEDLoaderTest1_2_3 PROPERTIES ENVIRONMENT "${tests_env}") ADD_TEST(MEDLoaderTest4 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest4.py) diff --git a/src/MEDLoader/Swig/CTestTestfileInstall.cmake b/src/MEDLoader/Swig/CTestTestfileInstall.cmake index 509e400a4..caf7dfd13 100644 --- a/src/MEDLoader/Swig/CTestTestfileInstall.cmake +++ b/src/MEDLoader/Swig/CTestTestfileInstall.cmake @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_TEST(MEDLoaderTest1_2_3 python -m unittest discover -p MEDLoaderTest[123].py) +ADD_TEST(MEDLoaderTest1_2_3 python MEDLoaderTest123.py) SET_TESTS_PROPERTIES(MEDLoaderTest1_2_3 PROPERTIES LABELS "${COMPONENT_NAME}") ADD_TEST(MEDLoaderTest4 python MEDLoaderTest4.py) diff --git a/src/MEDLoader/Swig/MEDLoaderTest1.py b/src/MEDLoader/Swig/MEDLoaderTest1.py index 38ee4afa9..05b2e82ec 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest1.py +++ b/src/MEDLoader/Swig/MEDLoaderTest1.py @@ -24,7 +24,7 @@ import unittest from math import pi,e,sqrt from MEDLoaderDataForTest import MEDLoaderDataForTest -class MEDLoaderTest(unittest.TestCase): +class MEDLoaderTest1(unittest.TestCase): def testMesh1DRW(self): mesh=MEDLoaderDataForTest.build1DMesh_1(); mesh.checkCoherency(); diff --git a/src/MEDLoader/Swig/MEDLoaderTest123.py b/src/MEDLoader/Swig/MEDLoaderTest123.py new file mode 100644 index 000000000..99f68f0ad --- /dev/null +++ b/src/MEDLoader/Swig/MEDLoaderTest123.py @@ -0,0 +1,8 @@ +if __name__ == "__main__": + import unittest + + from MEDLoaderTest1 import MEDLoaderTest1 + from MEDLoaderTest2 import MEDLoaderTest2 + from MEDLoaderTest3 import MEDLoaderTest3 + + unittest.main() diff --git a/src/MEDLoader/Swig/MEDLoaderTest2.py b/src/MEDLoader/Swig/MEDLoaderTest2.py index 06cc645d0..9d44302cf 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest2.py +++ b/src/MEDLoader/Swig/MEDLoaderTest2.py @@ -24,7 +24,7 @@ import unittest from math import pi,e,sqrt from MEDLoaderDataForTest import MEDLoaderDataForTest -class MEDLoaderTest(unittest.TestCase): +class MEDLoaderTest2(unittest.TestCase): def testMesh1DRW(self): mesh=MEDLoaderDataForTest.build1DMesh_1(); mesh.checkCoherency(); diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 13b3e4318..8e59b9902 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -25,7 +25,7 @@ import platform from math import pi,e,sqrt from MEDLoaderDataForTest import MEDLoaderDataForTest -class MEDLoaderTest(unittest.TestCase): +class MEDLoaderTest3(unittest.TestCase): def testMEDMesh1(self): fileName="Pyfile18.med" mname="ExampleOfMultiDimW"