diff options
author | Costin Constantin <costin.c.constantin@intel.com> | 2015-07-16 16:22:28 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-23 08:48:38 +0100 |
commit | 0d1f10e6adc8aba58105c81b6bdd7e77f4f8871f (patch) | |
tree | 169e1798446915fe4b28fa7c45c728b5dcbd2cdb /meta/lib | |
parent | 68f546e6cbe36c9b4b5c1c67784eb035578155d4 (diff) | |
download | poky-0d1f10e6adc8aba58105c81b6bdd7e77f4f8871f.tar.gz |
oeqa/prservice: add useful failure messages to test cases
(From OE-Core rev: 5089154d1edc31cb208cf13189ee117ca0b445f3)
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/prservice.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py index fb6d68d3bf..4187fbfeea 100644 --- a/meta/lib/oeqa/selftest/prservice.py +++ b/meta/lib/oeqa/selftest/prservice.py | |||
@@ -17,7 +17,7 @@ class BitbakePrTests(oeSelfTest): | |||
17 | package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name) | 17 | package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name) |
18 | package_data = ftools.read_file(package_data_file) | 18 | package_data = ftools.read_file(package_data_file) |
19 | find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data) | 19 | find_pr = re.search("PKGR: r[0-9]+\.([0-9]+)", package_data) |
20 | self.assertTrue(find_pr) | 20 | self.assertTrue(find_pr, "No PKG revision found in %s" % package_data_file) |
21 | return int(find_pr.group(1)) | 21 | return int(find_pr.group(1)) |
22 | 22 | ||
23 | def get_task_stamp(self, package_name, recipe_task): | 23 | def get_task_stamp(self, package_name, recipe_task): |
@@ -60,8 +60,8 @@ class BitbakePrTests(oeSelfTest): | |||
60 | stamp_2 = self.get_task_stamp(package_name, track_task) | 60 | stamp_2 = self.get_task_stamp(package_name, track_task) |
61 | 61 | ||
62 | bitbake("-ccleansstate %s" % package_name) | 62 | bitbake("-ccleansstate %s" % package_name) |
63 | self.assertTrue(pr_2 - pr_1 == 1) | 63 | self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1") |
64 | self.assertTrue(stamp_1 != stamp_2) | 64 | self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1) |
65 | 65 | ||
66 | def run_test_pr_export_import(self, package_name, replace_current_db=True): | 66 | def run_test_pr_export_import(self, package_name, replace_current_db=True): |
67 | self.config_pr_tests(package_name) | 67 | self.config_pr_tests(package_name) |
@@ -86,7 +86,7 @@ class BitbakePrTests(oeSelfTest): | |||
86 | pr_2 = self.get_pr_version(package_name) | 86 | pr_2 = self.get_pr_version(package_name) |
87 | 87 | ||
88 | bitbake("-ccleansstate %s" % package_name) | 88 | bitbake("-ccleansstate %s" % package_name) |
89 | self.assertTrue(pr_2 - pr_1 == 1) | 89 | self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1") |
90 | 90 | ||
91 | @testcase(930) | 91 | @testcase(930) |
92 | def test_import_export_replace_db(self): | 92 | def test_import_export_replace_db(self): |