From f1633dc247dca6a9375b3a471f644dc6f0de2fcd Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 20 Jan 2016 09:37:08 +0100 Subject: [PATCH] Ensure sequential run of MEDLoader 1,2,3 tests. --- src/MEDLoader/Swig/CMakeLists.txt | 4 ++-- src/MEDLoader/Swig/CTestTestfileInstall.cmake | 2 +- src/MEDLoader/Swig/MEDLoaderTest1.py | 2 +- src/MEDLoader/Swig/MEDLoaderTest123.py | 8 ++++++++ src/MEDLoader/Swig/MEDLoaderTest2.py | 2 +- src/MEDLoader/Swig/MEDLoaderTest3.py | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 src/MEDLoader/Swig/MEDLoaderTest123.py 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" -- 2.39.2