1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

oeqa/runtime: Improve failure log output

Printing a message which says "configure failed" without the log output
is effectively useless. If a command fails, print the output by default
and simplify the calling code which makes debugging any of these failures
much easier.

(From OE-Core rev: b6352ff001c29f0bff10c18879b92c5618ec645c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2017-02-03 10:30:59 +00:00
parent 51481fe9bb
commit 6840618f1a
4 changed files with 13 additions and 22 deletions
@@ -33,4 +33,8 @@ class TargetBuildProject(BuildProject):
# The timeout parameter of target.run is set to 0
# to make the ssh command run with no timeout.
def _run(self, cmd):
return self.target.run(cmd, 0)[0]
ret = self.target.run(cmd, 0)
msg = "Command %s failed with exit code %s: %s" % (cmd, ret[0], ret[1])
if ret[0] != 0:
raise Exception(msg)
return ret[0]