aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-06-23 18:25:53 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:08:50 +0100
commit388c7160b90247df9c78d8803083821402c13af5 (patch)
treef2ce44c1e5876515e3e570c9e1c0399e6fe12871
parent8cb322d6a5be08f0bb2c9e5d3b73161b20d737a3 (diff)
downloadopenembedded-core-contrib-388c7160b90247df9c78d8803083821402c13af5.tar.gz
openembedded-core-contrib-388c7160b90247df9c78d8803083821402c13af5.tar.bz2
openembedded-core-contrib-388c7160b90247df9c78d8803083821402c13af5.zip
oeqa.buildperf: add test Test3
Re-implement "test3" from build-perf-test.sh which measures bitbake parsing time. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oeqa/buildperf/basic_tests.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildperf/basic_tests.py b/meta/lib/oeqa/buildperf/basic_tests.py
index 9012a2df3e..4ebbb77574 100644
--- a/meta/lib/oeqa/buildperf/basic_tests.py
+++ b/meta/lib/oeqa/buildperf/basic_tests.py
@@ -83,3 +83,23 @@ class Test2(BuildPerfTest):
self.sync()
cmd = ['bitbake', self.build_target, '-c', 'rootfs']
self.measure_cmd_resources(cmd, 'do_rootfs', 'bitbake do_rootfs')
+
+
+@perf_test_case
+class Test3(BuildPerfTest):
+ name = "test3"
+ description = "Parsing time metrics (bitbake -p)"
+
+ def _run(self):
+ # Drop all caches and parse
+ self.rm_cache()
+ self.force_rm(os.path.join(self.bb_vars['TMPDIR'], 'cache'))
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_1',
+ 'bitbake -p (no caches)')
+ # Drop tmp/cache
+ self.force_rm(os.path.join(self.bb_vars['TMPDIR'], 'cache'))
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_2',
+ 'bitbake -p (no tmp/cache)')
+ # Parse with fully cached data
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_3',
+ 'bitbake -p (cached)')