summaryrefslogtreecommitdiffstats
path: root/clangd/test/index-tools.test
diff options
context:
space:
mode:
Diffstat (limited to 'clangd/test/index-tools.test')
-rw-r--r--clangd/test/index-tools.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/clangd/test/index-tools.test b/clangd/test/index-tools.test
new file mode 100644
index 00000000..93cf56fe
--- /dev/null
+++ b/clangd/test/index-tools.test
@@ -0,0 +1,6 @@
+# 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.
+# REQUIRES: shell
+# RUN: if [ -f %clangd-benchmark-dir/IndexBenchmark ]; then %clangd-benchmark-dir/IndexBenchmark %t.index %p/Inputs/requests.json --benchmark_min_time=0.01 ; fi
+# Pass invalid JSON file and check that IndexBenchmark fails to parse it.
+# RUN: if [ -f %clangd-benchmark-dir/IndexBenchmark ]; then not %clangd-benchmark-dir/IndexBenchmark %t.index %t --benchmark_min_time=0.01 ; fi