]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa.buildperf: add test Test3
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 23 Jun 2016 15:25:53 +0000 (18:25 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Jul 2016 15:08:50 +0000 (16:08 +0100)
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>
meta/lib/oeqa/buildperf/basic_tests.py

index 9012a2df3ea8fde83742b24b2c57815a28489595..4ebbb7757442baaa0339f957cab84538ca0cbed7 100644 (file)
@@ -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)')