lib/resulttool: fix typo breaking resulttool log --ptest
PATCH 1/2 lib/resulttool: fix typo breaking resulttool log --ptest
ptestresult_get_log() looked for a key called 'ptestresuls.sections', which should be 'ptestresult.sections'
Signed-off-by Ross Burton <[email protected]>
--- scripts/lib/resulttool/resultutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/resulttool/resultutils.py +1 -1
@@ -142,7 +142,7 @@ def generic_get_log(sectionname, results, section): return decode_log(ptest['log']) def ptestresult_get_log(results, section): - return generic_get_log('ptestresuls.sections', results, section) + return generic_get_log('ptestresult.sections', results, section) def generic_get_rawlogs(sectname, results): if sectname not in results:
Signature · 1 line
2.34.1
PATCH 2/2 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 <[email protected]>
--- scripts/lib/resulttool/log.py | 5 +++++ 1 file changed, 5 insertions(+)
scripts/lib/resulttool/log.py +5 -0
@@ -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',
Signature · 1 line
2.34.1