summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@bmw.de>2019-05-08 16:26:08 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-09 16:31:56 +0100
commit796b9089c589fed1412ae85b0fd6e33a41cba234 (patch)
treeea6737f7d8b1af3cfa33dff2fbf8689d1aba34ee /meta/lib/oeqa/sdk
parent2a2f74a27dc7005e5130871e084965ff89885a78 (diff)
downloadpoky-796b9089c589fed1412ae85b0fd6e33a41cba234.tar.gz
oeqa/sdk: use bash to execute SDK test commands
The commands only work with with bash. If /bin/sh is dash like in Debian, the command execution fails with errors like: Standard Output: /bin/sh: 5: export: --sysroot: bad variable name and all SDK tests fail. (From OE-Core rev: ba5bee46131bbb31efba766c4d29e5bf71c664a7) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk')
-rw-r--r--meta/lib/oeqa/sdk/case.py2
-rw-r--r--meta/lib/oeqa/sdk/utils/sdkbuildproject.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index 43fc00aaa2..ebb03af9eb 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -12,7 +12,7 @@ from oeqa.core.case import OETestCase
12class OESDKTestCase(OETestCase): 12class OESDKTestCase(OETestCase):
13 def _run(self, cmd): 13 def _run(self, cmd):
14 return subprocess.check_output(". %s > /dev/null; %s;" % \ 14 return subprocess.check_output(". %s > /dev/null; %s;" % \
15 (self.tc.sdk_env, cmd), shell=True, 15 (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash",
16 stderr=subprocess.STDOUT, universal_newlines=True) 16 stderr=subprocess.STDOUT, universal_newlines=True)
17 17
18 def fetch(self, workdir, dl_dir, url, archive=None): 18 def fetch(self, workdir, dl_dir, url, archive=None):
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
index f57ff5eed0..32f5e3310d 100644
--- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -45,7 +45,8 @@ class SDKBuildProject(BuildProject):
45 def _run(self, cmd): 45 def _run(self, cmd):
46 self.log("Running . %s; " % self.sdkenv + cmd) 46 self.log("Running . %s; " % self.sdkenv + cmd)
47 try: 47 try:
48 output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT) 48 output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True,
49 executable='/bin/bash', stderr=subprocess.STDOUT)
49 except subprocess.CalledProcessError as exc: 50 except subprocess.CalledProcessError as exc:
50 print(exc.output.decode('utf-8')) 51 print(exc.output.decode('utf-8'))
51 return exc.returncode 52 return exc.returncode