summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/ExecutorTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-10-22 17:42:35 (GMT)
committerSteven Knight <knight@baldmt.com>2004-10-22 17:42:35 (GMT)
commit1c2053ed54d4ab5276378a54cab9f9300d075e1b (patch)
treedbe69fc2c04bfc72edc266322967286fe059b634 /src/engine/SCons/ExecutorTests.py
parent6fc2c7c765dbadb67ed8a5fd04ac13d4b1550224 (diff)
downloadSCons-1c2053ed54d4ab5276378a54cab9f9300d075e1b.zip
SCons-1c2053ed54d4ab5276378a54cab9f9300d075e1b.tar.gz
SCons-1c2053ed54d4ab5276378a54cab9f9300d075e1b.tar.bz2
Fix the execute-Mkdir-once patch so that it doesn't treat the directory as up-to-date just because it's been made, but still builds all of its children.
Diffstat (limited to 'src/engine/SCons/ExecutorTests.py')
-rw-r--r--src/engine/SCons/ExecutorTests.py33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py
index e259012..d52853c 100644
--- a/src/engine/SCons/ExecutorTests.py
+++ b/src/engine/SCons/ExecutorTests.py
@@ -50,9 +50,9 @@ class MyAction:
for action in self.actions:
action(target, source, env, errfunc)
def strfunction(self, target, source, env):
- return string.join(['STRFUNCTION'] + self.actions + target + source)
+ return string.join(['STRFUNCTION'] + map(str, self.actions) + target + source)
def genstring(self, target, source, env):
- return string.join(['GENSTRING'] + self.actions + target + source)
+ return string.join(['GENSTRING'] + map(str, self.actions) + target + source)
def get_raw_contents(self, target, source, env):
return string.join(['RAW'] + self.actions + target + source)
def get_contents(self, target, source, env):
@@ -212,6 +212,35 @@ class ExecutorTestCase(unittest.TestCase):
s = x.strfunction()
assert s == 'STRFUNCTION action1 action2 t s', s
+ def test_nullify(self):
+ """Test the nullify() method"""
+ env = MyEnvironment(S='string')
+
+ result = []
+ def action1(target, source, env, errfunc, result=result, **kw):
+ result.append('action1')
+
+ env = MyEnvironment()
+ a = MyAction([action1])
+ x = SCons.Executor.Executor(a, env, [], ['t1', 't2'], ['s1', 's2'])
+
+ x(MyNode([], []), None)
+ assert result == ['action1'], result
+ s = str(x)
+ assert s[:10] == 'GENSTRING ', s
+ s = x.strfunction()
+ assert s[:12] == 'STRFUNCTION ', s
+
+ del result[:]
+ x.nullify()
+
+ x(MyNode([], []), None)
+ assert result == [], result
+ s = str(x)
+ assert s == None, s
+ s = x.strfunction()
+ assert s == None, s
+
def test_get_raw_contents(self):
"""Test fetching the raw signatures contents"""
env = MyEnvironment(RC='raw contents')