[Lldb-commits] [lldb] acda2bc - [lldb/Reproducers] Propagate LLDB_CAPTURE_REPRODUCER to the test suite
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 4 16:49:23 PST 2019
Author: Jonas Devlieghere
Date: 2019-12-04T16:49:11-08:00
New Revision: acda2bc0adf62d9e54bf6d284f91e6cfa5b3cc6e
URL: https://github.com/llvm/llvm-project/commit/acda2bc0adf62d9e54bf6d284f91e6cfa5b3cc6e
DIFF: https://github.com/llvm/llvm-project/commit/acda2bc0adf62d9e54bf6d284f91e6cfa5b3cc6e.diff
LOG: [lldb/Reproducers] Propagate LLDB_CAPTURE_REPRODUCER to the test suite
Added:
Modified:
lldb/test/API/lit.cfg.py
lldb/test/Shell/Reproducer/lit.local.cfg
lldb/test/Shell/lit.cfg.py
Removed:
################################################################################
diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 06125a1aaedd..9b1c3c12f172 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -54,6 +54,11 @@ def find_shlibpath_var():
lit_config.warning("unable to inject shared library path on '{}'".format(
platform.system()))
+# Propagate LLDB_CAPTURE_REPRODUCER
+if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
+ config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
+ 'LLDB_CAPTURE_REPRODUCER']
+
# Clean the module caches in the test build directory. This is necessary in an
# incremental build whenever clang changes underneath, so doing it once per
# lit.py invocation is close enough.
diff --git a/lldb/test/Shell/Reproducer/lit.local.cfg b/lldb/test/Shell/Reproducer/lit.local.cfg
index 7386b8655d1e..dbb37b199d78 100644
--- a/lldb/test/Shell/Reproducer/lit.local.cfg
+++ b/lldb/test/Shell/Reproducer/lit.local.cfg
@@ -1,3 +1,6 @@
# Enable crash reports for the reproducer tests.
-del config.environment['LLVM_DISABLE_CRASH_REPORT']
-del config.environment['LLDB_CAPTURE_REPRODUCER']
+if 'LLVM_DISABLE_CRASH_REPORT' in config.environment:
+ del config.environment['LLVM_DISABLE_CRASH_REPORT']
+
+if 'LLDB_CAPTURE_REPRODUCER' in config.environment:
+ del config.environment['LLDB_CAPTURE_REPRODUCER']
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 84c5b730dd31..68891e600169 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -38,6 +38,10 @@
# test_exec_root: The root path where tests should be run.
config.test_exec_root = os.path.join(config.lldb_obj_root, 'test')
+# Propagate LLDB_CAPTURE_REPRODUCER
+if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
+ config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
+ 'LLDB_CAPTURE_REPRODUCER']
llvm_config.use_default_substitutions()
toolchain.use_lldb_substitutions(config)
More information about the lldb-commits
mailing list