summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/JobTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-02 12:24:41 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-02 12:24:41 (GMT)
commit3451935a570c186d36e020b7d48cf2dd3dc2be0b (patch)
tree2136634dfb2ef0c1f624d278731ac5554395e092 /src/engine/SCons/JobTests.py
parent1287f392470ec9ef1a6be4f9a55ae67d7a638de8 (diff)
downloadSCons-3451935a570c186d36e020b7d48cf2dd3dc2be0b.zip
SCons-3451935a570c186d36e020b7d48cf2dd3dc2be0b.tar.gz
SCons-3451935a570c186d36e020b7d48cf2dd3dc2be0b.tar.bz2
Let the Taskmaster control whether the build stops.
Diffstat (limited to 'src/engine/SCons/JobTests.py')
-rw-r--r--src/engine/SCons/JobTests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/SCons/JobTests.py b/src/engine/SCons/JobTests.py
index f2189eb..b90ba1c 100644
--- a/src/engine/SCons/JobTests.py
+++ b/src/engine/SCons/JobTests.py
@@ -68,6 +68,7 @@ class Taskmaster:
"""n is the number of dummy tasks to perform."""
self.test_case = test_case
+ self.stop = None
self.num_tasks = n
self.num_iterated = 0
self.num_executed = 0
@@ -88,7 +89,7 @@ class Taskmaster:
def next_task(self):
- if self.all_tasks_are_iterated():
+ if self.stop or self.all_tasks_are_iterated():
return None
else:
self.num_iterated = self.num_iterated + 1
@@ -110,6 +111,7 @@ class Taskmaster:
def failed(self, task):
self.num_failed = self.num_failed + 1
+ self.stop = 1
def is_blocked(self):
# simulate blocking tasks