<commit_before># -*- cmake -*-
# This is the test cmake configuration
# built from @CMAKE_SOURCE_DIR@/cmake/CMakeListsForTests.cmake.in 
SET(SOURCE_DIR @CMAKE_CURRENT_SOURCE_DIR@/@_CURRENT_TEST_DIRECTORY@)

# Note Franck : it seems that all the following is already done during BEGIN_TEST call, is it? --> I comment ...
#FILE(GLOB TESTS_XML ${SOURCE_DIR}/*.xml)
#FOREACH(_F ${TESTS_XML})
#  GET_FILENAME_COMPONENT(TEST_XML ${_F} NAME)
  #  MESSAGE(STATUS "Found xml file : ${_F}")
  #  MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${TEST_XML}")
#  CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_XML}  @COPYONLY)
#ENDFOREACH(_F ${TESTS_XML})
#FILE(GLOB TESTS_REF ${SOURCE_DIR}/*.ref)
#FOREACH(_F ${TESTS_REF})
#  GET_FILENAME_COMPONENT(TEST_REF ${_F} NAME)
  #MESSAGE(STATUS "Found ref file : ${_F}")
  #MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${TEST_REF}")
#  CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_REF}  @COPYONLY)
#ENDFOREACH(_F ${TESTS_REF})

FOREACH(_EXE ${_EXE_LIST_${_CURRENT_TEST_DIRECTORY}})
  MESSAGE(STATUS "Adding test suite ${_CURRENT_TEST_DIRECTORY}/${_EXE}")
  SET(EXECUTABLE_OUTPUT_PATH @CMAKE_CURRENT_BINARY_DIR@/@_CURRENT_TEST_DIRECTORY@)
  
  FOREACH(_D ${${PROJECT_NAME}_INCLUDE_DIRECTORIES})
    INCLUDE_DIRECTORIES(${_D})
  ENDFOREACH(_D ${${PROJECT_NAME}_INCLUDE_DIRECTORIES}) 
  FOREACH(_D ${${PROJECT_NAME}_LINK_DIRECTORIES})
    LINK_DIRECTORIES(${_D})
  ENDFOREACH(_D ${${PROJECT_NAME}_LINK_DIRECTORIES})
  
  # a wrapper around test
  IF(TEST_WRAP)
    ADD_EXECUTABLE(${_EXE}.ldwrap ${_EXE}.ldwrap.c)
  ENDIF(TEST_WRAP)

  ADD_EXECUTABLE(${_EXE} ${${_EXE}_FSOURCES})
  
  # project name shared or static lib
  IF(${PROJECT_NAME}_SHARED_LIB)
    ADD_DEPENDENCIES(${_EXE} ${PROJECT_NAME}_shared)
    TARGET_LINK_LIBRARIES(${_EXE} ${${PROJECT_NAME}_SHARED_LIB})
  ELSE(${PROJECT_NAME}_SHARED_LIB)
    IF(${PROJECT_NAME}_STATIC_LIB)
      ADD_DEPENDENCIES(${_EXE} ${PROJECT_NAME}_static)
      TARGET_LINK_LIBRARIES(${_EXE} ${${PROJECT_NAME}_STATIC_LIB})
    ENDIF(${PROJECT_NAME}_STATIC_LIB)
  ENDIF(${PROJECT_NAME}_SHARED_LIB)
  FOREACH(_L ${${PROJECT_NAME}_LINK_LIBRARIES})
    TARGET_LINK_LIBRARIES(${_EXE} ${_L})
  ENDFOREACH(_L ${${PROJECT_NAME}_TARGET_LINK_LIBRARIES})
  
  IF(CPPUNIT_FOUND)
	
    # each test in the test suite becomes a cmake test
    ADD_CUSTOM_COMMAND(TARGET ${_EXE}
      POST_BUILD
      COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${_EXE}
      ARGS --cdash-prepare > ${CMAKE_CURRENT_BINARY_DIR}/${_EXE}.cmake
      COMMENT "Generating ${_EXE}.cmake")
	
    SET_DIRECTORY_PROPERTIES(PROPERTIES TEST_INCLUDE_FILE
      "${CMAKE_CURRENT_BINARY_DIR}/${_EXE}.cmake")
	
    ELSE(CPPUNIT_FOUND)
      
      IF(TEST_WRAP)
        ADD_TEST(${_EXE} ${_EXE}.ldwrap)
      ELSE(TEST_WRAP)
        ADD_TEST(${_EXE} ${_EXE})
      ENDIF(TEST_WRAP)

      SET_TESTS_PROPERTIES(${_EXE} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;failed;ERROR;test unsucceeded")
	  # Note Franck : I try to set DYLD ... useless for the moment
      set_test_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=@LD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
      if(APPLE)
		set_test_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=@DYLD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
	  endif()
	  
      IF(${_EXE}_PROPERTIES)
        SET_TESTS_PROPERTIES(${_EXE} PROPERTIES ${${_EXE}_PROPERTIES})
      ENDIF(${_EXE}_PROPERTIES)
    
    ENDIF(CPPUNIT_FOUND)

ENDFOREACH(_EXE ${_EXE_LIST_${_CURRENT_TEST_DIRECTORY}})
<commit_msg>cmake failed because of typo set_test_properties instead of set_tests_properties : now it works<commit_after># -*- cmake -*-
# This is the test cmake configuration
# built from @CMAKE_SOURCE_DIR@/cmake/CMakeListsForTests.cmake.in 
SET(SOURCE_DIR @CMAKE_CURRENT_SOURCE_DIR@/@_CURRENT_TEST_DIRECTORY@)

# Note Franck : it seems that all the following is already done during BEGIN_TEST call, is it? --> I comment ...
#FILE(GLOB TESTS_XML ${SOURCE_DIR}/*.xml)
#FOREACH(_F ${TESTS_XML})
#  GET_FILENAME_COMPONENT(TEST_XML ${_F} NAME)
  #  MESSAGE(STATUS "Found xml file : ${_F}")
  #  MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${TEST_XML}")
#  CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_XML}  @COPYONLY)
#ENDFOREACH(_F ${TESTS_XML})
#FILE(GLOB TESTS_REF ${SOURCE_DIR}/*.ref)
#FOREACH(_F ${TESTS_REF})
#  GET_FILENAME_COMPONENT(TEST_REF ${_F} NAME)
  #MESSAGE(STATUS "Found ref file : ${_F}")
  #MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${TEST_REF}")
#  CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_REF}  @COPYONLY)
#ENDFOREACH(_F ${TESTS_REF})

FOREACH(_EXE ${_EXE_LIST_${_CURRENT_TEST_DIRECTORY}})
  MESSAGE(STATUS "Adding test suite ${_CURRENT_TEST_DIRECTORY}/${_EXE}")
  SET(EXECUTABLE_OUTPUT_PATH @CMAKE_CURRENT_BINARY_DIR@/@_CURRENT_TEST_DIRECTORY@)
  
  FOREACH(_D ${${PROJECT_NAME}_INCLUDE_DIRECTORIES})
    INCLUDE_DIRECTORIES(${_D})
  ENDFOREACH(_D ${${PROJECT_NAME}_INCLUDE_DIRECTORIES}) 
  FOREACH(_D ${${PROJECT_NAME}_LINK_DIRECTORIES})
    LINK_DIRECTORIES(${_D})
  ENDFOREACH(_D ${${PROJECT_NAME}_LINK_DIRECTORIES})
  
  # a wrapper around test
  IF(TEST_WRAP)
    ADD_EXECUTABLE(${_EXE}.ldwrap ${_EXE}.ldwrap.c)
  ENDIF(TEST_WRAP)

  ADD_EXECUTABLE(${_EXE} ${${_EXE}_FSOURCES})
  
  # project name shared or static lib
  IF(${PROJECT_NAME}_SHARED_LIB)
    ADD_DEPENDENCIES(${_EXE} ${PROJECT_NAME}_shared)
    TARGET_LINK_LIBRARIES(${_EXE} ${${PROJECT_NAME}_SHARED_LIB})
  ELSE(${PROJECT_NAME}_SHARED_LIB)
    IF(${PROJECT_NAME}_STATIC_LIB)
      ADD_DEPENDENCIES(${_EXE} ${PROJECT_NAME}_static)
      TARGET_LINK_LIBRARIES(${_EXE} ${${PROJECT_NAME}_STATIC_LIB})
    ENDIF(${PROJECT_NAME}_STATIC_LIB)
  ENDIF(${PROJECT_NAME}_SHARED_LIB)
  FOREACH(_L ${${PROJECT_NAME}_LINK_LIBRARIES})
    TARGET_LINK_LIBRARIES(${_EXE} ${_L})
  ENDFOREACH(_L ${${PROJECT_NAME}_TARGET_LINK_LIBRARIES})
  
  IF(CPPUNIT_FOUND)
	
    # each test in the test suite becomes a cmake test
    ADD_CUSTOM_COMMAND(TARGET ${_EXE}
      POST_BUILD
      COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${_EXE}
      ARGS --cdash-prepare > ${CMAKE_CURRENT_BINARY_DIR}/${_EXE}.cmake
      COMMENT "Generating ${_EXE}.cmake")
	
    SET_DIRECTORY_PROPERTIES(PROPERTIES TEST_INCLUDE_FILE
      "${CMAKE_CURRENT_BINARY_DIR}/${_EXE}.cmake")
	
    ELSE(CPPUNIT_FOUND)
      
      IF(TEST_WRAP)
        ADD_TEST(${_EXE} ${_EXE}.ldwrap)
      ELSE(TEST_WRAP)
        ADD_TEST(${_EXE} ${_EXE})
      ENDIF(TEST_WRAP)

      SET_TESTS_PROPERTIES(${_EXE} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;failed;ERROR;test unsucceeded")
	  # Note Franck : I try to set DYLD ... useless for the moment
      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=@LD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
      if(APPLE)
		set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=@DYLD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
	  endif()
	  
      IF(${_EXE}_PROPERTIES)
        SET_TESTS_PROPERTIES(${_EXE} PROPERTIES ${${_EXE}_PROPERTIES})
      ENDIF(${_EXE}_PROPERTIES)
    
    ENDIF(CPPUNIT_FOUND)

ENDFOREACH(_EXE ${_EXE_LIST_${_CURRENT_TEST_DIRECTORY}})

{'fraction_non_alphanumeric': 0.1365163819658359, 'fraction_numerical': 0.0, 'mean_word_length': 5.707042253521127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5614475', 'n_tokens_mistral': 2965, 'n_tokens_neox': 2806, 'n_words': 403}