diff --git a/README.md b/README.md index d44c60e4e652f9e9cdc75eb9858fa0ab801779f5..717e092fe42a2fb084bef57fb547f042d0f106fe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SCT_Parser +# EDK2 SCT Results Parser This is an external parser script for [UEFI SCT]. (WIP) @@ -9,6 +9,19 @@ It will proceed to generate a Markdown file listing number of failures, passes, [UEFI SCT]: https://uefi.org/testtools +## Quick Start + +If you're using this tool to analyze EBBR test results, use the following +command. The parsed report can be found in `result.md`. + +``` {.sh} +$ ./parser.py --config EBBR.yaml \ + \ + +INFO apply_rules: Updated 200 test(s) out of 12206 after applying 124 rule(s) +INFO main: 0 dropped(s), 1 failure(s), 93 ignored(s), 106 known u-boot limitation(s), 12006 pass(s), 0 warning(s) +``` + ## Usage Usage to generate a "result md" is such. `python3 parser.py ` If you do no provided any command line arguments it will use `sample.ekl` and `sample.seq`. diff --git a/parser.py b/parser.py index 62be4ba2a1958f83397cfd6119daadba81976ac9..7cd9789945c5e1c643036c4e28871bf687a9d1ce 100755 --- a/parser.py +++ b/parser.py @@ -578,7 +578,7 @@ def combine_dbs(db1, db2): return cross_check -def main(): +if __name__ == '__main__': parser = argparse.ArgumentParser( description='Process SCT results.' ' This program takes the SCT summary and sequence files,' @@ -604,12 +604,8 @@ def main(): '--uniq', action='store_true', help='Collapse duplicates') parser.add_argument( '--print', action='store_true', help='Print results to stdout') - parser.add_argument( - 'log_file', nargs='?', default='sample.ekl', - help='Input .ekl filename') - parser.add_argument( - 'seq_file', nargs='?', default='sample.seq', - help='Input .seq filename') + parser.add_argument('log_file', help='Input .ekl filename') + parser.add_argument('seq_file', help='Input .seq filename') parser.add_argument('find_key', nargs='?', help='Search key') parser.add_argument('find_value', nargs='?', help='Search value') @@ -751,6 +747,3 @@ def main(): print( x["guid"], ":", x["name"], "with", args.find_key, ":", x[args.find_key]) - - -main()