Anonymous avatar Anonymous committed e116aea

Let the Taskmaster control whether the build stops.

Comments (0)

Files changed (2)

src/engine/SCons/Job.py

             try:
                 task.execute()
             except:
+                # Let the failed() callback function arrange for the
+                # build to stop if that's appropriate.
                 self.taskmaster.failed(task)
-                return
             else:
                 self.taskmaster.executed(task)
 
                     finally:
                         cv.acquire()
                 except:
+                    # Let the failed() callback function arrange for
+                    # calling self.jobs.stop() to to stop the build
+                    # if that's appropriate.
                     self.taskmaster.failed(task)
-                    # stop all jobs since there was a failure:
-                    # (this will wake up any waiting jobs, so
-                    #  it isn't necessary to explicitly wake them
-                    #  here)
-                    self.jobs.stop() 
                 else:
                     self.taskmaster.executed(task)
                     

src/engine/SCons/JobTests.py

         """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
 
 
     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
 
     def failed(self, task):
         self.num_failed = self.num_failed + 1
+        self.stop = 1
     
     def is_blocked(self):
         # simulate blocking tasks
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.