[oe-commits] [openembedded-core] 01/05: selftest/signing: Use seperate layer test dir?
git at git.openembedded.org
git at git.openembedded.org
Thu Oct 31 16:13:00 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 95ee16b734fa5114268d0b33718e50e9655f280b
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sun Oct 27 10:59:03 2019 +0000
selftest/signing: Use seperate layer test dir?
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/case.py | 1 +
meta/lib/oeqa/selftest/cases/signing.py | 17 +++++++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index ac3308d..769bb40 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -163,6 +163,7 @@ to ensure accurate results.")
for command in self._extra_tear_down_commands:
result = runCmd(command, ignore_status=True)
if not result.status == 0:
+ self.logger.warning(result.output)
failed_extra_commands.append(command)
if failed_extra_commands:
self.logger.warning("tearDown commands have failed: %s" % ', '.join(map(str, failed_extra_commands)))
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 5c4e01b..93b15ae 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -3,7 +3,7 @@
#
from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, create_temp_layer
import os
import oe
import glob
@@ -185,8 +185,6 @@ class LockedSignatures(OESelftestTestCase):
test_recipe = 'ed'
locked_sigs_file = 'locked-sigs.inc'
- self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file))
-
bitbake(test_recipe)
# Generate locked sigs include file
bitbake('-S none %s' % test_recipe)
@@ -198,16 +196,23 @@ class LockedSignatures(OESelftestTestCase):
# Build a locked recipe
bitbake(test_recipe)
+ templayerdir = tempfile.mkdtemp(prefix='signingqa')
+ create_temp_layer(templayerdir, 'selftestsigning')
+ runCmd('bitbake-layers add-layer %s' % templayerdir)
+
# 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)
+ recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file)
feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4()
- os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
+ os.mkdir(os.path.join(templayerdir, 'recipes-test'))
+ os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe))
write_file(recipe_append_path, feature)
- self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
+ self.add_command_to_tearDown('bitbake-layers remove-layer %s' % templayerdir)
+ self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file))
+ self.add_command_to_tearDown('rm -rf %s' % templayerdir)
# Build the recipe again
ret = bitbake(test_recipe)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list