[PATCH] D73304: [libFuzzer] for lit, enable discovering test-suite in source tree
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 16:11:56 PST 2020
ychen created this revision.
ychen added reviewers: rnk, morehouse, george.karpenkov, kcc, jdenny.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.
so I could use llvm-lit /path/to/*.test. If preferred, this could
be done for other parts like ASan etc..
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73304
Files:
compiler-rt/test/fuzzer/CMakeLists.txt
compiler-rt/test/fuzzer/lit.site.cfg.py.in
Index: compiler-rt/test/fuzzer/lit.site.cfg.py.in
===================================================================
--- compiler-rt/test/fuzzer/lit.site.cfg.py.in
+++ compiler-rt/test/fuzzer/lit.site.cfg.py.in
@@ -12,6 +12,7 @@
config.llvm_library_dir = "@LLVM_LIBRARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
config.target_arch = "@LIBFUZZER_TEST_TARGET_ARCH@"
+config.test_exec_root = "@LIBFUZZER_TEST_EXEC_DIR@"
# Load common config for all compiler-rt lit tests.
lit_config.load_config(config,
Index: compiler-rt/test/fuzzer/CMakeLists.txt
===================================================================
--- compiler-rt/test/fuzzer/CMakeLists.txt
+++ compiler-rt/test/fuzzer/CMakeLists.txt
@@ -58,11 +58,14 @@
string(TOUPPER ${arch} ARCH_UPPER_CASE)
set(CONFIG_NAME ${ARCH_UPPER_CASE}${STDLIB_CAPITALIZED}${OS_NAME}Config)
+ set(LIBFUZZER_TEST_EXEC_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
# LIT-based libFuzzer tests.
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py
+ ${LIBFUZZER_TEST_EXEC_DIR}/lit.site.cfg.py
+ MAIN_CONFIG
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
)
add_lit_testsuite(check-fuzzer-${stdlib_name}-${arch}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73304.240040.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200124/9673cb56/attachment.bin>
More information about the llvm-commits
mailing list