From cd2d7adf02005d46f19c93a40db1e10ce01ac261 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 13 Mar 2023 12:59:08 +0000 Subject: [PATCH] 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 --- scripts/lib/resulttool/log.py | 5 +++++ 1 file changed, 5 insertions(+) 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', -- 2.47.2