summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/signing.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/signing.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index a28c7eb19a..18cce0ba25 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -1,4 +1,6 @@
1# 1#
2# Copyright OpenEmbedded Contributors
3#
2# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
3# 5#
4 6
@@ -145,7 +147,7 @@ class Signing(OESelftestTestCase):
145 feature += 'GPG_PATH = "%s"\n' % self.gpg_dir 147 feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
146 feature += 'SSTATE_DIR = "%s"\n' % sstatedir 148 feature += 'SSTATE_DIR = "%s"\n' % sstatedir
147 # Any mirror might have partial sstate without .sig files, triggering failures 149 # Any mirror might have partial sstate without .sig files, triggering failures
148 feature += 'SSTATE_MIRRORS_forcevariable = ""\n' 150 feature += 'SSTATE_MIRRORS:forcevariable = ""\n'
149 151
150 self.write_config(feature) 152 self.write_config(feature)
151 153
@@ -159,13 +161,13 @@ class Signing(OESelftestTestCase):
159 bitbake('-c clean %s' % test_recipe) 161 bitbake('-c clean %s' % test_recipe)
160 bitbake('-c populate_lic %s' % test_recipe) 162 bitbake('-c populate_lic %s' % test_recipe)
161 163
162 recipe_sig = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tgz.sig') 164 recipe_sig = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tar.zst.sig')
163 recipe_tgz = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tgz') 165 recipe_archive = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tar.zst')
164 166
165 self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.') 167 self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.')
166 self.assertEqual(len(recipe_tgz), 1, 'Failed to find .tgz file.') 168 self.assertEqual(len(recipe_archive), 1, 'Failed to find .tar.zst file.')
167 169
168 ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_tgz[0])) 170 ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_archive[0]))
169 # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30 171 # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30
170 # gpg: Good signature from "testuser (nocomment) <testuser@email.com>" 172 # gpg: Good signature from "testuser (nocomment) <testuser@email.com>"
171 self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.') 173 self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.')
@@ -189,7 +191,7 @@ class LockedSignatures(OESelftestTestCase):
189 191
190 bitbake(test_recipe) 192 bitbake(test_recipe)
191 # Generate locked sigs include file 193 # Generate locked sigs include file
192 bitbake('-S none %s' % test_recipe) 194 bitbake('-S lockedsigs %s' % test_recipe)
193 195
194 feature = 'require %s\n' % locked_sigs_file 196 feature = 'require %s\n' % locked_sigs_file
195 feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n' 197 feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n'
@@ -206,7 +208,7 @@ class LockedSignatures(OESelftestTestCase):
206 # Use uuid so hash equivalance server isn't triggered 208 # Use uuid so hash equivalance server isn't triggered
207 recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' 209 recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
208 recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file) 210 recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file)
209 feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4() 211 feature = 'SUMMARY:${PN} = "test locked signature%s"\n' % uuid.uuid4()
210 212
211 os.mkdir(os.path.join(templayerdir, 'recipes-test')) 213 os.mkdir(os.path.join(templayerdir, 'recipes-test'))
212 os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe)) 214 os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe))