[libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb

llvm-svn: 254484
This commit is contained in:
Kostya Serebryany 2015-12-02 02:49:37 +00:00
parent 6c19d8c2ac
commit fba04273b7
2 changed files with 22 additions and 0 deletions

View File

@ -38,6 +38,9 @@ set(UninstrumentedTests
UninstrumentedTest
)
set(TraceBBTests
SimpleTest
)
set(TestBinaries)
@ -99,6 +102,11 @@ foreach(Test ${UninstrumentedTests})
set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-Uninstrumented)
endforeach()
add_subdirectory(trace-bb)
foreach(Test ${TraceBBTests})
set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-TraceBB)
endforeach()
set_target_properties(${TestBinaries}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

View File

@ -0,0 +1,14 @@
# These tests are not instrumented with coverage.
set(CMAKE_CXX_FLAGS_RELEASE
"${LIBFUZZER_FLAGS_BASE} -fsanitize-coverage=edge,trace-bb")
foreach(Test ${TraceBBTests})
add_executable(LLVMFuzzer-${Test}-TraceBB
../${Test}.cpp
)
target_link_libraries(LLVMFuzzer-${Test}-TraceBB
LLVMFuzzer
)
endforeach()