summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-06-23 18:20:21 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:22:47 +0100
commit1701a34f1483d9bced6352b8a9f00aa501166d02 (patch)
treedb755361836e09fd18a8e72cd7e741275174d833
parentb5ca437714fd97f84de56c8c6e57ba1bf52e8665 (diff)
downloadopenembedded-core-contrib-1701a34f1483d9bced6352b8a9f00aa501166d02.tar.gz
openembedded-core-contrib-1701a34f1483d9bced6352b8a9f00aa501166d02.tar.bz2
openembedded-core-contrib-1701a34f1483d9bced6352b8a9f00aa501166d02.zip
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>
-rw-r--r--meta/lib/oeqa/buildperf/basic_tests.py26
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 80bdb3fbcb..a3c1e82bce 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()