[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4021/8267] selftest/archiver: don't build an image for a basic test
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4021/8267] selftest/archiver: don't build an image for a basic test
- Date: Sun, 17 Dec 2017 01:27:06 +0000 (UTC)
commit cf8fcba8e7f57c4211591f69b33aeb4203b9076c
Author: Ross Burton <ross burton intel com>
Date: Wed Jan 11 12:57:55 2017 +0000
selftest/archiver: don't build an image for a basic test
This test only exercises the include/exclude behaviour so it only needs to build
the two recipes that it tests against, not an entire image.
Part of #10874.
(From OE-Core rev: 9b02216be6c9dbf2f680db1ad1309bcb9fb32b23)
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oeqa/selftest/archiver.py | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/meta/lib/oeqa/selftest/archiver.py b/meta/lib/oeqa/selftest/archiver.py
index f2030c4..97b6f5b 100644
--- a/meta/lib/oeqa/selftest/archiver.py
+++ b/meta/lib/oeqa/selftest/archiver.py
@@ -26,25 +26,17 @@ class Archiver(oeSelfTest):
features += 'ARCHIVER_MODE[src] = "original"\n'
features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe
features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
-
- # Update local.conf
self.write_config(features)
- tmp_dir = get_bb_var('TMPDIR')
- deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC')
- target_sys = get_bb_var('TARGET_SYS')
- src_path = os.path.join(deploy_dir_src, target_sys)
-
- # Delete tmp directory
- shutil.rmtree(tmp_dir)
+ shutil.rmtree(get_bb_var('TMPDIR'))
+ bitbake("%s %s" % (include_recipe, exclude_recipe))
- # Build core-image-minimal
- bitbake('core-image-minimal')
+ src_path = os.path.join(get_bb_var('DEPLOY_DIR_SRC'), get_bb_var('TARGET_SYS'))
# Check that include_recipe was included
- is_included = len(glob.glob(src_path + '/%s*' % include_recipe))
- self.assertEqual(1, is_included, 'Recipe %s was not included.' % include_recipe)
+ included_present = len(glob.glob(src_path + '/%s-*' % include_recipe))
+ self.assertTrue(included_present, 'Recipe %s was not included.' % include_recipe)
# Check that exclude_recipe was excluded
- is_excluded = len(glob.glob(src_path + '/%s*' % exclude_recipe))
- self.assertEqual(0, is_excluded, 'Recipe %s was not excluded.' % exclude_recipe)
+ excluded_present = len(glob.glob(src_path + '/%s-*' % exclude_recipe))
+ self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % exclude_recipe)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]