diff options
author | Steven Knight <knight@baldmt.com> | 2003-03-26 15:57:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-03-26 15:57:50 (GMT) |
commit | 95a4d924e02d940a8960e28be71056dab84deb9f (patch) | |
tree | ca6f9d1b4c0a5581a10756fa7a3fda0be75d4c62 /src/engine/SCons/TaskmasterTests.py | |
parent | c24f1504b711f871c0c4310a460727ac1a859936 (diff) | |
download | SCons-95a4d924e02d940a8960e28be71056dab84deb9f.zip SCons-95a4d924e02d940a8960e28be71056dab84deb9f.tar.gz SCons-95a4d924e02d940a8960e28be71056dab84deb9f.tar.bz2 |
Add warnings when we switch to BuildDir() targets when using -u or -U.
Diffstat (limited to 'src/engine/SCons/TaskmasterTests.py')
-rw-r--r-- | src/engine/SCons/TaskmasterTests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/engine/SCons/TaskmasterTests.py b/src/engine/SCons/TaskmasterTests.py index c6543e3..89c53c7 100644 --- a/src/engine/SCons/TaskmasterTests.py +++ b/src/engine/SCons/TaskmasterTests.py @@ -50,6 +50,7 @@ class Node: self.parents = [] self.side_effect = 0 self.side_effects = [] + self.alttargets = [] for kid in kids: kid.parents.append(self) @@ -64,6 +65,9 @@ class Node: def is_derived(self): return self.has_builder or self.side_effect + def alter_targets(self): + return self.alttargets, None + def built(self): global built_text built_text = built_text + " really" @@ -376,6 +380,18 @@ class TaskmasterTestCase(unittest.TestCase): assert t.get_target() == n4, t.get_target() t.executed() + n5 = Node("n5") + n6 = Node("n6") + n7 = Node("n7") + n6.alttargets = [n7] + tm = SCons.Taskmaster.Taskmaster([n5]) + t = tm.next_task() + assert t.get_target() == n5 + t.executed() + tm = SCons.Taskmaster.Taskmaster([n6]) + t = tm.next_task() + assert t.get_target() == n7 + t.executed() def test_make_ready_exception(self): |