Skip to content

Commit acda2bc

Browse files
committed
[lldb/Reproducers] Propagate LLDB_CAPTURE_REPRODUCER to the test suite
1 parent dfe9a79 commit acda2bc

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

lldb/test/API/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def find_shlibpath_var():
5454
lit_config.warning("unable to inject shared library path on '{}'".format(
5555
platform.system()))
5656

57+
# Propagate LLDB_CAPTURE_REPRODUCER
58+
if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
59+
config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
60+
'LLDB_CAPTURE_REPRODUCER']
61+
5762
# Clean the module caches in the test build directory. This is necessary in an
5863
# incremental build whenever clang changes underneath, so doing it once per
5964
# lit.py invocation is close enough.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Enable crash reports for the reproducer tests.
2-
del config.environment['LLVM_DISABLE_CRASH_REPORT']
3-
del config.environment['LLDB_CAPTURE_REPRODUCER']
2+
if 'LLVM_DISABLE_CRASH_REPORT' in config.environment:
3+
del config.environment['LLVM_DISABLE_CRASH_REPORT']
4+
5+
if 'LLDB_CAPTURE_REPRODUCER' in config.environment:
6+
del config.environment['LLDB_CAPTURE_REPRODUCER']

lldb/test/Shell/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
# test_exec_root: The root path where tests should be run.
3939
config.test_exec_root = os.path.join(config.lldb_obj_root, 'test')
4040

41+
# Propagate LLDB_CAPTURE_REPRODUCER
42+
if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
43+
config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
44+
'LLDB_CAPTURE_REPRODUCER']
4145

4246
llvm_config.use_default_substitutions()
4347
toolchain.use_lldb_substitutions(config)

0 commit comments

Comments
 (0)