Skip to contentSkip to conversation

knotty: Set exit failure code on runQueueTaskFailed events

PATCH New Richard Purdie 1 participant 1 message Feb 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 knotty: Set exit failure code on runQueueTaskFailed events

If the worker segfaults, we may never see a TaskFailed event from it, only a runQueueTaskFailed event. In this case, return_value isn't getting set leading to an incorrect exit code from bitbake. Fix by setting return_value in both places.

bitbake/lib/bb/ui/knotty.py +1 -0
index 87e2a64..dff92bc 100644
@@ -498,6 +498,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
                 continue
 
             if isinstance(event, bb.runqueue.runQueueTaskFailed):
+                return_value = 1
                 taskfailures.append(event.taskstring)
                 logger.error("Task %s (%s) failed with exit code '%s'",
                              event.taskid, event.taskstring, event.exitcode)