diff options
| author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-05-11 14:42:32 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:22:46 +0100 |
| commit | 1d88659ef6b96408243144d41bd99dd3ff5015e2 (patch) | |
| tree | fc2736ca9ce5b2bb2fd6ff27f8960a244c506c24 /scripts/oe-build-perf-test | |
| parent | 6512d6956b23d7b596c3ae37e01c5b842da95690 (diff) | |
| download | poky-1d88659ef6b96408243144d41bd99dd3ff5015e2.tar.gz | |
oeqa.buildperf: implement BuildPerfTestRunner class
The new class is responsible for actually running the tests and
processing their results. This commit also adds a decorator function for
adding new tests. No automatic test discovery, at least yet.
(From OE-Core rev: bf90aecb7e150d6bfac7240286c797b79d26528b)
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 'scripts/oe-build-perf-test')
| -rwxr-xr-x | scripts/oe-build-perf-test | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test index 9589dee3ac..0a9fc9e7d4 100755 --- a/scripts/oe-build-perf-test +++ b/scripts/oe-build-perf-test | |||
| @@ -18,11 +18,12 @@ import argparse | |||
| 18 | import logging | 18 | import logging |
| 19 | import os | 19 | import os |
| 20 | import sys | 20 | import sys |
| 21 | from datetime import datetime | ||
| 21 | 22 | ||
| 22 | sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib') | 23 | sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib') |
| 23 | import scriptpath | 24 | import scriptpath |
| 24 | scriptpath.add_oe_lib_path() | 25 | scriptpath.add_oe_lib_path() |
| 25 | from oeqa.buildperf import KernelDropCaches | 26 | from oeqa.buildperf import BuildPerfTestRunner, KernelDropCaches |
| 26 | from oeqa.utils.commands import runCmd | 27 | from oeqa.utils.commands import runCmd |
| 27 | 28 | ||
| 28 | 29 | ||
| @@ -75,7 +76,12 @@ def main(argv=None): | |||
| 75 | # Check our capability to drop caches and ask pass if needed | 76 | # Check our capability to drop caches and ask pass if needed |
| 76 | KernelDropCaches.check() | 77 | KernelDropCaches.check() |
| 77 | 78 | ||
| 78 | return 0 | 79 | # Run actual tests |
| 80 | out_dir = 'results-{}'.format(datetime.now().strftime('%Y%m%d%H%M%S')) | ||
| 81 | runner = BuildPerfTestRunner(out_dir) | ||
| 82 | ret = runner.run_tests() | ||
| 83 | |||
| 84 | return ret | ||
| 79 | 85 | ||
| 80 | 86 | ||
| 81 | if __name__ == '__main__': | 87 | if __name__ == '__main__': |
