Author: Jonas Devlieghere Date: 2021-03-09T10:44:34-08:00 New Revision: c2d2adbce9299e562abd00b8f3139933beb97e17
URL: https://github.com/llvm/llvm-project/commit/c2d2adbce9299e562abd00b8f3139933beb97e17 DIFF: https://github.com/llvm/llvm-project/commit/c2d2adbce9299e562abd00b8f3139933beb97e17.diff LOG: [lldb] Propagate XDG_CACHE_HOME environment variable to tests This variable is used to reducing the likelihood of hitting module cache issues in CI where different branches can potentially run on the same machine. Added: Modified: lldb/test/API/lit.cfg.py lldb/test/Shell/lit.cfg.py lldb/test/Unit/lit.cfg.py Removed: ################################################################################ diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index 08e2dcc1ef80..54a02453b174 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -129,11 +129,6 @@ def delete_module_cache(path): 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'] - # Support running the test suite under the lldb-repro wrapper. This makes it # possible to capture a test suite run and then rerun all the test from the # just captured reproducer. @@ -256,3 +251,12 @@ def delete_module_cache(path): if 'FREEBSD_LEGACY_PLUGIN' in os.environ: config.environment['FREEBSD_LEGACY_PLUGIN'] = os.environ[ 'FREEBSD_LEGACY_PLUGIN'] + +# Propagate LLDB_CAPTURE_REPRODUCER +if 'LLDB_CAPTURE_REPRODUCER' in os.environ: + config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[ + 'LLDB_CAPTURE_REPRODUCER'] + +# Propagate XDG_CACHE_HOME +if 'XDG_CACHE_HOME' in os.environ: + config.environment['XDG_CACHE_HOME'] = os.environ['XDG_CACHE_HOME'] diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py index fb9412b35be8..1e793846023a 100644 --- a/lldb/test/Shell/lit.cfg.py +++ b/lldb/test/Shell/lit.cfg.py @@ -45,6 +45,7 @@ 'LLDB_CAPTURE_REPRODUCER', 'TEMP', 'TMP', + 'XDG_CACHE_HOME', ]) # Support running the test suite under the lldb-repro wrapper. This makes it diff --git a/lldb/test/Unit/lit.cfg.py b/lldb/test/Unit/lit.cfg.py index 69aab2a4a29f..75ca85978155 100644 --- a/lldb/test/Unit/lit.cfg.py +++ b/lldb/test/Unit/lit.cfg.py @@ -28,6 +28,7 @@ 'PATH', 'TEMP', 'TMP', + 'XDG_CACHE_HOME', ]) llvm_config.with_environment('PATH', os.path.dirname(sys.executable), _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits