[OE-core] [PATCH] buildperf: measure the size of core-image-sato rootfs

Markus Lehtonen markus.lehtonen at linux.intel.com
Thu Mar 15 14:05:41 UTC 2018


On 15/03/2018, 15.14, "Ross Burton" <openembedded-core-bounces at lists.openembedded.org on behalf of ross.burton at intel.com> wrote:

    Signed-off-by: Ross Burton <ross.burton at intel.com>
    ---
     meta/lib/oeqa/buildperf/test_basic.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/meta/lib/oeqa/buildperf/test_basic.py b/meta/lib/oeqa/buildperf/test_basic.py
    index a19089a6ed2..6d6b01b04b4 100644
    --- a/meta/lib/oeqa/buildperf/test_basic.py
    +++ b/meta/lib/oeqa/buildperf/test_basic.py
    @@ -15,8 +15,7 @@ import shutil
     
     import oe.path
     from oeqa.buildperf import BuildPerfTestCase
    -from oeqa.utils.commands import get_bb_vars
    -
    +from oeqa.utils.commands import get_bb_var, get_bb_vars
     
     class Test1P1(BuildPerfTestCase):
         build_target = 'core-image-sato'
    @@ -30,6 +29,7 @@ class Test1P1(BuildPerfTestCase):
             self.measure_cmd_resources(['bitbake', self.build_target], 'build',
                                        'bitbake ' + self.build_target, save_bs=True)
             self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
    +        self.measure_disk_usage(get_bb_var("IMAGE_ROOTFS", self.build_target), 'rootfs', 'rootfs', True)
    
Alternatively you could do
   self.bb_vars = get_bb_vars(None, self.build_target)

as the first step of the test case (i.e. before the rm_tmp() and other initializations). Generally, I think this would be a safer pattern as get_bb_var() does recipe parsing which might affect test results in some cases, although in this particular case it doesn't really matter.

Thanks,
  Markus







More information about the Openembedded-core mailing list