[PATCH] D52030: [clangd] Test benchmark if we can build it
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 13 05:59:33 PDT 2018
sammccall created this revision.
sammccall added a reviewer: kbobyrev.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov, mgorny.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52030
Files:
test/CMakeLists.txt
test/clangd/index-tools.test
Index: test/clangd/index-tools.test
===================================================================
--- test/clangd/index-tools.test
+++ test/clangd/index-tools.test
@@ -1,3 +1,3 @@
# RUN: clangd-indexer %p/Inputs/BenchmarkSource.cpp -- -I%p/Inputs > %t.index
-# FIXME: By default, benchmarks are excluded from the list of default targets hence not built. Find a way to depend on benchmarks to run the next command.
+# FIXME: This is fragile. Can we express the LLVM_BUILD_BENCHMARKS dep directly?
# RUN: if [ -f %clangd-benchmark-dir/IndexBenchmark ]; then %clangd-benchmark-dir/IndexBenchmark %t.index %p/Inputs/requests.log --benchmark_min_time=0.01 ; fi
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -72,6 +72,13 @@
)
endif()
+# clangd's benchmark has an optional test.
+if(LLVM_BUILD_BENCHMARKS)
+ list(APPEND CLANG_TOOLS_TEST_DEPS
+ IndexBenchmark
+ )
+endif()
+
set(llvm_utils
FileCheck count not
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52030.165265.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180913/e3b5fc21/attachment.bin>
More information about the cfe-commits
mailing list