From c71ea3831a9d40e37f47015cf0d14ab7fd61077d Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 15 Jun 2016 12:01:23 +0100 Subject: oeqa: fix hasPackage, add hasPackageMatch hasPackage() was looking for the string provided as an RE substring in the manifest, which resulted in a large number of false positives (i.e. libgtkfoo would match "gtk+"). Rewrite the manifest loader to parse the files into a proper data structure, change hasPackage to do full string matches, and add hasPackageMatch which does RE substring matches. (From OE-Core rev: b9409863af71899e02275439949e3f4cdfaf2d0f) (From OE-Core rev: 990db70dac60541ef14977177fff4361e31c51eb) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/_ptest.py | 4 ++-- meta/lib/oeqa/runtime/python.py | 2 +- meta/lib/oeqa/runtime/smart.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'meta/lib/oeqa/runtime') diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py index 0621028b86..71324d3da2 100644 --- a/meta/lib/oeqa/runtime/_ptest.py +++ b/meta/lib/oeqa/runtime/_ptest.py @@ -11,7 +11,7 @@ import subprocess def setUpModule(): if not oeRuntimeTest.hasFeature("package-management"): skipModule("Image doesn't have package management feature") - if not oeRuntimeTest.hasPackage("smart"): + if not oeRuntimeTest.hasPackage("smartpm"): skipModule("Image doesn't have smart installed") if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: skipModule("Rpm is not the primary package manager") @@ -105,7 +105,7 @@ class PtestRunnerTest(oeRuntimeTest): def test_ptestrunner(self): self.add_smart_channel() (runnerstatus, result) = self.target.run('which ptest-runner', 0) - cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) + cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackageMatch("-ptest") and (runnerstatus != 0) if cond: self.install_packages(self.install_complementary("*-ptest")) self.install_packages(['ptest-runner']) diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py index 26edb7a9b8..29a231c7c3 100644 --- a/meta/lib/oeqa/runtime/python.py +++ b/meta/lib/oeqa/runtime/python.py @@ -4,7 +4,7 @@ from oeqa.oetest import oeRuntimeTest, skipModule from oeqa.utils.decorators import * def setUpModule(): - if not oeRuntimeTest.hasPackage("python"): + if not oeRuntimeTest.hasPackage("python-core"): skipModule("No python package in the image") diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py index 126d614638..c7a5753991 100644 --- a/meta/lib/oeqa/runtime/smart.py +++ b/meta/lib/oeqa/runtime/smart.py @@ -7,7 +7,7 @@ from oeqa.utils.httpserver import HTTPService def setUpModule(): if not oeRuntimeTest.hasFeature("package-management"): skipModule("Image doesn't have package management feature") - if not oeRuntimeTest.hasPackage("smart"): + if not oeRuntimeTest.hasPackage("smartpm"): skipModule("Image doesn't have smart installed") if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: skipModule("Rpm is not the primary package manager") -- cgit v1.2.3-54-g00ecf