oe-build-perf-test: set-up file logging as early as possible

So that the log file would not miss any records.

(From OE-Core rev: 9ce6e20ce239067896dc65f09e3fef1173293065)

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:
Markus Lehtonen 2016-08-16 12:15:59 +03:00 committed by Richard Purdie
parent 74820e99f7
commit 5039a910b7
1 changed files with 4 additions and 3 deletions

View File

@ -112,6 +112,10 @@ def main(argv=None):
"""Script entry point"""
args = parse_args(argv)
# Set-up log file
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'))
if args.debug:
log.setLevel(logging.DEBUG)
@ -129,9 +133,6 @@ def main(argv=None):
# Load build perf tests
loader = BuildPerfTestLoader()
suite = loader.discover(start_dir=os.path.dirname(oeqa.buildperf.__file__))
# Set-up log file
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'))
archive_build_conf(out_dir)
runner = BuildPerfTestRunner(out_dir, verbosity=2)