Skip to content

Commit 62ccea6

Browse files
Reapply "[lld] Make lld tests use lit internal shell by default"
This reverts commit 2b9328c. This was broken originally because echo -e does not work on MacOS. This has been fixed by the previous commit which updates the relevant tests to use printf.
1 parent efbf5f5 commit 62ccea6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lld/test/lit.cfg.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,21 @@
1616
# name: The name of this test suite.
1717
config.name = "lld"
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+
# and is faster unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=0
24+
# env var.
25+
use_lit_shell = True
26+
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
27+
if lit_shell_env:
28+
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
29+
1930
# testFormat: The test format to use to interpret tests.
2031
#
2132
# For now we require '&&' between commands, until they get globally killed and the test runner updated.
22-
config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
33+
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
2334

2435
# suffixes: A list of file extensions to treat as test files.
2536
config.suffixes = [".ll", ".s", ".test", ".yaml", ".objtxt"]

0 commit comments

Comments
 (0)