Skip to content

Commit 25e218d

Browse files
[Clang] Enable lit internal shell by default
Now that all of the clang tests have been verified (and adjusted when necessary) to work with lit's internal shell, we can enable it by default, which this patch does. This should make check-clang 10-15% faster in addition to providing richer feedback on test failures. Reviewers: AaronBallman, petrhosek, rnk, ilovepi, shafik, cmtice Reviewed By: petrhosek, ilovepi, rnk, cmtice Pull Request: llvm#158465
1 parent 8326823 commit 25e218d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

clang/test/lit.cfg.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,22 @@
1818
# name: The name of this test suite.
1919
config.name = "Clang"
2020

21+
# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
22+
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
23+
#
24+
# We prefer the lit internal shell which provides a better user experience on failures
25+
# and is faster unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=0
26+
# env var.
27+
use_lit_shell = True
28+
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
29+
if lit_shell_env:
30+
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
31+
2132
# testFormat: The test format to use to interpret tests.
2233
#
2334
# For now we require '&&' between commands, until they get globally killed and
2435
# the test runner updated.
25-
config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
36+
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
2637

2738
# suffixes: A list of file extensions to treat as test files.
2839
config.suffixes = [

0 commit comments

Comments
 (0)