summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/_ptest.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-15 11:01:23 (GMT)
committerSona Sarmadi <sona.sarmadi@enea.com>2017-02-10 11:21:38 (GMT)
commit5772e2b19d1b0b6e277ade15a3242d583cda90ee (patch)
tree1c083ec7762c10f0275caa7a1b3a920b87387b10 /meta/lib/oeqa/runtime/_ptest.py
parent2f7efedae16efcb009fb76ecfbc6844701885d06 (diff)
downloadpoky-5772e2b19d1b0b6e277ade15a3242d583cda90ee.tar.gz
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) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/_ptest.py')
-rw-r--r--meta/lib/oeqa/runtime/_ptest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
index 0621028..71324d3 100644
--- a/meta/lib/oeqa/runtime/_ptest.py
+++ b/meta/lib/oeqa/runtime/_ptest.py
@@ -11,7 +11,7 @@ import subprocess
11def setUpModule(): 11def setUpModule():
12 if not oeRuntimeTest.hasFeature("package-management"): 12 if not oeRuntimeTest.hasFeature("package-management"):
13 skipModule("Image doesn't have package management feature") 13 skipModule("Image doesn't have package management feature")
14 if not oeRuntimeTest.hasPackage("smart"): 14 if not oeRuntimeTest.hasPackage("smartpm"):
15 skipModule("Image doesn't have smart installed") 15 skipModule("Image doesn't have smart installed")
16 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]: 16 if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
17 skipModule("Rpm is not the primary package manager") 17 skipModule("Rpm is not the primary package manager")
@@ -105,7 +105,7 @@ class PtestRunnerTest(oeRuntimeTest):
105 def test_ptestrunner(self): 105 def test_ptestrunner(self):
106 self.add_smart_channel() 106 self.add_smart_channel()
107 (runnerstatus, result) = self.target.run('which ptest-runner', 0) 107 (runnerstatus, result) = self.target.run('which ptest-runner', 0)
108 cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) 108 cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackageMatch("-ptest") and (runnerstatus != 0)
109 if cond: 109 if cond:
110 self.install_packages(self.install_complementary("*-ptest")) 110 self.install_packages(self.install_complementary("*-ptest"))
111 self.install_packages(['ptest-runner']) 111 self.install_packages(['ptest-runner'])