summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-24 18:17:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-27 13:17:17 +0100
commite58eaf5b8c93521dc311b77593e0dd7debca602d (patch)
treeccc437c0715555a8023ea98c16ede7279a076a31
parent25dc3d78de01dffa77a3a2452d6a97d741b446d9 (diff)
downloadopenembedded-core-contrib-e58eaf5b8c93521dc311b77593e0dd7debca602d.tar.gz
oeqa/selftest/signing: Fix for hash equivlance server
There were two issues with the test one is that an equivalent hash could come from the server meaning the signature didn't change when it should. A uuid string is injected to ensure this does not happen. If there were multiple warnings the test would also fail as only the first is prefixed with WARNING. Tweak the string to avoid that failure mode. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index b390f37d8e..5c4e01b2c3 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -180,6 +180,8 @@ class LockedSignatures(OESelftestTestCase):
AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
"""
+ import uuid
+
test_recipe = 'ed'
locked_sigs_file = 'locked-sigs.inc'
@@ -197,9 +199,10 @@ class LockedSignatures(OESelftestTestCase):
bitbake(test_recipe)
# Make a change that should cause the locked task signature to change
+ # Use uuid so hash equivalance server isn't triggered
recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', test_recipe, recipe_append_file)
- feature = 'SUMMARY += "test locked signature"\n'
+ feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4()
os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
write_file(recipe_append_path, feature)
@@ -210,7 +213,7 @@ class LockedSignatures(OESelftestTestCase):
ret = bitbake(test_recipe)
# Verify you get the warning and that the real task *isn't* run (i.e. the locked signature has worked)
- patt = r'WARNING: The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
+ patt = r'The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
found_warn = re.search(patt, ret.output)
self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s" % ret.output)