1 FILE(GLOB test_cases "test-*.c") 2 3 MACRO(ADD_FUZZER_TEST name) 4 ADD_EXECUTABLE(${name} ${name}.c) 5 TARGET_COMPILE_OPTIONS(${name} PRIVATE -g -O1 -fno-omit-frame-pointer -fsanitize=fuzzer,address,leak,undefined) 6 TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR}) 7 TARGET_LINK_OPTIONS(${name} PRIVATE -stdlib=libc++ -fsanitize=fuzzer,address,leak,undefined) 8 TARGET_LINK_LIBRARIES(${name} ubus ubusd_library ${ubox_library} ${blob_library} ${json}) 9 ADD_TEST( 10 NAME ${name} 11 COMMAND ${name} -max_len=256 -timeout=10 -max_total_time=300 ${CMAKE_CURRENT_SOURCE_DIR}/corpus 12 ) 13 ENDMACRO(ADD_FUZZER_TEST) 14 15 FOREACH(test_case ${test_cases}) 16 GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE) 17 ADD_FUZZER_TEST(${test_case}) 18 ENDFOREACH(test_case)
This page was automatically generated by LXR 0.3.1. • OpenWrt