114 parser = argparse.ArgumentParser(description=__doc__)
115 parser.add_argument(
116 "--type",
117 choices=("div", "sum", "all"),
118 required=True,
119 help=
120 "Select output type (div: divergence report, sum: summary, all: complete stdout)"
121 )
122 parser.add_argument(
123 "--filter",
124 nargs="+",
125 default=[],
126 help="Do not include divergences containing these keywords.")
127 parser.add_argument(
128 "--output-csv",
129 dest="output_csv",
130 action="store_true",
131 default=False,
132 help=
133 "Print output in CSV format to stdout. Only supported for --type=sum")
134 parser.add_argument(
135 "uri",
136 type=str,
137 help=
138 "Uri of one make_a_fuzz run from https://ci.chromium.org/p/dart/builders/ci.sandbox/fuzz-linux."
139 )
140 args = parser.parse_args()
141 if args.type != 'sum' and args.output_csv:
142 print(
'Error: --output-csv can only be provided for --type=sum')
143 return
144
146
147 if len(shard_links) == 0:
149 sys.exit(-1)
150 return
151
152 for link in shard_links:
153 stats =
get_stats(link, args.type, args.filter, args.output_csv)
154 if args.output_csv:
155 print(
"%d,%d,%d,%d,%d,%d" % tuple(stats))
156 else:
158 sys.exit(0)
159
160