[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1133/8267] oeqa.buildperf: add test Test1P3



commit 1701a34f1483d9bced6352b8a9f00aa501166d02
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date:   Thu Jun 23 18:20:21 2016 +0300

    oeqa.buildperf: add test Test1P3
    
    Re-implement "test1_p3" from build-perf-test.sh which measures
    'bitbake core-image-sato' with rm_work enabled.
    
    (From OE-Core rev: bfe48d343e8a281760da0b6744c08d47039f93e0)
    
    Signed-off-by: Markus Lehtonen <markus lehtonen linux intel com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/lib/oeqa/buildperf/basic_tests.py |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/meta/lib/oeqa/buildperf/basic_tests.py b/meta/lib/oeqa/buildperf/basic_tests.py
index 80bdb3f..a3c1e82 100644
--- a/meta/lib/oeqa/buildperf/basic_tests.py
+++ b/meta/lib/oeqa/buildperf/basic_tests.py
@@ -10,6 +10,8 @@
 # more details.
 #
 """Basic set of build performance tests"""
+import os
+
 from . import BuildPerfTest, perf_test_case
 
 
@@ -43,3 +45,27 @@ class Test1P2(BuildPerfTest):
         self.sync()
         self.measure_cmd_resources(['bitbake', self.build_target], 'build',
                                    'bitbake ' + self.build_target)
+
+
+@perf_test_case
+class Test1P3(BuildPerfTest):
+    name = "test13"
+    build_target = 'core-image-sato'
+    description = "Build {} with rm_work enabled".format(build_target)
+
+    def _run(self):
+        postfile = os.path.join(self.out_dir, 'postfile.conf')
+        with open(postfile, 'w') as fobj:
+            fobj.write('INHERIT += "rm_work"\n')
+        try:
+            self.rm_tmp()
+            self.rm_sstate()
+            self.rm_cache()
+            self.sync()
+            cmd = ['bitbake', '-R', postfile, self.build_target]
+            self.measure_cmd_resources(cmd, 'build',
+                                       'bitbake' + self.build_target)
+            self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+        finally:
+            os.unlink(postfile)
+        self.save_buildstats()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]