projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[libFuzzer] split the tests to run them in parallel, remove one redundant test
[oota-llvm.git]
/
lib
/
Fuzzer
/
test
/
CMakeLists.txt
diff --git
a/lib/Fuzzer/test/CMakeLists.txt
b/lib/Fuzzer/test/CMakeLists.txt
index fb3bf20ef806b8205d347b84bf1e3f69dad9ae53..674fcc3c9f8c69afe11b3460891a2fd48bd12fdb 100644
(file)
--- a/
lib/Fuzzer/test/CMakeLists.txt
+++ b/
lib/Fuzzer/test/CMakeLists.txt
@@
-2,21
+2,43
@@
# basic blocks and we'll fail to discover the targets.
# Also enable the coverage instrumentation back (it is disabled
# for the Fuzzer lib)
# basic blocks and we'll fail to discover the targets.
# Also enable the coverage instrumentation back (it is disabled
# for the Fuzzer lib)
-set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O0 -fsanitize-coverage=4")
+set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O0 -fsanitize-coverage=edge,indirect-calls")
+
+set(DFSanTests
+ MemcmpTest
+ SimpleCmpTest
+ StrcmpTest
+ StrncmpTest
+ SwitchTest
+ )
set(Tests
set(Tests
+ CallerCalleeTest
CounterTest
CounterTest
- CxxTokensTest
FourIndependentBranchesTest
FullCoverageSetTest
FourIndependentBranchesTest
FullCoverageSetTest
-
Infinite
Test
+
Memcmp
Test
NullDerefTest
NullDerefTest
+ SimpleCmpTest
+ SimpleDictionaryTest
+ SimpleHashTest
SimpleTest
SimpleTest
+ StrcmpTest
+ StrncmpTest
+ SwitchTest
TimeoutTest
)
TimeoutTest
)
-set(DFSanTests
- DFSanSimpleCmpTest
+set(CustomMainTests
+ UserSuppliedFuzzerTest
+ )
+
+set(UninstrumentedTests
+ UninstrumentedTest
+ )
+
+set(TraceBBTests
+ SimpleTest
)
set(TestBinaries)
)
set(TestBinaries)
@@
-31,6
+53,17
@@
foreach(Test ${Tests})
set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test})
endforeach()
set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test})
endforeach()
+foreach(Test ${CustomMainTests})
+ add_executable(LLVMFuzzer-${Test}
+ ${Test}.cpp
+ )
+ target_link_libraries(LLVMFuzzer-${Test}
+ LLVMFuzzerNoMain
+ )
+ set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test})
+endforeach()
+
+
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@@
-46,7
+79,7
@@
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
add_executable(LLVMFuzzer-Unittest
FuzzerUnittest.cpp
add_executable(LLVMFuzzer-Unittest
FuzzerUnittest.cpp
- $<TARGET_OBJECTS:LLVMFuzzerNoMain>
+ $<TARGET_OBJECTS:LLVMFuzzerNoMain
Objects
>
)
target_link_libraries(LLVMFuzzer-Unittest
)
target_link_libraries(LLVMFuzzer-Unittest
@@
-59,9
+92,20
@@
set(TestBinaries ${TestBinaries} LLVMFuzzer-Unittest)
add_subdirectory(dfsan)
foreach(Test ${DFSanTests})
add_subdirectory(dfsan)
foreach(Test ${DFSanTests})
- set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test})
+ set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-DFSan)
+endforeach()
+
+add_subdirectory(uninstrumented)
+
+foreach(Test ${UninstrumentedTests})
+ set(TestBinaries ${TestBinaries} LLVMFuzzer-${Test}-Uninstrumented)
endforeach()
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}
set_target_properties(${TestBinaries}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}