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:22:47 +0100 |
commit | 1701a34f1483d9bced6352b8a9f00aa501166d02 (patch) | |
tree | db755361836e09fd18a8e72cd7e741275174d833 /meta/lib/oeqa | |
parent | b5ca437714fd97f84de56c8c6e57ba1bf52e8665 (diff) | |
download | poky-1701a34f1483d9bced6352b8a9f00aa501166d02.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa')
-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 @@ | |||
10 | # more details. | 10 | # more details. |
11 | # | 11 | # |
12 | """Basic set of build performance tests""" | 12 | """Basic set of build performance tests""" |
13 | import os | ||
14 | |||
13 | from . import BuildPerfTest, perf_test_case | 15 | from . import BuildPerfTest, perf_test_case |
14 | 16 | ||
15 | 17 | ||
@@ -43,3 +45,27 @@ class Test1P2(BuildPerfTest): | |||
43 | self.sync() | 45 | self.sync() |
44 | self.measure_cmd_resources(['bitbake', self.build_target], 'build', | 46 | self.measure_cmd_resources(['bitbake', self.build_target], 'build', |
45 | 'bitbake ' + self.build_target) | 47 | 'bitbake ' + self.build_target) |
48 | |||
49 | |||
50 | @perf_test_case | ||
51 | class Test1P3(BuildPerfTest): | ||
52 | name = "test13" | ||
53 | build_target = 'core-image-sato' | ||
54 | description = "Build {} with rm_work enabled".format(build_target) | ||
55 | |||
56 | def _run(self): | ||
57 | postfile = os.path.join(self.out_dir, 'postfile.conf') | ||
58 | with open(postfile, 'w') as fobj: | ||
59 | fobj.write('INHERIT += "rm_work"\n') | ||
60 | try: | ||
61 | self.rm_tmp() | ||
62 | self.rm_sstate() | ||
63 | self.rm_cache() | ||
64 | self.sync() | ||
65 | cmd = ['bitbake', '-R', postfile, self.build_target] | ||
66 | self.measure_cmd_resources(cmd, 'build', | ||
67 | 'bitbake' + self.build_target) | ||
68 | self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir') | ||
69 | finally: | ||
70 | os.unlink(postfile) | ||
71 | self.save_buildstats() | ||