Skip to content

Commit f1d8e37

Browse files
authored
[NFC][clangd][test] add clang-tidy config to ensure test cases sandbox (#141410)
Under previous test setup, the test result will be influenced by clang-tidy file in parent folder (between llvm-projects root and build folder). It is inconventient and leads some confusion. This PR wants to ensure sandbox to avoid outside's clang-tidy influenece test result.
1 parent deedc8a commit f1d8e37

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang-tools-extra/clangd/test/path-mappings.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: rm -rf %t
33
# RUN: cp -r %S/Inputs/path-mappings %t
44
#
5-
# RUN: clangd --path-mappings 'C:\client=%t/server' -lit-test < %s | FileCheck -strict-whitespace %s
5+
# RUN: clangd --clang-tidy=false --path-mappings 'C:\client=%t/server' -lit-test < %s | FileCheck -strict-whitespace %s
66
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
77
---
88
{

clang-tools-extra/clangd/test/system-include-extractor.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# Bless the mock driver we've just created so that clangd can execute it.
5353
# Note: include clangd's stderr in the FileCheck input with "2>&1" so that we
5454
# can match output lines like "ASTWorker building file"
55-
# RUN: clangd -lit-test -query-driver="**.test,**.sh" < %t.test 2>&1 | FileCheck -strict-whitespace %t.test
55+
# RUN: clangd --clang-tidy=false -lit-test -query-driver="**.test,**.sh" < %t.test 2>&1 | FileCheck -strict-whitespace %t.test
5656
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
5757
---
5858
{
@@ -88,4 +88,4 @@
8888

8989
# Run clangd a second time, to make sure it picks up the driver name from the config file
9090
# Note, we need to pass -enable-config because -lit-test otherwise disables it
91-
# RUN: clangd -lit-test -enable-config -query-driver="**.test,**.sh" < %t.test 2>&1 | FileCheck -strict-whitespace %t.test
91+
# RUN: clangd --clang-tidy=false -lit-test -enable-config -query-driver="**.test,**.sh" < %t.test 2>&1 | FileCheck -strict-whitespace %t.test

0 commit comments

Comments
 (0)