Author: Congcong Cai
Date: 2025-05-27T05:56:48+08:00
New Revision: f1d8e37f2cdb7266633743072d885643c82a6e1c

URL: 
https://github.com/llvm/llvm-project/commit/f1d8e37f2cdb7266633743072d885643c82a6e1c
DIFF: 
https://github.com/llvm/llvm-project/commit/f1d8e37f2cdb7266633743072d885643c82a6e1c.diff

LOG: [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.

Added: 
    

Modified: 
    clang-tools-extra/clangd/test/path-mappings.test
    clang-tools-extra/clangd/test/system-include-extractor.test

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/test/path-mappings.test 
b/clang-tools-extra/clangd/test/path-mappings.test
index c566905c22eba..6b85c27be519d 100644
--- a/clang-tools-extra/clangd/test/path-mappings.test
+++ b/clang-tools-extra/clangd/test/path-mappings.test
@@ -2,7 +2,7 @@
 # RUN: rm -rf %t
 # RUN: cp -r %S/Inputs/path-mappings %t
 #
-# RUN: clangd --path-mappings 'C:\client=%t/server' -lit-test < %s | FileCheck 
-strict-whitespace %s
+# RUN: clangd --clang-tidy=false --path-mappings 'C:\client=%t/server' 
-lit-test < %s | FileCheck -strict-whitespace %s
 
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
 ---
 {

diff  --git a/clang-tools-extra/clangd/test/system-include-extractor.test 
b/clang-tools-extra/clangd/test/system-include-extractor.test
index 4ccc093671324..83a8c28bf7d56 100644
--- a/clang-tools-extra/clangd/test/system-include-extractor.test
+++ b/clang-tools-extra/clangd/test/system-include-extractor.test
@@ -52,7 +52,7 @@
 # Bless the mock driver we've just created so that clangd can execute it.
 # Note: include clangd's stderr in the FileCheck input with "2>&1" so that we
 # can match output lines like "ASTWorker building file"
-# RUN: clangd -lit-test -query-driver="**.test,**.sh" < %t.test 2>&1 | 
FileCheck -strict-whitespace %t.test
+# RUN: clangd --clang-tidy=false -lit-test -query-driver="**.test,**.sh" < 
%t.test 2>&1 | FileCheck -strict-whitespace %t.test
 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}
 ---
 {
@@ -88,4 +88,4 @@
 
 # Run clangd a second time, to make sure it picks up the driver name from the 
config file
 # Note, we need to pass -enable-config because -lit-test otherwise disables it
-# RUN: clangd -lit-test -enable-config -query-driver="**.test,**.sh" < %t.test 
2>&1 | FileCheck -strict-whitespace %t.test
+# RUN: clangd --clang-tidy=false -lit-test -enable-config 
-query-driver="**.test,**.sh" < %t.test 2>&1 | FileCheck -strict-whitespace 
%t.test


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to