[PATCH] [fuzzer] Add proper dependensices to the fuzzer tests
Kostya Serebryany
kcc at google.com
Tue Feb 3 13:00:20 PST 2015
Hi samsonov,
Make sure that FileCheck is built when running check-fuzzer
http://reviews.llvm.org/D7387
Files:
lib/Fuzzer/test/CMakeLists.txt
lib/Fuzzer/test/lit.cfg
lib/Fuzzer/test/lit.site.cfg.in
Index: lib/Fuzzer/test/CMakeLists.txt
===================================================================
--- lib/Fuzzer/test/CMakeLists.txt
+++ lib/Fuzzer/test/CMakeLists.txt
@@ -56,5 +56,5 @@
add_lit_testsuite(check-fuzzer "Running Fuzzer tests"
${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${TestBinaries}
+ DEPENDS ${TestBinaries} FileCheck not
)
Index: lib/Fuzzer/test/lit.cfg
===================================================================
--- lib/Fuzzer/test/lit.cfg
+++ lib/Fuzzer/test/lit.cfg
@@ -4,3 +4,11 @@
config.test_format = lit.formats.ShTest(True)
config.suffixes = ['.test']
config.test_source_root = os.path.dirname(__file__)
+
+# Tweak PATH to include llvm tools dir.
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):
+ lit_config.fatal("Invalid llvm_tools_dir config attribute: %r" % llvm_tools_dir)
+path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+config.environment['PATH'] = path
+
Index: lib/Fuzzer/test/lit.site.cfg.in
===================================================================
--- lib/Fuzzer/test/lit.site.cfg.in
+++ lib/Fuzzer/test/lit.site.cfg.in
@@ -1,2 +1,3 @@
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7387.19258.patch
Type: text/x-patch
Size: 1390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150203/3eed345a/attachment.bin>
More information about the llvm-commits
mailing list