<commit_before>set( TEST_EXECUTABLES test_log test_run_cmd test_auth_proto test_cmd_messages_proto )

set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIRECTORY}/tests )

include_directories( ${CMAKE_OUTPUT_DIRECTORY}/gen ${CMAKE_SOURCE_DIR}/library/src ${CMAKE_SOURCE_DIR}/library/test/mock ${GLIB2_INCLUDE_DIRS} )

set( PROTO_GEN_DIR ${CMAKE_BINARY_DIR}/gen )
set( WSH_PROTOC_SOURCES ${PROTO_GEN_DIR}/cmd-messages.pb-c.c ${PROTO_GEN_DIR}/auth.pb-c.c )
set_source_files_properties( ${WSH_PROTOC_SOURCES} PROPERTIES GENERATED TRUE )
set( SOURCES 
	${WSH_PROTOC_SOURCES}
	${CMAKE_SOURCE_DIR}/library/src/log.c
	${CMAKE_SOURCE_DIR}/library/src/cmd.c
	${CMAKE_SOURCE_DIR}/library/test/mock/syslog.c
)

foreach( TEST_EXECUTABLE ${TEST_EXECUTABLES} )
	add_executable( ${TEST_EXECUTABLE} ${TEST_EXECUTABLE}.c ${SOURCES} )
	add_test( ${TEST_EXECUTABLE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_EXECUTABLE} )
	target_link_libraries( ${TEST_EXECUTABLE} ${GLIB2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBRARIES} )
endforeach( TEST_EXECUTABLE )<commit_msg>Added protobuf-c include dir to library test files<commit_after>set( TEST_EXECUTABLES test_log test_run_cmd test_auth_proto test_cmd_messages_proto )

set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIRECTORY}/tests )

include_directories( 
	${CMAKE_OUTPUT_DIRECTORY}/gen
	${CMAKE_SOURCE_DIR}/library/src
	${CMAKE_SOURCE_DIR}/library/test/mock
	${GLIB2_INCLUDE_DIRS}
	${PROTOBUF_INCLUDE_DIR}
)

set( PROTO_GEN_DIR ${CMAKE_BINARY_DIR}/gen )
set( WSH_PROTOC_SOURCES ${PROTO_GEN_DIR}/cmd-messages.pb-c.c ${PROTO_GEN_DIR}/auth.pb-c.c )
set_source_files_properties( ${WSH_PROTOC_SOURCES} PROPERTIES GENERATED TRUE )
set( SOURCES 
	${WSH_PROTOC_SOURCES}
	${CMAKE_SOURCE_DIR}/library/src/log.c
	${CMAKE_SOURCE_DIR}/library/src/cmd.c
	${CMAKE_SOURCE_DIR}/library/test/mock/syslog.c
)

foreach( TEST_EXECUTABLE ${TEST_EXECUTABLES} )
	add_executable( ${TEST_EXECUTABLE} ${TEST_EXECUTABLE}.c ${SOURCES} )
	add_test( ${TEST_EXECUTABLE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_EXECUTABLE} )
	target_link_libraries( ${TEST_EXECUTABLE} ${GLIB2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBRARIES} )
endforeach( TEST_EXECUTABLE )
{'fraction_non_alphanumeric': 0.12207434603028912, 'fraction_numerical': 0.0018357044515832951, 'mean_word_length': 8.732142857142858, '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': '5420210', 'n_tokens_mistral': 905, 'n_tokens_neox': 845, 'n_words': 106}