diff options
author | Steven Knight <knight@baldmt.com> | 2005-05-14 14:32:44 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-05-14 14:32:44 (GMT) |
commit | 29aa03f7d41976f71cbe16090abf42b1364bb0c8 (patch) | |
tree | 479378732781cf8c06a2fbc935c149b4313eee6d /src/engine/SCons/Node/NodeTests.py | |
parent | f82f4ce830289473187299db9962f819ed74c877 (diff) | |
download | SCons-29aa03f7d41976f71cbe16090abf42b1364bb0c8.zip SCons-29aa03f7d41976f71cbe16090abf42b1364bb0c8.tar.gz SCons-29aa03f7d41976f71cbe16090abf42b1364bb0c8.tar.bz2 |
Move pre- and post-actions lists from Node to Executor so expansions of ${TARGETS[1:]} work, and the actions aren't executed multiple times.
Diffstat (limited to 'src/engine/SCons/Node/NodeTests.py')
-rw-r--r-- | src/engine/SCons/Node/NodeTests.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/engine/SCons/Node/NodeTests.py b/src/engine/SCons/Node/NodeTests.py index 67ac05f..70b9672 100644 --- a/src/engine/SCons/Node/NodeTests.py +++ b/src/engine/SCons/Node/NodeTests.py @@ -106,24 +106,6 @@ class MyListAction(MyActionBase): def __call__(self, target, source, env, errfunc): for A in self.list: A(target, source, env, errfunc) - -class MyNonGlobalAction(MyActionBase): - def __init__(self): - self.order = 0 - self.built_it = None - self.built_target = None - self.built_source = None - - def __call__(self, target, source, env, errfunc): - # Okay, so not ENTIRELY non-global... - global built_order - self.built_it = 1 - self.built_target = target - self.built_source = source - self.built_args = env - built_order = built_order + 1 - self.order = built_order - return 0 class Environment: def __init__(self, **kw): @@ -310,37 +292,6 @@ class NodeTestCase(unittest.TestCase): assert built_args["on"] == 3, built_args assert built_args["off"] == 4, built_args - built_it = None - built_order = 0 - node = MyNode("xxx") - node.builder_set(Builder()) - node.env_set(Environment()) - node.sources = ["yyy", "zzz"] - pre1 = MyNonGlobalAction() - pre2 = MyNonGlobalAction() - post1 = MyNonGlobalAction() - post2 = MyNonGlobalAction() - node.add_pre_action(pre1) - node.add_pre_action(pre2) - node.add_post_action(post1) - node.add_post_action(post2) - node.build() - assert built_it - assert pre1.built_it - assert pre2.built_it - assert post1.built_it - assert post2.built_it - assert pre1.order == 1, pre1.order - assert pre2.order == 2, pre1.order - # The action of the builder itself is order 3... - assert post1.order == 4, pre1.order - assert post2.order == 5, pre1.order - - for act in [ pre1, pre2, post1, post2 ]: - assert type(act.built_target[0]) == type(MyNode("bar")), type(act.built_target[0]) - assert str(act.built_target[0]) == "xxx", str(act.built_target[0]) - assert act.built_source == ["yyy", "zzz"], act.built_source - def test_get_build_scanner_path(self): """Test the get_build_scanner_path() method""" n = SCons.Node.Node() |