]> 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)
committerArmin Kuster <akuster808@gmail.com>
Sat, 1 Jun 2019 21:48:32 +0000 (14:48 -0700)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oeqa/sdk/case.py
meta/lib/oeqa/sdk/utils/sdkbuildproject.py

index d8611c8b3087433b4d2f53ed6ba2616d237167a3..53342379a2e59e962cf7918575f9ae486771dfea 100644 (file)
@@ -9,7 +9,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 6fed73e35051cd18e239367787d72ada53d17e94..eafbd7a03490120cd14479c316d6f180bb26a702 100644 (file)
@@ -42,7 +42,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