diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-03 10:30:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-05 09:20:22 +0000 |
commit | b6352ff001c29f0bff10c18879b92c5618ec645c (patch) | |
tree | 50e0a69fa900e9bb9d66e2db3c2ea006b2a30c77 /meta/lib/oeqa/runtime/utils | |
parent | f61cdef0a8b2771225c6bc86881a16f8ef747983 (diff) | |
download | openembedded-core-contrib-b6352ff001c29f0bff10c18879b92c5618ec645c.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/utils')
-rw-r--r-- | meta/lib/oeqa/runtime/utils/targetbuildproject.py | 6 |
1 files changed, 5 insertions, 1 deletions
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] |