From: adam Date: Wed, 21 Jul 2010 08:34:54 +0000 (+0000) Subject: add make test for UNIT_TEST_PROG X-Git-Tag: V5_1_5a1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bec7bbacb89c7c496c0beead805a30fcdca8b0f;p=modules%2Fkernel.git add make test for UNIT_TEST_PROG --- diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index b2c757193..809219c09 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -438,6 +438,10 @@ class CMakeFile(object): ENDIF(COMMAND cmake_policy) """) # -- + newlines.append(""" + ENABLE_TESTING() + """) + # -- if self.module == "kernel": newlines.append(""" INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) @@ -1255,6 +1259,24 @@ class CMakeFile(object): ENDFOREACH(input ${SIP_FILES}) ''') pass + + # -- + # For make check + # -- + key = "UNIT_TEST_PROG" + if self.__thedict__.has_key(key): + newlines.append(''' + FOREACH(input ${UNIT_TEST_PROG}) + SET(fail_regex "KO") + IF(WINDOWS) + ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe) + ELSE() + ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe) + ENDIF() + SET_PROPERTY(TEST ${input} PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}") + ENDFOREACH(input ${UNIT_TEST_PROG}) + ''') + pass # -- # Treat the install targets