<commit_before>include(TestHelpers)

set(TEST_VARIABLES
  "TEST_BIN_PATH=${CMAKE_CURRENT_BINARY_DIR}/../server/kurento-media-server"
  "TEST_CONF_PATH=${CMAKE_BINARY_DIR}/config/kurento.conf.json"
  "GST_PLUGIN_PATH=$ENV{GST_PLUGIN_PATH}:${CMAKE_BINARY_DIR}"
  "KURENTO_MODULES_PATH=$ENV{KURENTO_MODULES_PATH}:${CMAKE_BINARY_DIR}"
  "BOOST_TEST_CATCH_SYSTEM_ERRORS=no"
)

add_definitions(-DBOOST_TEST_DYN_LINK)

add_library(base_test EXCLUDE_FROM_ALL BaseTest.cpp)
if(SANITIZERS_ENABLED)
  add_sanitizers(base_test)
endif()

set_property(TARGET base_test
  PROPERTY
    INCLUDE_DIRECTORIES
      ${KMSCORE_INCLUDE_DIRS}
      ${CMAKE_CURRENT_SOURCE_DIR}/../server/transport/websocket
)

target_link_libraries(base_test
  ${Boost_LIBRARIES}
)

if(NOT DEFINED DISABLE_NETWORK_TESTS OR NOT ${DISABLE_NETWORK_TESTS})

add_test_program(test_server_json server_json_test.cpp)
add_dependencies(test_server_json kurento-media-server)
target_link_libraries(test_server_json
  ${KMSCORE_LIBRARIES}
  ${Boost_LIBRARY}
  ${Boost_SYSTEM_LIBRARY}
  ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}<commit_msg>cmake: remove KURENTO_DOT_DIR, make GST_DEBUG_DUMP_DOT_DIR dir to work<commit_after>include(TestHelpers)

set(TEST_VARIABLES
  "TEST_BIN_PATH=${CMAKE_CURRENT_BINARY_DIR}/../server/kurento-media-server"
  "TEST_CONF_PATH=${CMAKE_BINARY_DIR}/config/kurento.conf.json"
  "GST_PLUGIN_PATH=${CMAKE_BINARY_DIR}:$ENV{GST_PLUGIN_PATH}"
  "KURENTO_MODULES_PATH=$ENV{KURENTO_MODULES_PATH}:${CMAKE_BINARY_DIR}"
  "BOOST_TEST_CATCH_SYSTEM_ERRORS=no"
)

add_definitions(-DBOOST_TEST_DYN_LINK)

add_library(base_test EXCLUDE_FROM_ALL BaseTest.cpp)
if(SANITIZERS_ENABLED)
  add_sanitizers(base_test)
endif()

set_property(TARGET base_test
  PROPERTY
    INCLUDE_DIRECTORIES
      ${KMSCORE_INCLUDE_DIRS}
      ${CMAKE_CURRENT_SOURCE_DIR}/../server/transport/websocket
)

target_link_libraries(base_test
  ${Boost_LIBRARIES}
)

if(NOT DEFINED DISABLE_NETWORK_TESTS OR NOT ${DISABLE_NETWORK_TESTS})

add_test_program(test_server_json server_json_test.cpp)
add_dependencies(test_server_json kurento-media-server)
target_link_libraries(test_server_json
  ${KMSCORE_LIBRARIES}
  ${Boost_LIBRARY}
  ${Boost_SYSTEM_LIBRARY}
  ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
{'fraction_non_alphanumeric': 0.09896536212325686, 'fraction_numerical': 0.0, 'mean_word_length': 8.928571428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3176158', 'n_tokens_mistral': 930, 'n_tokens_neox': 903, 'n_words': 80}