diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-08-20 22:37:46 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-08-20 22:37:46 (GMT) |
commit | 4a2a5fd3b51f9b0c5fb0bb31f838bba3aac1f1b1 (patch) | |
tree | c48e18fa075191ce3965fe3dd83a4a545439a005 /src/engine/SCons | |
parent | 58a7d618a864734aa09a69fd53b62bc980a7fb8b (diff) | |
download | SCons-4a2a5fd3b51f9b0c5fb0bb31f838bba3aac1f1b1.zip SCons-4a2a5fd3b51f9b0c5fb0bb31f838bba3aac1f1b1.tar.gz SCons-4a2a5fd3b51f9b0c5fb0bb31f838bba3aac1f1b1.tar.bz2 |
Fix Bug #2622 - AlwaysBuild()+MSVC regression. Due to AlwaysBuild'd target not being added to changed_sources. This has been fixed for a while via some changes for other issue/development. I added a unit test to cover this to src/engine/SCons/ExecutorTests.py
Diffstat (limited to 'src/engine/SCons')
-rw-r--r-- | src/engine/SCons/ExecutorTests.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index dbfb7d1..eeab3ad 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -74,8 +74,12 @@ class MyNode(object): self.pre_actions = pre self.post_actions = post self.missing_val = None + self.always_build = False + self.up_to_date = False + def __str__(self): return self.name + def build(self): executor = SCons.Executor.Executor(MyAction(self.pre_actions + [self.builder.action] + @@ -100,6 +104,9 @@ class MyNode(object): def disambiguate(self): return self + def is_up_to_date(self): + return self.up_to_date + class MyScanner(object): def __init__(self, prefix): self.prefix = prefix @@ -455,6 +462,24 @@ class ExecutorTestCase(unittest.TestCase): r = x.get_unignored_sources(None, [s1, s3]) assert r == [s2], list(map(str, r)) + def test_changed_sources_for_alwaysBuild(self): + """ + Ensure if a target is marked always build that the sources are always marked changed sources + :return: + """ + env = MyEnvironment() + s1 = MyNode('s1') + s2 = MyNode('s2') + t1 = MyNode('t1') + t1.up_to_date = True + t1.always_build = True + + x = SCons.Executor.Executor('b', env, [{}], [t1], [s1, s2]) + + changed_sources = x._get_changed_sources() + assert changed_sources == [s1, s2], "If target marked AlwaysBuild sources should always be marked changed" + + if __name__ == "__main__": |