Salome HOME
RNV: Porting to swig-3
[tools/medcoupling.git] / src / MEDLoader / Swig / CTestTestfileInstall.cmake
index 509e400a451369203dbf0357ba21e09b033896ff..9e3da7572a683fb167d2ef8faa38614dee04095c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2016  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(MEDLoaderTest1_2_3 python -m unittest discover -p MEDLoaderTest[123].py)
-SET_TESTS_PROPERTIES(MEDLoaderTest1_2_3 PROPERTIES LABELS "${COMPONENT_NAME}")
+SET(TEST_NAMES
+  MEDLoaderTest123
+  MEDLoaderTest4
+  MEDLoaderExamplesTest
+  SauvLoaderTest
+  # if numpy is used
+  MEDLoaderCouplingTrainingSession
+)
 
-ADD_TEST(MEDLoaderTest4 python MEDLoaderTest4.py)
-SET_TESTS_PROPERTIES(MEDLoaderTest4 PROPERTIES LABELS "${COMPONENT_NAME}")
-
-ADD_TEST(MEDLoaderExamplesTest python MEDLoaderExamplesTest.py)
-SET_TESTS_PROPERTIES(MEDLoaderExamplesTest PROPERTIES LABELS "${COMPONENT_NAME}")
-
-ADD_TEST(SauvLoaderTest python SauvLoaderTest.py)
-SET_TESTS_PROPERTIES(SauvLoaderTest PROPERTIES LABELS "${COMPONENT_NAME}")
-
-# if numpy is used
-ADD_TEST(MEDLoaderCouplingTrainingSession python MEDLoaderCouplingTrainingSession.py)
-SET_TESTS_PROPERTIES(MEDLoaderCouplingTrainingSession PROPERTIES LABELS "${COMPONENT_NAME}")
+FOREACH(tfile ${TEST_NAMES})
+  SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+  ADD_TEST(${TEST_NAME} python ${tfile}.py)
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+    LABELS "${COMPONENT_NAME}"
+    TIMEOUT ${TIMEOUT}
+    )
+ENDFOREACH()