diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/signing.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py index 5c4e01b2c3..93b15ae681 100644 --- a/meta/lib/oeqa/selftest/cases/signing.py +++ b/meta/lib/oeqa/selftest/cases/signing.py | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | from oeqa.selftest.case import OESelftestTestCase | 5 | from oeqa.selftest.case import OESelftestTestCase |
| 6 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars | 6 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, create_temp_layer |
| 7 | import os | 7 | import os |
| 8 | import oe | 8 | import oe |
| 9 | import glob | 9 | import glob |
| @@ -185,8 +185,6 @@ class LockedSignatures(OESelftestTestCase): | |||
| 185 | test_recipe = 'ed' | 185 | test_recipe = 'ed' |
| 186 | locked_sigs_file = 'locked-sigs.inc' | 186 | locked_sigs_file = 'locked-sigs.inc' |
| 187 | 187 | ||
| 188 | self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file)) | ||
| 189 | |||
| 190 | bitbake(test_recipe) | 188 | bitbake(test_recipe) |
| 191 | # Generate locked sigs include file | 189 | # Generate locked sigs include file |
| 192 | bitbake('-S none %s' % test_recipe) | 190 | bitbake('-S none %s' % test_recipe) |
| @@ -198,16 +196,23 @@ class LockedSignatures(OESelftestTestCase): | |||
| 198 | # Build a locked recipe | 196 | # Build a locked recipe |
| 199 | bitbake(test_recipe) | 197 | bitbake(test_recipe) |
| 200 | 198 | ||
| 199 | templayerdir = tempfile.mkdtemp(prefix='signingqa') | ||
| 200 | create_temp_layer(templayerdir, 'selftestsigning') | ||
| 201 | runCmd('bitbake-layers add-layer %s' % templayerdir) | ||
| 202 | |||
| 201 | # Make a change that should cause the locked task signature to change | 203 | # Make a change that should cause the locked task signature to change |
| 202 | # Use uuid so hash equivalance server isn't triggered | 204 | # Use uuid so hash equivalance server isn't triggered |
| 203 | recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' | 205 | recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' |
| 204 | recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', test_recipe, recipe_append_file) | 206 | recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file) |
| 205 | feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4() | 207 | feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4() |
| 206 | 208 | ||
| 207 | os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe)) | 209 | os.mkdir(os.path.join(templayerdir, 'recipes-test')) |
| 210 | os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe)) | ||
| 208 | write_file(recipe_append_path, feature) | 211 | write_file(recipe_append_path, feature) |
| 209 | 212 | ||
| 210 | self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test', test_recipe)) | 213 | self.add_command_to_tearDown('bitbake-layers remove-layer %s' % templayerdir) |
| 214 | self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file)) | ||
| 215 | self.add_command_to_tearDown('rm -rf %s' % templayerdir) | ||
| 211 | 216 | ||
| 212 | # Build the recipe again | 217 | # Build the recipe again |
| 213 | ret = bitbake(test_recipe) | 218 | ret = bitbake(test_recipe) |
