summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/prservice.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/prservice.py')
-rw-r--r--meta/lib/oeqa/selftest/prservice.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py
index 0b2dfe6494..34d419762c 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -12,10 +12,13 @@ from oeqa.utils.decorators import testcase
12from oeqa.utils.network import get_free_port 12from oeqa.utils.network import get_free_port
13 13
14class BitbakePrTests(oeSelfTest): 14class BitbakePrTests(oeSelfTest):
15 15
16 @classmethod
17 def setUpClass(cls):
18 cls.pkgdata_dir = get_bb_var('PKGDATA_DIR')
19
16 def get_pr_version(self, package_name): 20 def get_pr_version(self, package_name):
17 pkgdata_dir = get_bb_var('PKGDATA_DIR') 21 package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name)
18 package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name)
19 package_data = ftools.read_file(package_data_file) 22 package_data = ftools.read_file(package_data_file)
20 find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data) 23 find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data)
21 self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file) 24 self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file)