summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-02-03 21:57:32 +0000
committerKostya Serebryany <kcc@google.com>2015-02-03 21:57:32 +0000
commitcf9fdd58763580af4c3ef851dac8016883350480 (patch)
tree2b057f7d120917030a83481e2ba6ddbe084635de /llvm/lib/Fuzzer/test
parent1fff318a413265c9966eec451fee01174b0ea07c (diff)
downloadbcm5719-llvm-cf9fdd58763580af4c3ef851dac8016883350480.tar.gz
bcm5719-llvm-cf9fdd58763580af4c3ef851dac8016883350480.zip
[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 llvm-svn: 228045
Diffstat (limited to 'llvm/lib/Fuzzer/test')
-rw-r--r--llvm/lib/Fuzzer/test/CMakeLists.txt2
-rw-r--r--llvm/lib/Fuzzer/test/lit.cfg8
-rw-r--r--llvm/lib/Fuzzer/test/lit.site.cfg.in1
3 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/CMakeLists.txt b/llvm/lib/Fuzzer/test/CMakeLists.txt
index 2b94b4b49ae..eb3c1eee7c1 100644
--- a/llvm/lib/Fuzzer/test/CMakeLists.txt
+++ b/llvm/lib/Fuzzer/test/CMakeLists.txt
@@ -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
)
diff --git a/llvm/lib/Fuzzer/test/lit.cfg b/llvm/lib/Fuzzer/test/lit.cfg
index d1c85051b47..834a16aefe7 100644
--- a/llvm/lib/Fuzzer/test/lit.cfg
+++ b/llvm/lib/Fuzzer/test/lit.cfg
@@ -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
+
diff --git a/llvm/lib/Fuzzer/test/lit.site.cfg.in b/llvm/lib/Fuzzer/test/lit.site.cfg.in
index 5fedc1dff6f..e520db8e881 100644
--- a/llvm/lib/Fuzzer/test/lit.site.cfg.in
+++ b/llvm/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")
OpenPOWER on IntegriCloud