summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdk/utils/sdkbuildproject.py')
-rw-r--r--meta/lib/oeqa/sdk/utils/sdkbuildproject.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
index 4e251142d7..32f5e3310d 100644
--- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -1,5 +1,8 @@
+#
# Copyright (C) 2016 Intel Corporation
-# Released under the MIT license (see COPYING.MIT)
+#
+# SPDX-License-Identifier: MIT
+#
import os
import subprocess
@@ -20,10 +23,9 @@ class SDKBuildProject(BuildProject):
BuildProject.__init__(self, uri, foldername, tmpdir=testpath, dl_dir=dl_dir)
def download_archive(self):
-
self._download_archive()
- cmd = 'tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)
+ cmd = 'tar xf %s -C %s' % (os.path.join(self.targetdir, self.archive), self.targetdir)
subprocess.check_output(cmd, shell=True)
#Change targetdir to project folder
@@ -42,4 +44,10 @@ 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,
+ executable='/bin/bash', stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as exc:
+ print(exc.output.decode('utf-8'))
+ return exc.returncode
+ return 0