aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-14 16:16:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-15 16:36:09 +0100
commit324785a99e3f2449cb443233e7ce224598c02a3b (patch)
tree928c9c4878cee92cd9ca8904fd3a9cedb902cfe1
parent75148c190dd4823947557e9a07f1722e817c1fea (diff)
downloadopenembedded-core-contrib-324785a99e3f2449cb443233e7ce224598c02a3b.tar.gz
openembedded-core-contrib-324785a99e3f2449cb443233e7ce224598c02a3b.tar.bz2
openembedded-core-contrib-324785a99e3f2449cb443233e7ce224598c02a3b.zip
oeqa/sdkbuildproject: Capture output to quieten selftest logs
Only show the output in the failure case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/sdk/utils/sdkbuildproject.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
index 4e251142d7..0519911e8f 100644
--- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -42,4 +42,9 @@ class SDKBuildProject(BuildProject):
def _run(self, cmd):
self.log("Running . %s; " % self.sdkenv + cmd)
- return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True)
+ try:
+ output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as exc:
+ print(exc.output.decode('utf-8'))
+ return exc.returncode
+ return 0