]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/sdk: fixes related to hasPackage semantics
authorChen Qi <Qi.Chen@windriver.com>
Wed, 29 Aug 2018 02:56:31 +0000 (10:56 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Aug 2018 15:16:06 +0000 (16:16 +0100)
commit595e9922cdbacf84cf35cc83f0d03cace042e302
tree7a1e9c2789b291259577be1ec35d83c066325ea0
parentce82ee46f4a7beb5663238b276e779e5c9657777
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>
meta/lib/oeqa/sdk/cases/buildgalculator.py
meta/lib/oeqa/sdk/cases/buildlzip.py
meta/lib/oeqa/sdk/cases/gcc.py
meta/lib/oeqa/sdk/context.py