mirror of
https://git.yoctoproject.org/poky
synced 2026-05-05 20:27:58 +02:00
oeqa/sdkbuildproject: Capture output to quieten selftest logs
Only show the output in the failure case. (From OE-Core rev: 324785a99e3f2449cb443233e7ce224598c02a3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user