[oe-commits] [openembedded-core] 54/86: oe-build-perf-test: rename log file and implement --log-file

git at git.openembedded.org git at git.openembedded.org
Tue Aug 30 16:19:01 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d4147c1ff7ad59b35fcaeaf42cbce04d00e1823c
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Mon Aug 29 22:48:22 2016 +0300

    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.
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/oe-build-perf-test | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 3dab070..8d7fdf2 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -131,6 +131,9 @@ def parse_args(argv):
     parser.add_argument('-o', '--out-dir', default='results-{date}',
                         type=os.path.abspath,
                         help="Output directory for test results")
+    parser.add_argument('--log-file', type=os.path.abspath,
+                        default='{out_dir}/oe-build-perf-test.log',
+                        help="Log file of this script")
     parser.add_argument('--run-tests', nargs='+', metavar='TEST',
                         help="List of tests to run")
     parser.add_argument('--commit-results', metavar='GIT_DIR',
@@ -152,7 +155,7 @@ def main(argv=None):
 
     # 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'))
+    setup_file_logging(args.log_file.format(out_dir=out_dir))
 
     if args.debug:
         log.setLevel(logging.DEBUG)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list