From 0f145ef2d53975fdb5641ddea65d795d52ce20f4 Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 21 Jul 2010 08:57:17 +0000 Subject: [PATCH] *** empty log message *** --- salome_adm/cmake_files/am2cmake.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 809219c09..b010aa1be 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -1268,11 +1268,16 @@ class CMakeFile(object): newlines.append(''' FOREACH(input ${UNIT_TEST_PROG}) SET(fail_regex "KO") + GET_FILENAME_COMPONENT(ext ${input} EXT) + IF(ext STREQUAL .py) + ADD_TEST(${input} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + ELSE(ext STREQUAL .py) IF(WINDOWS) ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe) ELSE() ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe) ENDIF() + ENDIF(ext STREQUAL .py) SET_PROPERTY(TEST ${input} PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}") ENDFOREACH(input ${UNIT_TEST_PROG}) ''') -- 2.39.2