summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-08-20 15:37:46 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-08-20 15:37:46 -0700
commitc96277d63f6e917daa5798a41954a88e98352e81 (patch)
treec48e18fa075191ce3965fe3dd83a4a545439a005
parentcde8b8346894ef1e6ef6c254bc79a3f5f3a2e580 (diff)
downloadscons-c96277d63f6e917daa5798a41954a88e98352e81.tar.gz
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
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/ExecutorTests.py25
2 files changed, 27 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 47f74313..fa427265 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -38,6 +38,8 @@ may cause rebuilds. In no case should rebuilds not happen.
- Fixed Bug #3027 - "Cross Compiling issue: cannot override ranlib"
- Fixed Bug #3020 - "Download link in user guide wrong. python setup.py install --version-lib broken"
- Fixed Bug #2486 - Added SetOption('silent',True) - Previously this value was not allowed to be set.
+ - Fixed Bug #3040 - Non-unicode character in CHANGES.txt
+ - Fixed Bug #2622 - AlwaysBuild + MSVC regression.
From Ibrahim Esmat:
- Added the capability to build Windows Store Compatible libraries that can be used
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py
index dbfb7d16..eeab3ada 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__":