[PATCH] D73304: [compiler-rt] enable test-suite discovery in source tree for libFuzzer & profile
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 23:01:31 PST 2020
ychen updated this revision to Diff 240093.
ychen added a comment.
- enable profile test-suite discovery
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73304/new/
https://reviews.llvm.org/D73304
Files:
compiler-rt/test/fuzzer/CMakeLists.txt
compiler-rt/test/fuzzer/lit.site.cfg.py.in
compiler-rt/test/profile/CMakeLists.txt
Index: compiler-rt/test/profile/CMakeLists.txt
===================================================================
--- compiler-rt/test/profile/CMakeLists.txt
+++ compiler-rt/test/profile/CMakeLists.txt
@@ -16,9 +16,12 @@
set(PROFILE_TEST_TARGET_ARCH ${arch})
get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS)
set(CONFIG_NAME Profile-${arch})
+ set(LIBFUZZER_TEST_EXEC_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
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
)
list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
endforeach()
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.240093.patch
Type: text/x-patch
Size: 2112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200124/b3dd8c11/attachment.bin>
More information about the llvm-commits
mailing list