[llvm] r228045 - [fuzzer] Add proper dependensices to the fuzzer tests
Kostya Serebryany
kcc at google.com
Tue Feb 3 13:57:33 PST 2015
Author: kcc
Date: Tue Feb 3 15:57:32 2015
New Revision: 228045
URL: http://llvm.org/viewvc/llvm-project?rev=228045&view=rev
Log:
[fuzzer] Add proper dependensices to the fuzzer tests
Summary: Make sure that FileCheck is built when running check-fuzzer
Test Plan:
run on bot:
lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer
Reviewers: samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7387
Modified:
llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
llvm/trunk/lib/Fuzzer/test/lit.cfg
llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
Modified: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/CMakeLists.txt?rev=228045&r1=228044&r2=228045&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt (original)
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt Tue Feb 3 15:57:32 2015
@@ -56,5 +56,5 @@ set_target_properties(${TestBinaries}
add_lit_testsuite(check-fuzzer "Running Fuzzer tests"
${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${TestBinaries}
+ DEPENDS ${TestBinaries} FileCheck not
)
Modified: llvm/trunk/lib/Fuzzer/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/lit.cfg?rev=228045&r1=228044&r2=228045&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.cfg (original)
+++ llvm/trunk/lib/Fuzzer/test/lit.cfg Tue Feb 3 15:57:32 2015
@@ -4,3 +4,11 @@ config.name = "LLVMFuzzer"
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
+
Modified: llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in?rev=228045&r1=228044&r2=228045&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in (original)
+++ llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in Tue Feb 3 15:57:32 2015
@@ -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")
More information about the llvm-commits
mailing list