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
   )


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
   )
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to