diff options
author | Steven Knight <knight@baldmt.com> | 2006-11-04 05:31:24 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2006-11-04 05:31:24 (GMT) |
commit | c36a10f28f1c38541757cbbe96d67cd87a2096e7 (patch) | |
tree | 6631963b4e4521d9a9a643edc1269409083e4651 /src/engine/SCons/ActionTests.py | |
parent | 6fcc7d78858a5ca068e3deea183d35295b7dd88e (diff) | |
download | SCons-c36a10f28f1c38541757cbbe96d67cd87a2096e7.zip SCons-c36a10f28f1c38541757cbbe96d67cd87a2096e7.tar.gz SCons-c36a10f28f1c38541757cbbe96d67cd87a2096e7.tar.bz2 |
Merged revisions 1667-1674 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core
........
r1672 | stevenknight | 2006-11-03 23:11:52 -0600 (Fri, 03 Nov 2006) | 1 line
0.96.D480 - Don't use UNIX logic to detect an executable qmtest.py on Windows.
........
r1673 | stevenknight | 2006-11-03 23:18:59 -0600 (Fri, 03 Nov 2006) | 1 line
0.96.D481 - Remove the print statement from the previous checkin.
........
r1674 | stevenknight | 2006-11-03 23:25:43 -0600 (Fri, 03 Nov 2006) | 1 line
0.96.D482 - Create a env.Clone() method and encourage its use in favor of env.Copy().
........
Diffstat (limited to 'src/engine/SCons/ActionTests.py')
-rw-r--r-- | src/engine/SCons/ActionTests.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index 57910de..2c6d915 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -152,7 +152,7 @@ class Environment: return self.d.items() def Dictionary(self): return self.d - def Copy(self, **kw): + def Clone(self, **kw): res = Environment() res.d = SCons.Environment.our_deepcopy(self.d) for k, v in kw.items(): @@ -908,7 +908,7 @@ class CommandActionTestCase(unittest.TestCase): cmd1 = r'%s %s %s xyzzy' % (_python_, act_py, outfile) act = SCons.Action.CommandAction(cmd1) - r = act([], [], env.Copy()) + r = act([], [], env.Clone()) assert r == 0 c = test.read(outfile, 'r') assert c == "act.py: 'xyzzy'\n", c @@ -916,7 +916,7 @@ class CommandActionTestCase(unittest.TestCase): cmd2 = r'%s %s %s $TARGET' % (_python_, act_py, outfile) act = SCons.Action.CommandAction(cmd2) - r = act(DummyNode('foo'), [], env.Copy()) + r = act(DummyNode('foo'), [], env.Clone()) assert r == 0 c = test.read(outfile, 'r') assert c == "act.py: 'foo'\n", c @@ -924,7 +924,7 @@ class CommandActionTestCase(unittest.TestCase): cmd3 = r'%s %s %s ${TARGETS}' % (_python_, act_py, outfile) act = SCons.Action.CommandAction(cmd3) - r = act(map(DummyNode, ['aaa', 'bbb']), [], env.Copy()) + r = act(map(DummyNode, ['aaa', 'bbb']), [], env.Clone()) assert r == 0 c = test.read(outfile, 'r') assert c == "act.py: 'aaa' 'bbb'\n", c @@ -932,7 +932,7 @@ class CommandActionTestCase(unittest.TestCase): cmd4 = r'%s %s %s $SOURCES' % (_python_, act_py, outfile) act = SCons.Action.CommandAction(cmd4) - r = act([], [DummyNode('one'), DummyNode('two')], env.Copy()) + r = act([], [DummyNode('one'), DummyNode('two')], env.Clone()) assert r == 0 c = test.read(outfile, 'r') assert c == "act.py: 'one' 'two'\n", c @@ -941,7 +941,7 @@ class CommandActionTestCase(unittest.TestCase): act = SCons.Action.CommandAction(cmd4) sources = [DummyNode('three'), DummyNode('four'), DummyNode('five')] - env2 = env.Copy() + env2 = env.Clone() r = act([], source = sources, env = env2) assert r == 0 c = test.read(outfile, 'r') @@ -964,7 +964,7 @@ class CommandActionTestCase(unittest.TestCase): act = SCons.Action.CommandAction(cmd5) r = act(target = DummyNode('out5'), source = [], - env = env.Copy(ENV = {'XYZZY' : 'xyzzy5', + env = env.Clone(ENV = {'XYZZY' : 'xyzzy5', 'PATH' : PATH})) assert r == 0 c = test.read(outfile, 'r') @@ -985,7 +985,7 @@ class CommandActionTestCase(unittest.TestCase): act = SCons.Action.CommandAction(cmd6) r = act(target = [Obj('111'), Obj('222')], source = [Obj('333'), Obj('444'), Obj('555')], - env = env.Copy()) + env = env.Clone()) assert r == 0 c = test.read(outfile, 'r') assert c == "act.py: '222' '111' '333' '444'\n", c @@ -1004,18 +1004,18 @@ class CommandActionTestCase(unittest.TestCase): # Test that a nonexistent command returns 127 act = SCons.Action.CommandAction(python + "_no_such_command_") - r = act([], [], env.Copy(out = outfile)) + r = act([], [], env.Clone(out = outfile)) assert r == expect_nonexistent, "r == %d" % r # Test that trying to execute a directory returns 126 dir, tail = os.path.split(python) act = SCons.Action.CommandAction(dir) - r = act([], [], env.Copy(out = outfile)) + r = act([], [], env.Clone(out = outfile)) assert r == expect_nonexecutable, "r == %d" % r # Test that trying to execute a non-executable file returns 126 act = SCons.Action.CommandAction(outfile) - r = act([], [], env.Copy(out = outfile)) + r = act([], [], env.Clone(out = outfile)) assert r == expect_nonexecutable, "r == %d" % r act = SCons.Action.CommandAction('%s %s 1' % (_python_, exit_py)) |