Skip to contentSkip to conversation

buildperf: measure the size of core-image-sato rootfs

PATCH In review Ross Burton 2 participants 2 messages Mar 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buildperf: measure the size of core-image-sato rootfs

---
 meta/lib/oeqa/buildperf/test_basic.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/buildperf/test_basic.py +2 -2
index a19089a6ed2..6d6b01b04b4 100644
@@ -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)
 
 
 class Test1P2(BuildPerfTestCase):
Signature · 1 line
2.11.0
#1 lore raw

On 15/03/2018, 15.14, "Ross Burton" <[email protected] on behalf of [email protected]> wrote:

---
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