scripts: Re-added -q/--quiet to result scripts

I forgot that this is still useful for erroring scripts, such as
stack.py when checking for recursion.

Technically this is possible with -o/dev/null, but that's both
unnecessarily complicated and includes the csv encoding cost for no
reason.
This commit is contained in:
Christopher Haster
2025-03-06 17:50:18 -06:00
parent 675a805164
commit 0d134a2830
9 changed files with 45 additions and 9 deletions
+5 -1
View File
@@ -1083,7 +1083,7 @@ def main(obj_paths, *,
fields=fields, fields=fields,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(CodeResult, results, diff_results, table(CodeResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1105,6 +1105,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1041,7 +1041,7 @@ def main(gcda_paths, *,
fields=fields, fields=fields,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(CovResult, results, diff_results, table(CovResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1071,6 +1071,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -2374,7 +2374,7 @@ def main(csv_paths, *,
depth=depth, depth=depth,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(Result, results, diff_results, table(Result, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -2402,6 +2402,10 @@ if __name__ == "__main__":
'--help-exprs', '--help-exprs',
action='store_true', action='store_true',
help="Show what field exprs are available.") help="Show what field exprs are available.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1379,7 +1379,7 @@ def main(obj_paths, *,
depth=depth, depth=depth,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(CtxResult, results, diff_results, table(CtxResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1403,6 +1403,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1083,7 +1083,7 @@ def main(obj_paths, *,
fields=fields, fields=fields,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(DataResult, results, diff_results, table(DataResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1105,6 +1105,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1604,7 +1604,7 @@ def report(perf_paths, *,
fields=fields, fields=fields,
depth=depth, depth=depth,
**args) **args)
else: elif not args.get('quiet'):
# print table # print table
table(PerfResult, results, diff_results, table(PerfResult, results, diff_results,
by=by, by=by,
@@ -1648,6 +1648,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1601,7 +1601,7 @@ def report(paths, *,
depth=depth, depth=depth,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(PerfBdResult, results, diff_results, table(PerfBdResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1649,6 +1649,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1118,7 +1118,7 @@ def main(ci_paths,
depth=depth, depth=depth,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(StackResult, results, diff_results, table(StackResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1147,6 +1147,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")
+5 -1
View File
@@ -1260,7 +1260,7 @@ def main(obj_paths, *,
depth=depth, depth=depth,
**args) **args)
# print table # print table
else: elif not args.get('quiet'):
table(StructResult, results, diff_results, table(StructResult, results, diff_results,
by=by, by=by,
fields=fields, fields=fields,
@@ -1284,6 +1284,10 @@ if __name__ == "__main__":
'-v', '--verbose', '-v', '--verbose',
action='store_true', action='store_true',
help="Output commands that run behind the scenes.") help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument( parser.add_argument(
'-o', '--output', '-o', '--output',
help="Specify CSV file to store results.") help="Specify CSV file to store results.")