diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-11 16:50:55 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:46 +0100 |
commit | c284616ffb994915bcb31b731c565c4426190faa (patch) | |
tree | a3e07ad15365d6641ebc454d800b3a373a425614 | |
parent | e484378325591ad42dc413342035043090c5f616 (diff) | |
download | poky-c284616ffb994915bcb31b731c565c4426190faa.tar.gz |
oe-build-perf-test: implement --run-tests option
Makes it possible to run only a subset of tests.
NOTE: The tests currently have (unwritten) dependencies on each other so
use this option with care. Mainly for debugging.
(From OE-Core rev: be4373be54e5b84f951771b0e75140f212838020)
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>
-rwxr-xr-x | scripts/oe-build-perf-test | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test index 88af40ab76..808531efff 100755 --- a/scripts/oe-build-perf-test +++ b/scripts/oe-build-perf-test | |||
@@ -105,6 +105,8 @@ def parse_args(argv): | |||
105 | help="Lock file to use") | 105 | help="Lock file to use") |
106 | parser.add_argument('-o', '--out-dir', default='results-{date}', | 106 | parser.add_argument('-o', '--out-dir', default='results-{date}', |
107 | help="Output directory for test results") | 107 | help="Output directory for test results") |
108 | parser.add_argument('--run-tests', nargs='+', metavar='TEST', | ||
109 | help="List of tests to run") | ||
108 | 110 | ||
109 | return parser.parse_args(argv) | 111 | return parser.parse_args(argv) |
110 | 112 | ||
@@ -133,7 +135,10 @@ def main(argv=None): | |||
133 | 135 | ||
134 | # Load build perf tests | 136 | # Load build perf tests |
135 | loader = BuildPerfTestLoader() | 137 | loader = BuildPerfTestLoader() |
136 | suite = loader.discover(start_dir=os.path.dirname(oeqa.buildperf.__file__)) | 138 | if args.run_tests: |
139 | suite = loader.loadTestsFromNames(args.run_tests, oeqa.buildperf) | ||
140 | else: | ||
141 | suite = loader.loadTestsFromModule(oeqa.buildperf) | ||
137 | 142 | ||
138 | archive_build_conf(out_dir) | 143 | archive_build_conf(out_dir) |
139 | runner = BuildPerfTestRunner(out_dir, verbosity=2) | 144 | runner = BuildPerfTestRunner(out_dir, verbosity=2) |