diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-09-10 11:14:54 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:35 +0000 |
commit | 7afe34e2c22904024f7082d3cf0f42550a10d83e (patch) | |
tree | ca65c9fc86f8c517f6048606e9aade79b4695388 /bitbake/lib/bb | |
parent | 7011ae3f789fca3fcaf7af9d16d0aa50a20c03b4 (diff) | |
download | poky-7afe34e2c22904024f7082d3cf0f42550a10d83e.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 6ea022e424..2b81540a14 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1054,7 +1054,7 @@ class RunQueueExecute: | |||
1054 | self.build_pipes[result[0]].close() | 1054 | self.build_pipes[result[0]].close() |
1055 | del self.build_pipes[result[0]] | 1055 | del self.build_pipes[result[0]] |
1056 | if result[1] != 0: | 1056 | if result[1] != 0: |
1057 | self.task_fail(task, result[1]) | 1057 | self.task_fail(task, result[1]>>8) |
1058 | else: | 1058 | else: |
1059 | self.task_complete(task) | 1059 | self.task_complete(task) |
1060 | 1060 | ||
@@ -1259,7 +1259,9 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1259 | Called when a task has failed | 1259 | Called when a task has failed |
1260 | Updates the state engine with the failure | 1260 | Updates the state engine with the failure |
1261 | """ | 1261 | """ |
1262 | logger.error("Task %s (%s) failed with %s" % (task, self.rqdata.get_user_idstring(task), exitcode)) | 1262 | logger.error("Task %s (%s) failed with exit code '%s'", task, |
1263 | self.rqdata.get_user_idstring(task), exitcode) | ||
1264 | |||
1263 | self.stats.taskFailed() | 1265 | self.stats.taskFailed() |
1264 | fnid = self.rqdata.runq_fnid[task] | 1266 | fnid = self.rqdata.runq_fnid[task] |
1265 | self.failed_fnids.append(fnid) | 1267 | self.failed_fnids.append(fnid) |