diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-06-23 18:20:21 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:08:50 +0100 |
commit | bfe48d343e8a281760da0b6744c08d47039f93e0 (patch) | |
tree | 96ca9f46092597a38f4b172ed6cb352d94a3bd41 /meta/lib | |
parent | 5ff82c6e2b0ff41a9bfdd49c99e84a982cf6e467 (diff) | |
download | openembedded-core-bfe48d343e8a281760da0b6744c08d47039f93e0.tar.gz openembedded-core-bfe48d343e8a281760da0b6744c08d47039f93e0.tar.bz2 openembedded-core-bfe48d343e8a281760da0b6744c08d47039f93e0.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.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | 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 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() |