[llvm] r350175 - [test] Fix propagating HOME envvar to unittests
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 31 05:48:12 PST 2018
Author: mgorny
Date: Mon Dec 31 05:48:12 2018
New Revision: 350175
URL: http://llvm.org/viewvc/llvm-project?rev=350175&view=rev
Log:
[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
Modified:
llvm/trunk/test/Unit/lit.cfg.py
Modified: llvm/trunk/test/Unit/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.cfg.py?rev=350175&r1=350174&r2=350175&view=diff
==============================================================================
--- llvm/trunk/test/Unit/lit.cfg.py (original)
+++ llvm/trunk/test/Unit/lit.cfg.py Mon Dec 31 05:48:12 2018
@@ -31,6 +31,11 @@ if 'TMP' in os.environ:
if 'TEMP' in os.environ:
config.environment['TEMP'] = os.environ['TEMP']
+# Propagate HOME as it can be used to override incorrect homedir in passwd
+# that causes the tests to fail.
+if 'HOME' in os.environ:
+ config.environment['HOME'] = os.environ['HOME']
+
# Propagate path to symbolizer for ASan/MSan.
for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
if symbolizer in os.environ:
More information about the llvm-commits
mailing list