Skip to content

Commit 4935451

Browse files
boomanaiden154github-actions[bot]
authored andcommitted
Automerge: [clangd] Enable lit internal shell by default
Enable it now that all of the tests pass under the internal shell. The internal shell is slightly faster (10-15%) and also provides a better debugging experience. Reviewers: petrhosek, ilovepi, kadircet, HighCommander4 Reviewed By: ilovepi Pull Request: llvm/llvm-project#169540
2 parents a921693 + c51c382 commit 4935451

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

clang-tools-extra/clangd/test/lit.cfg.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1+
import os
2+
13
import lit.llvm
24

35
lit.llvm.initialize(lit_config, config)
46
lit.llvm.llvm_config.clang_setup()
57
lit.llvm.llvm_config.use_default_substitutions()
68

9+
# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
10+
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
11+
#
12+
# We prefer the lit internal shell which provides a better user experience on failures
13+
# and is faster unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=0
14+
# env var.
15+
use_lit_shell = True
16+
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
17+
if lit_shell_env:
18+
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
19+
720
config.name = "Clangd"
821
config.suffixes = [".test"]
922
config.excludes = ["Inputs"]
10-
config.test_format = lit.formats.ShTest(not lit.llvm.llvm_config.use_lit_shell)
23+
config.test_format = lit.formats.ShTest(not use_lit_shell)
1124
config.test_source_root = config.clangd_source_dir + "/test"
1225
config.test_exec_root = config.clangd_binary_dir + "/test"
1326

0 commit comments

Comments
 (0)