Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/medcoupling
[tools/medcoupling.git] / src / MEDCoupling_Swig / CTestTestfileInstall.cmake
index c1f34cca8f5cf38463931f6b2ae92a1e0f84d562..6c6c894afb1cb6073da9a2d81c1424e540dab79f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2019  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
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-ADD_TEST(MEDCouplingBasicsTest python MEDCouplingBasicsTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingBasicsTest PROPERTIES LABELS "${COMPONENT_NAME}")
+INCLUDE(tests.set)
 
-ADD_TEST(MEDCouplingExamplesTest python MEDCouplingExamplesTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingExamplesTest PROPERTIES LABELS "${COMPONENT_NAME}")
-
-ADD_TEST(MEDCouplingRemapperTest python MEDCouplingRemapperTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingRemapperTest PROPERTIES LABELS "${COMPONENT_NAME}")
-
-# if numpy is used
-ADD_TEST(MEDCouplingNumPyTest python MEDCouplingNumPyTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingNumPyTest PROPERTIES LABELS "${COMPONENT_NAME}")
-
-ADD_TEST(MEDCouplingPickleTest python MEDCouplingPickleTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingPickleTest PROPERTIES LABELS "${COMPONENT_NAME}")
+FOREACH(tfile ${ALL_TESTS})
+  GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE)
+  SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME})
+  ADD_TEST(${TEST_NAME} python ${tfile})
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+    LABELS "${COMPONENT_NAME}"
+    TIMEOUT ${TIMEOUT}
+    )
+ENDFOREACH()