if node is None:
return None
- self.executing.append(node)
- self.executing.extend(node.side_effects)
try:
tlist = node.builder.targets(node)
except AttributeError:
tlist = [node]
+ self.executing.extend(tlist)
+ self.executing.extend(node.side_effects)
+
task = self.tasker(self, tlist, node in self.targets, node)
task.make_ready()
self.ready = None
self.pending = []
def executed(self, node):
- self.executing.remove(node)
+ try:
+ tlist = node.builder.targets(node)
+ except AttributeError:
+ tlist = [node]
+ for t in tlist:
+ self.executing.remove(t)
for side_effect in node.side_effects:
self.executing.remove(side_effect)
file.close()
""")
+test.subdir('foo')
+
+test.write(['foo','foo.in'], r"""
+foo you
+""")
+
test.write('SConstruct', """
MyBuild = Builder(action = r'%s build.py $TARGETS')
env = Environment(BUILDERS = { 'MyBuild' : MyBuild })
env.MyBuild(target = 'f1', source = 'f1.in')
env.MyBuild(target = 'f2', source = 'f2.in')
+
+def copyn(env, target, source):
+ import shutil
+ import time
+ time.sleep(1)
+ for t in target:
+ shutil.copy(str(source[0]), str(t))
+
+t = env.Command(target=['foo/foo1.out', 'foo/foo2.out'], source='foo/foo.in', action=copyn)
+env.Install('out', t)
""" % python)
def RunTest(args, extra):
# before the first one was finished
test.fail_test(start2 < finish1)
+test.run(arguments='-j 2 out')
+
test.pass_test()