summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-01-11 12:57:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-16 18:05:13 +0000
commitcf8fcba8e7f57c4211591f69b33aeb4203b9076c (patch)
treefac21db6f3e4b829357e4f90a817682503b6f917
parent5659aa92b53e4c312d6a962f5d5e8c775d4bfc72 (diff)
downloadpoky-cf8fcba8e7f57c4211591f69b33aeb4203b9076c.tar.gz
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>
-rw-r--r--meta/lib/oeqa/selftest/archiver.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/archiver.py b/meta/lib/oeqa/selftest/archiver.py
index f2030c446d..97b6f5b212 100644
--- a/meta/lib/oeqa/selftest/archiver.py
+++ b/meta/lib/oeqa/selftest/archiver.py
@@ -26,25 +26,17 @@ class Archiver(oeSelfTest):
26 features += 'ARCHIVER_MODE[src] = "original"\n' 26 features += 'ARCHIVER_MODE[src] = "original"\n'
27 features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe 27 features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe
28 features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe 28 features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
29
30 # Update local.conf
31 self.write_config(features) 29 self.write_config(features)
32 30
33 tmp_dir = get_bb_var('TMPDIR') 31 shutil.rmtree(get_bb_var('TMPDIR'))
34 deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC') 32 bitbake("%s %s" % (include_recipe, exclude_recipe))
35 target_sys = get_bb_var('TARGET_SYS')
36 src_path = os.path.join(deploy_dir_src, target_sys)
37
38 # Delete tmp directory
39 shutil.rmtree(tmp_dir)
40 33
41 # Build core-image-minimal 34 src_path = os.path.join(get_bb_var('DEPLOY_DIR_SRC'), get_bb_var('TARGET_SYS'))
42 bitbake('core-image-minimal')
43 35
44 # Check that include_recipe was included 36 # Check that include_recipe was included
45 is_included = len(glob.glob(src_path + '/%s*' % include_recipe)) 37 included_present = len(glob.glob(src_path + '/%s-*' % include_recipe))
46 self.assertEqual(1, is_included, 'Recipe %s was not included.' % include_recipe) 38 self.assertTrue(included_present, 'Recipe %s was not included.' % include_recipe)
47 39
48 # Check that exclude_recipe was excluded 40 # Check that exclude_recipe was excluded
49 is_excluded = len(glob.glob(src_path + '/%s*' % exclude_recipe)) 41 excluded_present = len(glob.glob(src_path + '/%s-*' % exclude_recipe))
50 self.assertEqual(0, is_excluded, 'Recipe %s was not excluded.' % exclude_recipe) 42 self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % exclude_recipe)