Skip to content

Commit 1ef9c3a

Browse files
boomanaiden154github-actions[bot]
authored andcommitted
Automerge: [flang-rt] Enable lit internal shell by default (#156095)
This patch enables the lit internal shell by default for testing flang-rt. The lit internal shell is able to run tests a bit faster as it avoids having to fork bash for every run line and also produces nicer debug information on failures. This is part of #102704.
2 parents 4d06b45 + 317e9fc commit 1ef9c3a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

flang-rt/test/lit.cfg.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,21 @@ def shjoin(args, sep=" "):
1616
# name: The name of this test suite.
1717
config.name = "flang-rt"
1818

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

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

0 commit comments

Comments
 (0)