]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-build-perf-test: set-up file logging as early as possible
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 16 Aug 2016 09:15:59 +0000 (12:15 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Aug 2016 09:35:25 +0000 (10:35 +0100)
So that the log file would not miss any records.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-build-perf-test

index 4e6d7383748da36638b03da4cfc016befcb9f2c6..07f2a1fde5bac5b9414661a682afed46ca455a6d 100755 (executable)
@@ -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)