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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2015-12-02 02:49:37 +00:00
parent 0445c4d68b
commit 569415a25b
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()