Make sure we can find tools using the PATH specified during Environment() instantiation.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 17 Sep 2002 06:51:03 +0000 (06:51 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 17 Sep 2002 06:51:03 +0000 (06:51 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@467 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Environment.py
src/engine/SCons/EnvironmentTests.py

index cd7aced3dc5623f91b7489973554fa4ec24475ff..d8a87a42fedc1a66048498a40d6ae1ce05e71313 100644 (file)
@@ -130,6 +130,7 @@ class Environment:
         platform(self)
         if tools is None:
             tools = ['default']
+        apply(self.Replace, (), kw)
         for tool in tools:
             if SCons.Util.is_String(tool):
                 tool = SCons.Tool.Tool(tool)
index 21d241d4759467b757e0d1d119eabb3e298b3852..33c14e5d58fa4a6ce60da87d351c8843acee8a99 100644 (file)
@@ -625,9 +625,12 @@ class EnvironmentTestCase(unittest.TestCase):
             env['TOOL1'] = 111
         def t2(env, platform):
             env['TOOL2'] = 222
-        env = Environment(tools = [t1, t2])
+        def t3(env, platform):
+            env['AAA'] = env['XYZ']
+        env = Environment(tools = [t1, t2, t3], XYZ = 'aaa')
         assert env['TOOL1'] == 111, env['TOOL1']
         assert env['TOOL2'] == 222, env
+        assert env['AAA'] == 'aaa', env
 
 if __name__ == "__main__":
     suite = unittest.makeSuite(EnvironmentTestCase, 'test_')