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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350175
91177308-0d34-0410-b5e6-
96231b3b80d8
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: