Skip to content

Commit 7343e24

Browse files
committedDec 31, 2018
[test] Fix propagating HOME envvar to unittests
Propagate HOME environment variable to unittests. This is necessary to fix test failures resulting from pw_home pointing to a non-existing directory while being overriden with HOME. Apparently Gentoo users hit this sometimes when they override build directory for Portage. Original bug report: https://bugs.gentoo.org/674088 Differential Revision: https://reviews.llvm.org/D56162 llvm-svn: 350175
1 parent 74d93f9 commit 7343e24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎llvm/test/Unit/lit.cfg.py

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
if 'TEMP' in os.environ:
3232
config.environment['TEMP'] = os.environ['TEMP']
3333

34+
# Propagate HOME as it can be used to override incorrect homedir in passwd
35+
# that causes the tests to fail.
36+
if 'HOME' in os.environ:
37+
config.environment['HOME'] = os.environ['HOME']
38+
3439
# Propagate path to symbolizer for ASan/MSan.
3540
for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
3641
if symbolizer in os.environ:

0 commit comments

Comments
 (0)
Please sign in to comment.