oe-build-perf-test: add --out-dir command line argument
The new option defines the output directory for the test result data. (From OE-Core rev: bc865b5cb5a9a76048ee9c55a29f5e1a926bb543) 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>
This commit is contained in:
parent
c3ee14ef38
commit
0c92770ed2
|
@ -90,6 +90,8 @@ def parse_args(argv):
|
||||||
parser.add_argument('--lock-file', default='./oe-build-perf.lock',
|
parser.add_argument('--lock-file', default='./oe-build-perf.lock',
|
||||||
metavar='FILENAME',
|
metavar='FILENAME',
|
||||||
help="Lock file to use")
|
help="Lock file to use")
|
||||||
|
parser.add_argument('-o', '--out-dir', default='results-{date}',
|
||||||
|
help="Output directory for test results")
|
||||||
|
|
||||||
return parser.parse_args(argv)
|
return parser.parse_args(argv)
|
||||||
|
|
||||||
|
@ -113,7 +115,7 @@ def main(argv=None):
|
||||||
KernelDropCaches.check()
|
KernelDropCaches.check()
|
||||||
|
|
||||||
# Set-up log file
|
# Set-up log file
|
||||||
out_dir = 'results-{}'.format(datetime.now().strftime('%Y%m%d%H%M%S'))
|
out_dir = args.out_dir.format(date=datetime.now().strftime('%Y%m%d%H%M%S'))
|
||||||
setup_file_logging(os.path.join(out_dir, 'output.log'))
|
setup_file_logging(os.path.join(out_dir, 'output.log'))
|
||||||
|
|
||||||
# Run actual tests
|
# Run actual tests
|
||||||
|
|
Loading…
Reference in New Issue