Fix exit code display for task failure
Per the python documentation, os.waitpid returns the exitcode shifted up by 8 bits, and we weren't compensating, resulting in a display of 'failed with 256' when a worker process exits with a code of 1. (Bitbake rev: 90c2b6cb24dc9c82f0a9aa9d23f2d1ed2e6ff301) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
7011ae3f78
commit
7afe34e2c2
|
@ -1054,7 +1054,7 @@ class RunQueueExecute:
|
||||||
self.build_pipes[result[0]].close()
|
self.build_pipes[result[0]].close()
|
||||||
del self.build_pipes[result[0]]
|
del self.build_pipes[result[0]]
|
||||||
if result[1] != 0:
|
if result[1] != 0:
|
||||||
self.task_fail(task, result[1])
|
self.task_fail(task, result[1]>>8)
|
||||||
else:
|
else:
|
||||||
self.task_complete(task)
|
self.task_complete(task)
|
||||||
|
|
||||||
|
@ -1259,7 +1259,9 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
||||||
Called when a task has failed
|
Called when a task has failed
|
||||||
Updates the state engine with the failure
|
Updates the state engine with the failure
|
||||||
"""
|
"""
|
||||||
logger.error("Task %s (%s) failed with %s" % (task, self.rqdata.get_user_idstring(task), exitcode))
|
logger.error("Task %s (%s) failed with exit code '%s'", task,
|
||||||
|
self.rqdata.get_user_idstring(task), exitcode)
|
||||||
|
|
||||||
self.stats.taskFailed()
|
self.stats.taskFailed()
|
||||||
fnid = self.rqdata.runq_fnid[task]
|
fnid = self.rqdata.runq_fnid[task]
|
||||||
self.failed_fnids.append(fnid)
|
self.failed_fnids.append(fnid)
|
||||||
|
|
Loading…
Reference in New Issue