pass environment when invoking llvm-config from lit.cfg
authorScott Douglass <sdouglass@arm.com>
Wed, 24 Sep 2014 18:37:48 +0000 (18:37 +0000)
committerScott Douglass <sdouglass@arm.com>
Wed, 24 Sep 2014 18:37:48 +0000 (18:37 +0000)
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218403 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index 294d37bc39173328a7e344a208bd84f0cc42a9e3..d3f12d51b85b0b84b790fefc95cd01181f858dbc 100644 (file)
@@ -313,7 +313,8 @@ if have_ld_plugin_support():
 try:
     llvm_config_cmd = subprocess.Popen(
         [os.path.join(llvm_tools_dir, 'llvm-config'), '--assertion-mode'],
-        stdout = subprocess.PIPE)
+        stdout = subprocess.PIPE,
+        env=config.environment)
 except OSError:
     print("Could not find llvm-config in " + llvm_tools_dir)
     exit(42)