Skip to content

Commit 9edcaf1

Browse files
committed
[LLDB] Make internal shell the default for running LLDB lit tests.
This patch updates the lld lit test config to use the internal shell by default. This has some performance advantages (~10-15%) and also produces nicer failure output. It also updates the two LLDB tests to not require shell (so that they run under the internal shell), after first verifying that they run and pass using the internal shell; and it fixes one test that was not passing under the internal shell.
1 parent 527c8ff commit 9edcaf1

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

lldb/test/Shell/Process/Optimization.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Test warnings.
2-
REQUIRES: shell, system-darwin
2+
REQUIRES: system-darwin
33
RUN: %clang_host -O3 %S/Inputs/true.c -std=c99 -g -o %t.exe
44
RUN: %lldb -o "b main" -o r -o q -b %t.exe 2>&1 | FileCheck %s
55

lldb/test/Shell/Process/UnsupportedLanguage.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Test unsupported language warning
22

3-
REQUIRES: shell
4-
53
RUN: %clang_host %S/Inputs/true.c -std=c99 -g -c -S -emit-llvm -o - \
64
RUN: | sed -e 's/DW_LANG_C99/DW_LANG_Mips_Assembler/g' >%t.ll
75
RUN: %clang_host %t.ll -g -o %t.exe

lldb/test/Shell/SymbolFile/DWARF/dwo-missing-error.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
# "a.out-dwo-missing-error.dwo".
1212
# RUN: rm -rf %t.compdir/
1313
# RUN: mkdir -p %t.compdir/a/b/
14-
# RUN: cd %t.compdir/a/b/
14+
# RUN: pushd %t.compdir/a/b/
1515
# RUN: %clang_host %S/Inputs/dwo-missing-error.c -glldb -gdwarf-5 \
1616
# RUN: -gsplit-dwarf -fdebug-prefix-map=%t.compdir=. -o a.out
1717
# RUN: rm *.dwo
1818
# RUN: %lldb a.out -s %s -o exit 2>&1 | FileCheck %s
19-
# RUN: cd -
19+
# RUN: popd
2020

2121
# Test the error message with an absolute DW_AT_comp_dir and DW_AT_dwo_name.
2222
# RUN: rm -rf %t.compdir/

lldb/test/lit.cfg.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,15 @@
1313
config.name = "lldb"
1414
config.test_source_root = os.path.dirname(__file__)
1515
config.test_exec_root = os.path.join(config.lldb_obj_root, "test")
16+
17+
# We prefer the lit internal shell which provides a better user experience on
18+
# failures and is faster unless the user explicitly disables it with
19+
# LIT_USE_INTERNAL_SHELL=0 env var.
20+
21+
use_lit_shell = True
22+
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
23+
if lit_shell_env:
24+
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
25+
26+
if use_lit_shell:
27+
os.environ["LIT_USE_INTERNAL_SHELL"] = "1"

0 commit comments

Comments
 (0)