summaryrefslogtreecommitdiffstats
path: root/scripts/oe-build-perf-test
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-29 22:48:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-03 09:58:41 +0100
commit35ae939e41157f6b1ba1ee4898550d049fc47afa (patch)
tree7a833c448b5a5705d26fd2dff9e7aa7668e1c9cc /scripts/oe-build-perf-test
parente8c47a634328fff6a53919fd37755bd50c02f548 (diff)
downloadpoky-35ae939e41157f6b1ba1ee4898550d049fc47afa.tar.gz
oe-build-perf-test: rename log file and implement --log-file
Rename the (main) log file of the oe-build-perf-test script from 'output.log' to 'oe-build-perf-test.log'. Also, add a new command line option --log-file which makes it possible to use an alternative log file name/path, if needed. Note that the file name/path is relative to the output directory. (From OE-Core rev: 4909fae1a6d1d068b33252088b41b8d82d1a836c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-build-perf-test')
-rwxr-xr-xscripts/oe-build-perf-test5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 3dab070edc..8d7fdf269e 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -131,6 +131,9 @@ def parse_args(argv):
131 parser.add_argument('-o', '--out-dir', default='results-{date}', 131 parser.add_argument('-o', '--out-dir', default='results-{date}',
132 type=os.path.abspath, 132 type=os.path.abspath,
133 help="Output directory for test results") 133 help="Output directory for test results")
134 parser.add_argument('--log-file', type=os.path.abspath,
135 default='{out_dir}/oe-build-perf-test.log',
136 help="Log file of this script")
134 parser.add_argument('--run-tests', nargs='+', metavar='TEST', 137 parser.add_argument('--run-tests', nargs='+', metavar='TEST',
135 help="List of tests to run") 138 help="List of tests to run")
136 parser.add_argument('--commit-results', metavar='GIT_DIR', 139 parser.add_argument('--commit-results', metavar='GIT_DIR',
@@ -152,7 +155,7 @@ def main(argv=None):
152 155
153 # Set-up log file 156 # Set-up log file
154 out_dir = args.out_dir.format(date=datetime.now().strftime('%Y%m%d%H%M%S')) 157 out_dir = args.out_dir.format(date=datetime.now().strftime('%Y%m%d%H%M%S'))
155 setup_file_logging(os.path.join(out_dir, 'output.log')) 158 setup_file_logging(args.log_file.format(out_dir=out_dir))
156 159
157 if args.debug: 160 if args.debug:
158 log.setLevel(logging.DEBUG) 161 log.setLevel(logging.DEBUG)