summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-01 23:41:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-02 16:00:40 +0100
commitbdd3abcc210e8f58b7b411da6bbd9c5314819908 (patch)
tree27ebfa74f1ae3511db632546e0979677be6228e4
parent017aff2bc127cad6c9d0f6feefc2e200a06efec2 (diff)
downloadopenembedded-core-contrib-bdd3abcc210e8f58b7b411da6bbd9c5314819908.tar.gz
openembedded-core-contrib-bdd3abcc210e8f58b7b411da6bbd9c5314819908.tar.bz2
openembedded-core-contrib-bdd3abcc210e8f58b7b411da6bbd9c5314819908.zip
selftest/prservice: Improve test failure message
When failing, give more information about why exactly a failure is happening such as the PR values in question. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/prservice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/prservice.py b/meta/lib/oeqa/selftest/cases/prservice.py
index fe1f24ea6d..85b534963d 100644
--- a/meta/lib/oeqa/selftest/cases/prservice.py
+++ b/meta/lib/oeqa/selftest/cases/prservice.py
@@ -63,7 +63,7 @@ class BitbakePrTests(OESelftestTestCase):
pr_2 = self.get_pr_version(package_name)
stamp_2 = self.get_task_stamp(package_name, track_task)
- self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1")
+ self.assertTrue(pr_2 - pr_1 == 1, "Step between pkg revisions is not 1 (was %s - %s)" % (pr_2, pr_1))
self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1)
def run_test_pr_export_import(self, package_name, replace_current_db=True):
@@ -89,7 +89,7 @@ class BitbakePrTests(OESelftestTestCase):
self.increment_package_pr(package_name)
pr_2 = self.get_pr_version(package_name)
- self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1")
+ self.assertTrue(pr_2 - pr_1 == 1, "Step between pkg revisions is not 1 (was %s - %s)" % (pr_2, pr_1))
def test_import_export_replace_db(self):
self.run_test_pr_export_import('m4')