Skip to content

Commit 9cc7b9a

Browse files
authored
Merge pull request #2639 from apple/🍒/ganymede/080ded7445cc670cf2628e660690a06503d226d7+c2d2adbce9299e562abd00b8f3139933beb97e17
🍒/ganymede/080ded7445cc670cf2628e660690a06503d226d7+c2d2adbce9299e562abd00b8f3139933beb97e17
2 parents 5b8b791 + 3037aa7 commit 9cc7b9a

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

lldb/test/API/lit.cfg.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,6 @@ def delete_module_cache(path):
129129
lit_config.warning("unable to inject shared library path on '{}'".format(
130130
platform.system()))
131131

132-
# Propagate LLDB_CAPTURE_REPRODUCER
133-
if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
134-
config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
135-
'LLDB_CAPTURE_REPRODUCER']
136-
137132
# Support running the test suite under the lldb-repro wrapper. This makes it
138133
# possible to capture a test suite run and then rerun all the test from the
139134
# just captured reproducer.
@@ -259,3 +254,12 @@ def delete_module_cache(path):
259254
if 'FREEBSD_LEGACY_PLUGIN' in os.environ:
260255
config.environment['FREEBSD_LEGACY_PLUGIN'] = os.environ[
261256
'FREEBSD_LEGACY_PLUGIN']
257+
258+
# Propagate LLDB_CAPTURE_REPRODUCER
259+
if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
260+
config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
261+
'LLDB_CAPTURE_REPRODUCER']
262+
263+
# Propagate XDG_CACHE_HOME
264+
if 'XDG_CACHE_HOME' in os.environ:
265+
config.environment['XDG_CACHE_HOME'] = os.environ['XDG_CACHE_HOME']

lldb/test/Shell/lit.cfg.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@
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 reproducer environment vars.
42-
if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
43-
config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
44-
'LLDB_CAPTURE_REPRODUCER']
41+
# Propagate environment vars.
42+
llvm_config.with_system_environment([
43+
'FREEBSD_LEGACY_PLUGIN',
44+
'HOME',
45+
'LLDB_CAPTURE_REPRODUCER',
46+
'TEMP',
47+
'TMP',
48+
'XDG_CACHE_HOME',
49+
])
4550

4651
# Support running the test suite under the lldb-repro wrapper. This makes it
4752
# possible to capture a test suite run and then rerun all the test from the
@@ -136,6 +141,3 @@ def calculate_arch_features(arch_string):
136141
can_set_dbregs = False
137142
if can_set_dbregs:
138143
config.available_features.add('dbregs-set')
139-
140-
# pass control variable through
141-
llvm_config.with_system_environment('FREEBSD_LEGACY_PLUGIN')

lldb/test/Unit/lit.cfg.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@
2323
# it needs to be able to find it at runtime. This is fine if Python is on your
2424
# system PATH, but if it's not, then this unit test executable will fail to run.
2525
# We can solve this by forcing the Python directory onto the system path here.
26-
llvm_config.with_system_environment('PATH')
27-
llvm_config.with_environment('PATH', os.path.dirname(sys.executable), append_path=True)
26+
llvm_config.with_system_environment([
27+
'HOME',
28+
'PATH',
29+
'TEMP',
30+
'TMP',
31+
'XDG_CACHE_HOME',
32+
])
33+
llvm_config.with_environment('PATH',
34+
os.path.dirname(sys.executable),
35+
append_path=True)
2836

2937
# testFormat: The test format to use to interpret tests.
3038
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests')

0 commit comments

Comments
 (0)