From: Andreas Sandberg Date: Wed, 13 Dec 2017 13:16:40 +0000 (+0000) Subject: scons: Make sure GTests have the right environment variables X-Git-Tag: v19.0.0.0~2432 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bace877821f2ac4a74174dd356990c5ddc738370;p=gem5.git scons: Make sure GTests have the right environment variables SCons currently scrubs the environment variables used by GTests too aggressively. This breaks systems where libraries are installed in non-standard locations that need to be specified in LD_LIBRARY_PATH. Run said tests in the gtest_env SCons environment which white-lists the important environment variables. Change-Id: I5fc8fb5e51f09644dc976ee97b21c78ab349bf7d Signed-off-by: Andreas Sandberg Reviewed-by: Jack Travaglini Reviewed-on: https://gem5-review.googlesource.com/6623 Reviewed-by: Gabe Black --- diff --git a/src/SConscript b/src/SConscript index 7cd711693..57a2d9648 100755 --- a/src/SConscript +++ b/src/SConscript @@ -1102,7 +1102,7 @@ def makeEnv(env, label, objsfx, strip=False, disable_partial=False, **kwargs): test.dir.File('%s.%s' % (test.target, label)), test_objs)) gtest_target = Dir(new_env['BUILDDIR']).File('unittests.%s' % label) - AlwaysBuild(Command(gtest_target, gtests, gtests)) + AlwaysBuild(gtest_env.Command(gtest_target, gtests, gtests)) progname = exename if strip: