From: Ross Burton Date: Mon, 13 Mar 2023 12:59:08 +0000 (+0000) Subject: resulttool: add log --list-ptest X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~1398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd2d7adf02005d46f19c93a40db1e10ce01ac261;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git resulttool: add log --list-ptest Add a convenience argument to the log subcommand to list all of the ptest logs in a testresults file. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/resulttool/log.py b/scripts/lib/resulttool/log.py index eb3927ec82a..621c6c4bacc 100644 --- a/scripts/lib/resulttool/log.py +++ b/scripts/lib/resulttool/log.py @@ -34,6 +34,9 @@ def log(args, logger): return 1 for _, run_name, _, r in resultutils.test_run_results(results): + if args.list_ptest: + print('\n'.join(sorted(r['ptestresult.sections'].keys()))) + if args.dump_ptest: for sectname in ['ptestresult.sections', 'ltpposixresult.sections', 'ltpresult.sections']: if sectname in r: @@ -86,6 +89,8 @@ def register_commands(subparsers): parser.set_defaults(func=log) parser.add_argument('source', help='the results file/directory/URL to import') + parser.add_argument('--list-ptest', action='store_true', + help='list the ptest test names') parser.add_argument('--ptest', action='append', default=[], help='show logs for a ptest') parser.add_argument('--dump-ptest', metavar='DIR',