]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-build-perf-test: add --out-dir command line argument
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 9 May 2016 14:27:35 +0000 (17:27 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Jul 2016 15:08:52 +0000 (16:08 +0100)
The new option defines the output directory for the test result data.

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 64873c90aac5ea18b7d248d5267842002e421b4a..996996bc62cfc0c5713c6a16d936c791aa4607ba 100755 (executable)
@@ -90,6 +90,8 @@ def parse_args(argv):
     parser.add_argument('--lock-file', default='./oe-build-perf.lock',
                         metavar='FILENAME',
                         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)
 
@@ -113,7 +115,7 @@ def main(argv=None):
     KernelDropCaches.check()
 
     # 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'))
 
     # Run actual tests