<commit_before>find_package(Threads REQUIRED)

include_directories(acutest/)

define_property(GLOBAL PROPERTY CHECK_PROGRAMS
  BRIEF_DOCS "Runtime Test Programs"
  FULL_DOCS "Runtime Test Programs")
set_property(GLOBAL PROPERTY CHECK_PROGRAMS "")

# Macro to set definitions
macro(FLB_RT_TEST BUILT src)
  if (${BUILT})
    list(APPEND CHECK_PROGRAMS
      ${src}
      )
  endif()
endmacro()

# Macro to set definitions
macro(FLB_RT_CORE_TEST BUILT src)
    list(APPEND CHECK_PROGRAMS
      ${src}
      )
endmacro()

# Core
FLB_RT_CORE_TEST(FLB_COROUTINE_TIMEOUT    "core-timeout.c")

# Input Plugins
FLB_RT_TEST(FLB_IN_EVENT_TEST   "in_event_test.c")

if(FLB_OUT_LIB)
  # These plugins works only on Linux
  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    FLB_RT_TEST(FLB_IN_CPU           "in_cpu.c")
    FLB_RT_TEST(FLB_IN_DISK          "in_disk.c")
    FLB_RT_TEST(FLB_IN_MEM           "in_mem.c")
    FLB_RT_TEST(FLB_IN_PROC          "in_proc.c")
    FLB_RT_TEST(FLB_IN_NETIF         "in_netif.c")
  endif()
  FLB_RT_TEST(FLB_IN_HEAD          "in_head.c")
  FLB_RT_TEST(FLB_IN_DUMMY         "in_dummy.c")
  FLB_RT_TEST(FLB_IN_DUMMY_THREAD  "in_dummy_thread.c")
  FLB_RT_TEST(FLB_IN_RANDOM        "in_random.c")
  FLB_RT_TEST(FLB_IN_STATSD        "in_statsd.c")
  FLB_RT_TEST(FLB_IN_SYSLOG        "in_syslog.c")
  FLB_RT_TEST(FLB_IN_TAIL          "in_tail.c")
  FLB_RT_TEST(FLB_IN_TCP          "in_tcp.c")
  FLB_RT_TEST(FLB_IN_FORWARD       "in_forward.c")
endif()

# Filter Plugins
if(FLB_IN_LIB AND FLB_OUT_LIB)
  FLB_RT_TEST(FLB_FILTER_CHECKLIST       "filter_checklist.c")
  FLB_RT_TEST(FLB_FILTER_EXPECT          "filter_expect.c")
  FLB_RT_TEST(FLB_FILTER_STDOUT          "filter_stdout.c")
  FLB_RT_TEST(FLB_FILTER_GREP            "filter_grep.c")
  FLB_RT_TEST(FLB_FILTER_THROTTLE        "filter_throttle.c")
  FLB_RT_TEST(FLB_FILTER_THROTTLE_SIZE   "filter_throttle_size.c")
  FLB_RT_TEST(FLB_FILTER_NEST       "filter_nest.c")
  FLB_RT_TEST(FLB_FILTER_NEST       "filter_rewrite_tag.c")
  FLB_RT_TEST(FLB_FILTER_KUBERNETES "filter_kubernetes.c")
  FLB_RT_TEST(FLB_FILTER_PARSER     "filter_parser.c")
  FLB_RT_TEST(FLB_FILTER_MODIFY     "filter_modify.c")
  FLB_RT_TEST(FLB_FILTER_LUA        "filter_lua.c")
  FLB_RT_TEST(FLB_FILTER_TYPE_CONVERTER "filter_type_converter.c")
  FLB_RT_TEST(FLB_FILTER_RECORD_MODIFIER "filter_record_modifier.c")
  FLB_RT_TEST(FLB_FILTER_MULTILINE       "filter_multiline.c")
endif()


# Output Plugins
if(FLB_IN_LIB)
  FLB_RT_TEST(FLB_OUT_LIB              "core_engine.c")
  FLB_RT_TEST(FLB_OUT_LIB              "config_map_opts.c")
  FLB_RT_TEST(FLB_OUT_COUNTER          "out_counter.c")
  FLB_RT_TEST(FLB_OUT_DATADOG          "out_datadog.c")
  FLB_RT_TEST(FLB_OUT_SKYWALKING       "out_skywalking.c")
  FLB_RT_TEST(FLB_OUT_ES               "out_elasticsearch.c")
  FLB_RT_TEST(FLB_OUT_OPENSEARCH       "out_opensearch.c")
  FLB_RT_TEST(FLB_OUT_EXIT             "out_exit.c")
  FLB_RT_TEST(FLB_OUT_FLOWCOUNTER      "out_flowcounter.c")
  FLB_RT_TEST(FLB_OUT_FORWARD          "out_forward.c")
  FLB_RT_TEST(FLB_OUT_HTTP             "out_http.c")
  FLB_RT_TEST(FLB_OUT_LOKI             "out_loki.c")
  FLB_RT_TEST(FLB_OUT_NULL             "out_null.c")
  FLB_RT_TEST(FLB_OUT_PLOT             "out_plot.c")
  FLB_RT_TEST(FLB_OUT_RETRY            "out_retry.c")
  FLB_RT_TEST(FLB_OUT_SPLUNK           "out_splunk.c")
  FLB_RT_TEST(FLB_OUT_STDOUT           "out_stdout.c")
  FLB_RT_TEST(FLB_OUT_SYSLOG           "out_syslog.c")
  FLB_RT_TEST(FLB_OUT_TCP              "out_tcp.c")

  if (FLB_RECORD_ACCESSOR)
    FLB_RT_TEST(FLB_OUT_STACKDRIVER      "out_stackdriver.c")
  endif()

  FLB_RT_TEST(FLB_OUT_CLOUDWATCH_LOGS   "out_cloudwatch.c")
    # These plugins works only on Linux
  if(NOT FLB_SYSTEM_WINDOWS)
    FLB_RT_TEST(FLB_OUT_KINESIS_FIREHOSE  "out_firehose.c")
    FLB_RT_TEST(FLB_OUT_KINESIS_STREAMS   "out_kinesis.c")
    FLB_RT_TEST(FLB_OUT_FILE              "out_file.c")
  endif()
  FLB_RT_TEST(FLB_OUT_S3                "out_s3.c")
  FLB_RT_TEST(FLB_OUT_TD                "out_td.c")
endif()


# HTTP Client Debug (requires -DFLB_HTTP_CLIENT_DEBUG=On)
if(FLB_HTTP_CLIENT_DEBUG)
  FLB_RT_TEST(FLB_OUT_TD           "http_callbacks.c")
endif()
<commit_msg>tests: runtime: enable tests for Kinesis and Firehose on Windows<commit_after>find_package(Threads REQUIRED)

include_directories(acutest/)

define_property(GLOBAL PROPERTY CHECK_PROGRAMS
  BRIEF_DOCS "Runtime Test Programs"
  FULL_DOCS "Runtime Test Programs")
set_property(GLOBAL PROPERTY CHECK_PROGRAMS "")

# Macro to set definitions
macro(FLB_RT_TEST BUILT src)
  if (${BUILT})
    list(APPEND CHECK_PROGRAMS
      ${src}
      )
  endif()
endmacro()

# Macro to set definitions
macro(FLB_RT_CORE_TEST BUILT src)
    list(APPEND CHECK_PROGRAMS
      ${src}
      )
endmacro()

# Core
FLB_RT_CORE_TEST(FLB_COROUTINE_TIMEOUT    "core-timeout.c")

# Input Plugins
FLB_RT_TEST(FLB_IN_EVENT_TEST   "in_event_test.c")

if(FLB_OUT_LIB)
  # These plugins works only on Linux
  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    FLB_RT_TEST(FLB_IN_CPU           "in_cpu.c")
    FLB_RT_TEST(FLB_IN_DISK          "in_disk.c")
    FLB_RT_TEST(FLB_IN_MEM           "in_mem.c")
    FLB_RT_TEST(FLB_IN_PROC          "in_proc.c")
    FLB_RT_TEST(FLB_IN_NETIF         "in_netif.c")
  endif()
  FLB_RT_TEST(FLB_IN_HEAD          "in_head.c")
  FLB_RT_TEST(FLB_IN_DUMMY         "in_dummy.c")
  FLB_RT_TEST(FLB_IN_DUMMY_THREAD  "in_dummy_thread.c")
  FLB_RT_TEST(FLB_IN_RANDOM        "in_random.c")
  FLB_RT_TEST(FLB_IN_STATSD        "in_statsd.c")
  FLB_RT_TEST(FLB_IN_SYSLOG        "in_syslog.c")
  FLB_RT_TEST(FLB_IN_TAIL          "in_tail.c")
  FLB_RT_TEST(FLB_IN_TCP          "in_tcp.c")
  FLB_RT_TEST(FLB_IN_FORWARD       "in_forward.c")
endif()

# Filter Plugins
if(FLB_IN_LIB AND FLB_OUT_LIB)
  FLB_RT_TEST(FLB_FILTER_CHECKLIST       "filter_checklist.c")
  FLB_RT_TEST(FLB_FILTER_EXPECT          "filter_expect.c")
  FLB_RT_TEST(FLB_FILTER_STDOUT          "filter_stdout.c")
  FLB_RT_TEST(FLB_FILTER_GREP            "filter_grep.c")
  FLB_RT_TEST(FLB_FILTER_THROTTLE        "filter_throttle.c")
  FLB_RT_TEST(FLB_FILTER_THROTTLE_SIZE   "filter_throttle_size.c")
  FLB_RT_TEST(FLB_FILTER_NEST       "filter_nest.c")
  FLB_RT_TEST(FLB_FILTER_NEST       "filter_rewrite_tag.c")
  FLB_RT_TEST(FLB_FILTER_KUBERNETES "filter_kubernetes.c")
  FLB_RT_TEST(FLB_FILTER_PARSER     "filter_parser.c")
  FLB_RT_TEST(FLB_FILTER_MODIFY     "filter_modify.c")
  FLB_RT_TEST(FLB_FILTER_LUA        "filter_lua.c")
  FLB_RT_TEST(FLB_FILTER_TYPE_CONVERTER "filter_type_converter.c")
  FLB_RT_TEST(FLB_FILTER_RECORD_MODIFIER "filter_record_modifier.c")
  FLB_RT_TEST(FLB_FILTER_MULTILINE       "filter_multiline.c")
endif()


# Output Plugins
if(FLB_IN_LIB)
  FLB_RT_TEST(FLB_OUT_LIB              "core_engine.c")
  FLB_RT_TEST(FLB_OUT_LIB              "config_map_opts.c")
  FLB_RT_TEST(FLB_OUT_COUNTER          "out_counter.c")
  FLB_RT_TEST(FLB_OUT_DATADOG          "out_datadog.c")
  FLB_RT_TEST(FLB_OUT_SKYWALKING       "out_skywalking.c")
  FLB_RT_TEST(FLB_OUT_ES               "out_elasticsearch.c")
  FLB_RT_TEST(FLB_OUT_OPENSEARCH       "out_opensearch.c")
  FLB_RT_TEST(FLB_OUT_EXIT             "out_exit.c")
  FLB_RT_TEST(FLB_OUT_FLOWCOUNTER      "out_flowcounter.c")
  FLB_RT_TEST(FLB_OUT_FORWARD          "out_forward.c")
  FLB_RT_TEST(FLB_OUT_HTTP             "out_http.c")
  FLB_RT_TEST(FLB_OUT_LOKI             "out_loki.c")
  FLB_RT_TEST(FLB_OUT_NULL             "out_null.c")
  FLB_RT_TEST(FLB_OUT_PLOT             "out_plot.c")
  FLB_RT_TEST(FLB_OUT_RETRY            "out_retry.c")
  FLB_RT_TEST(FLB_OUT_SPLUNK           "out_splunk.c")
  FLB_RT_TEST(FLB_OUT_STDOUT           "out_stdout.c")
  FLB_RT_TEST(FLB_OUT_SYSLOG           "out_syslog.c")
  FLB_RT_TEST(FLB_OUT_TCP              "out_tcp.c")

  if (FLB_RECORD_ACCESSOR)
    FLB_RT_TEST(FLB_OUT_STACKDRIVER      "out_stackdriver.c")
  endif()

  FLB_RT_TEST(FLB_OUT_CLOUDWATCH_LOGS   "out_cloudwatch.c")
  FLB_RT_TEST(FLB_OUT_KINESIS_FIREHOSE  "out_firehose.c")
  FLB_RT_TEST(FLB_OUT_KINESIS_STREAMS   "out_kinesis.c")
    # These plugins work only on Linux
  if(NOT FLB_SYSTEM_WINDOWS)
    FLB_RT_TEST(FLB_OUT_FILE              "out_file.c")
  endif()
  FLB_RT_TEST(FLB_OUT_S3                "out_s3.c")
  FLB_RT_TEST(FLB_OUT_TD                "out_td.c")
endif()


# HTTP Client Debug (requires -DFLB_HTTP_CLIENT_DEBUG=On)
if(FLB_HTTP_CLIENT_DEBUG)
  FLB_RT_TEST(FLB_OUT_TD           "http_callbacks.c")
endif()

{'fraction_non_alphanumeric': 0.09002835538752363, 'fraction_numerical': 0.0004725897920604915, 'mean_word_length': 3.5413090128755367, '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': '5028167', 'n_tokens_mistral': 3768, 'n_tokens_neox': 3715, 'n_words': 413}