From 6840618f1a718d3aa8fd9e7e4fd3ffde01559e7d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Feb 2017 10:30:59 +0000 Subject: 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 --- meta/lib/oeqa/runtime/utils/targetbuildproject.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/lib/oeqa/runtime/utils') diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/meta/lib/oeqa/runtime/utils/targetbuildproject.py index 1ed5789ae5..551b0b6f27 100644 --- a/meta/lib/oeqa/runtime/utils/targetbuildproject.py +++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py @@ -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] -- cgit v1.2.3-54-g00ecf