aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/cases/buildgalculator.py
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-08-29 10:56:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 15:42:21 +0100
commit9c33184f0e2310b23ee545f7c916babb0a0413b0 (patch)
tree02881e90a96e91e4ab90c0c5fb9b58c0863f8dfd /meta/lib/oeqa/sdk/cases/buildgalculator.py
parent465ff0474041342fea97fee336bd77f04299d7bb (diff)
downloadopenembedded-core-contrib-9c33184f0e2310b23ee545f7c916babb0a0413b0.tar.gz
oeqa/sdk: fixes related to hasPackage semantics
The current _hasPackage does a regex match when checking for the existence of packages. This will sometimes result in unexpected result. For example, the condition hasTargetPackage('gcc') is likely to be always true as it matches libgcc1. For most of the time, we should do exact match instead of regex match. So change _hasPackage function to do that. For the current sdk test cases, the only place that needs regex match is '^gcc-'. This is because there's no easy way to get multilib tune arch (e.g. i686) from testdata.json file. Besides, packagegroup-cross-canadian-xxx and gcc-xxx should be check in host manifest instead of the target one. So fix to use hasHostPackage. Also, as we are doing exact match, there's no need to use r'gtk\+3', just 'gtk+3' is enough. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk/cases/buildgalculator.py')
-rw-r--r--meta/lib/oeqa/sdk/cases/buildgalculator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index 3714825b06..050d1b3b52 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -8,8 +8,8 @@ class GalculatorTest(OESDKTestCase):
@classmethod
def setUpClass(self):
- if not (self.tc.hasTargetPackage(r"gtk\+3", multilib=True) or\
- self.tc.hasTargetPackage(r"libgtk-3.0", multilib=True)):
+ if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \
+ self.tc.hasTargetPackage("libgtk-3.0", multilib=True)):
raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3")
if not (self.tc.hasHostPackage("nativesdk-gettext-dev")):
raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain gettext")