]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sdk: use bash to execute SDK test commands
authorMikko Rapeli <mikko.rapeli@bmw.de>
Wed, 8 May 2019 13:26:08 +0000 (16:26 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 May 2019 15:31:06 +0000 (16:31 +0100)
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.

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdk/case.py
meta/lib/oeqa/sdk/utils/sdkbuildproject.py

index 43fc00aaa2ab3a57383a0083703232ae23095969..ebb03af9eb0af116bd5516d19e36bedfd86de363 100644 (file)
@@ -12,7 +12,7 @@ from oeqa.core.case import OETestCase
 class OESDKTestCase(OETestCase):
     def _run(self, cmd):
         return subprocess.check_output(". %s > /dev/null; %s;" % \
-                (self.tc.sdk_env, cmd), shell=True,
+                (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash",
                 stderr=subprocess.STDOUT, universal_newlines=True)
 
     def fetch(self, workdir, dl_dir, url, archive=None):
index f57ff5eed044a882970660d0adda07ac0334fb88..32f5e3310dea58202566d6ad7389972909d81c8b 100644 (file)
@@ -45,7 +45,8 @@ class SDKBuildProject(BuildProject):
     def _run(self, cmd):
         self.log("Running . %s; " % self.sdkenv + cmd)
         try:
-            output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT)
+            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