diff options
author | Mikko Rapeli <mikko.rapeli@bmw.de> | 2019-05-08 16:26:08 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-22 00:31:49 +0100 |
commit | 29e2a3f5e8fc56bd298a2d3d2ff66422c2911712 (patch) | |
tree | 365532a79fc639a272ab9d63e3cd727ce65f5d2a /meta/lib/oeqa/sdk | |
parent | 8356d0f38c675f6cdc3fe73f6c1198b5e65f2fb2 (diff) | |
download | poky-29e2a3f5e8fc56bd298a2d3d2ff66422c2911712.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: 274c22a1fd95418e4afb6633bb4b2e6debc4d7ea)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk')
-rw-r--r-- | meta/lib/oeqa/sdk/case.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/utils/sdkbuildproject.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py index 963aa8d358..c0aef18cd5 100644 --- a/meta/lib/oeqa/sdk/case.py +++ b/meta/lib/oeqa/sdk/case.py | |||
@@ -8,5 +8,5 @@ from oeqa.core.case import OETestCase | |||
8 | class OESDKTestCase(OETestCase): | 8 | class OESDKTestCase(OETestCase): |
9 | def _run(self, cmd): | 9 | def _run(self, cmd): |
10 | return subprocess.check_output(". %s > /dev/null; %s;" % \ | 10 | return subprocess.check_output(". %s > /dev/null; %s;" % \ |
11 | (self.tc.sdk_env, cmd), shell=True, | 11 | (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash", |
12 | stderr=subprocess.STDOUT, universal_newlines=True) | 12 | stderr=subprocess.STDOUT, universal_newlines=True) |
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py index 6fed73e350..eafbd7a034 100644 --- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py +++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py | |||
@@ -42,7 +42,8 @@ class SDKBuildProject(BuildProject): | |||
42 | def _run(self, cmd): | 42 | def _run(self, cmd): |
43 | self.log("Running . %s; " % self.sdkenv + cmd) | 43 | self.log("Running . %s; " % self.sdkenv + cmd) |
44 | try: | 44 | try: |
45 | output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT) | 45 | output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, |
46 | executable='/bin/bash', stderr=subprocess.STDOUT) | ||
46 | except subprocess.CalledProcessError as exc: | 47 | except subprocess.CalledProcessError as exc: |
47 | print(exc.output.decode('utf-8')) | 48 | print(exc.output.decode('utf-8')) |
48 | return exc.returncode | 49 | return exc.returncode |