]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
*** empty log message ***
authoradam <adam>
Thu, 22 Jul 2010 13:28:23 +0000 (13:28 +0000)
committeradam <adam>
Thu, 22 Jul 2010 13:28:23 +0000 (13:28 +0000)
salome_adm/cmake_files/am2cmake.py

index b010aa1be98f122a8c619089624085bd2ccbd86b..a95400848f23b488ae7b255b80dc6d478fc42824 100644 (file)
@@ -1267,18 +1267,24 @@ class CMakeFile(object):
         if self.__thedict__.has_key(key):
             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})
+            SET(test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${input})
             ELSE(ext STREQUAL .py)
             IF(WINDOWS)
-            ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe)
+            SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe)
             ELSE()
-            ADD_TEST(${input} ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe)
+            SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe)
             ENDIF()
             ENDIF(ext STREQUAL .py)
+            ADD_TEST(${input} ${test})
+            SET(fail_regex "KO")
             SET_PROPERTY(TEST ${input} PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}")
+            # IF(NOT WINDOWS)
+            # ADD_TEST(${input}_valgrind valgrind ${test})
+            # SET_PROPERTY(TEST ${input}_valgrind PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}")
+            # SET_PROPERTY(TEST ${input}_valgrind PROPERTY PASS_REGULAR_EXPRESSION "no leaks are possible")
+            # ENDIF()
             ENDFOREACH(input ${UNIT_TEST_PROG})
             ''')
             pass