summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/prservice.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index 85b534963d..578b2b4dd9 100644
--- a/meta/lib/oeqa/selftest/cases/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -23,7 +23,7 @@ class BitbakePrTests(OESelftestTestCase):
23 package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name) 23 package_data_file = os.path.join(self.pkgdata_dir, 'runtime', package_name)
24 package_data = ftools.read_file(package_data_file) 24 package_data = ftools.read_file(package_data_file)
25 find_pr = re.search(r"PKGR: r[0-9]+\.([0-9]+)", package_data) 25 find_pr = re.search(r"PKGR: r[0-9]+\.([0-9]+)", package_data)
26 self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file) 26 self.assertTrue(find_pr, "No PKG revision found via regex 'PKGR: r[0-9]+\.([0-9]+)' in %s" % package_data_file)
27 return int(find_pr.group(1)) 27 return int(find_pr.group(1))
28 28
29 def get_task_stamp(self, package_name, recipe_task): 29 def get_task_stamp(self, package_name, recipe_task):
@@ -40,7 +40,7 @@ class BitbakePrTests(OESelftestTestCase):
40 return str(stamps[0]) 40 return str(stamps[0])
41 41
42 def increment_package_pr(self, package_name): 42 def increment_package_pr(self, package_name):
43 inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now() 43 inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\" > ${PKGDESTWORK}/${PN}.datestamp\n}" % datetime.datetime.now()
44 self.write_recipeinc(package_name, inc_data) 44 self.write_recipeinc(package_name, inc_data)
45 res = bitbake(package_name, ignore_status=True) 45 res = bitbake(package_name, ignore_status=True)
46 self.delete_recipeinc(package_name) 46 self.delete_recipeinc(package_name)
@@ -63,7 +63,7 @@ class BitbakePrTests(OESelftestTestCase):
63 pr_2 = self.get_pr_version(package_name) 63 pr_2 = self.get_pr_version(package_name)
64 stamp_2 = self.get_task_stamp(package_name, track_task) 64 stamp_2 = self.get_task_stamp(package_name, track_task)
65 65
66 self.assertTrue(pr_2 - pr_1 == 1, "Step between pkg revisions is not 1 (was %s - %s)" % (pr_2, pr_1)) 66 self.assertTrue(pr_2 - pr_1 == 1, "New PR %s did not increment as expected (from %s), difference should be 1" % (pr_2, pr_1))
67 self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1) 67 self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1)
68 68
69 def run_test_pr_export_import(self, package_name, replace_current_db=True): 69 def run_test_pr_export_import(self, package_name, replace_current_db=True):
@@ -89,7 +89,7 @@ class BitbakePrTests(OESelftestTestCase):
89 self.increment_package_pr(package_name) 89 self.increment_package_pr(package_name)
90 pr_2 = self.get_pr_version(package_name) 90 pr_2 = self.get_pr_version(package_name)
91 91
92 self.assertTrue(pr_2 - pr_1 == 1, "Step between pkg revisions is not 1 (was %s - %s)" % (pr_2, pr_1)) 92 self.assertTrue(pr_2 - pr_1 == 1, "New PR %s did not increment as expected (from %s), difference should be 1" % (pr_2, pr_1))
93 93
94 def test_import_export_replace_db(self): 94 def test_import_export_replace_db(self):
95 self.run_test_pr_export_import('m4') 95 self.run_test_pr_export_import('m4')