diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-14 16:16:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-16 13:21:35 +0100 |
commit | b3c379d93e55e6a040545ca6856ef75bef00bba1 (patch) | |
tree | 86b03b9d3829338fc240ff1e91a25f3a7fb88664 | |
parent | a85015b109b9f9ad767f271a604af72ce1b8feec (diff) | |
download | poky-b3c379d93e55e6a040545ca6856ef75bef00bba1.tar.gz |
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>
-rw-r--r-- | meta/lib/oeqa/sdk/utils/sdkbuildproject.py | 7 |
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): | |||
42 | 42 | ||
43 | def _run(self, cmd): | 43 | def _run(self, cmd): |
44 | self.log("Running . %s; " % self.sdkenv + cmd) | 44 | self.log("Running . %s; " % self.sdkenv + cmd) |
45 | return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True) | 45 | try: |
46 | output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT) | ||
47 | except subprocess.CalledProcessError as exc: | ||
48 | print(exc.output.decode('utf-8')) | ||
49 | return exc.returncode | ||
50 | return 0 | ||