diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index f7a2533746..415e0315fc 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
@@ -5,6 +5,7 @@ | |||
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, runqemu | 6 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu |
7 | from oeqa.utils.sshcontrol import SSHControl | 7 | from oeqa.utils.sshcontrol import SSHControl |
8 | import glob | ||
8 | import os | 9 | import os |
9 | import json | 10 | import json |
10 | 11 | ||
@@ -347,7 +348,7 @@ UBOOT_ENTRYPOINT = "0x80080000" | |||
347 | Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com> | 348 | Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com> |
348 | Yeoh Ee Peng <ee.peng.yeoh@intel.com> | 349 | Yeoh Ee Peng <ee.peng.yeoh@intel.com> |
349 | """ | 350 | """ |
350 | import glob | 351 | |
351 | image_name = 'core-image-minimal' | 352 | image_name = 'core-image-minimal' |
352 | features = 'IMAGE_GEN_DEBUGFS = "1"\n' | 353 | features = 'IMAGE_GEN_DEBUGFS = "1"\n' |
353 | features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n' | 354 | features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n' |
@@ -368,3 +369,12 @@ UBOOT_ENTRYPOINT = "0x80080000" | |||
368 | for t in dbg_symbols_targets: | 369 | for t in dbg_symbols_targets: |
369 | result = runCmd('objdump --syms %s | grep debug' % t) | 370 | result = runCmd('objdump --syms %s | grep debug' % t) |
370 | self.assertTrue("debug" in result.output, msg='Failed to find debug symbol: %s' % result.output) | 371 | self.assertTrue("debug" in result.output, msg='Failed to find debug symbol: %s' % result.output) |
372 | |||
373 | def test_empty_image(self): | ||
374 | """Test creation of image with no packages""" | ||
375 | bitbake('test-empty-image') | ||
376 | res_dir = get_bb_var('DEPLOY_DIR_IMAGE') | ||
377 | images = os.path.join(res_dir, "test-empty-image-*.manifest") | ||
378 | result = glob.glob(images) | ||
379 | with open(result[1],"r") as f: | ||
380 | self.assertEqual(len(f.read().strip()),0) | ||