Commit ad8992d3 authored by Adam Jackson's avatar Adam Jackson 🎧

summary/console: Add -p / --problems

This is convenient for extracting a focused test set from a more
comprehensive run, to speed up bisection or per-commit validation.
Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
parent 1a4372ad
...@@ -147,6 +147,11 @@ def console(input_): ...@@ -147,6 +147,11 @@ def console(input_):
const="incomplete", const="incomplete",
dest='mode', dest='mode',
help="Only display tests that are incomplete.") help="Only display tests that are incomplete.")
excGroup1.add_argument("-p", "--problems",
action="store_const",
const="problems",
dest='mode',
help="Only display tests that had problems.")
parser.add_argument("-l", "--list", parser.add_argument("-l", "--list",
action="store", action="store",
help="Use test results from a list file") help="Use test results from a list file")
......
...@@ -108,7 +108,7 @@ def _print_result(results, list_): ...@@ -108,7 +108,7 @@ def _print_result(results, list_):
def console(resultsFiles, mode): def console(resultsFiles, mode):
""" Write summary information to the console for the given list of """ Write summary information to the console for the given list of
results files in the given mode.""" results files in the given mode."""
assert mode in ['summary', 'diff', 'incomplete', 'all'], mode assert mode in ['summary', 'diff', 'incomplete', 'problems', 'all'], mode
results = Results([backends.load(r) for r in resultsFiles]) results = Results([backends.load(r) for r in resultsFiles])
# Print the name of the test and the status from each test run # Print the name of the test and the status from each test run
...@@ -120,5 +120,7 @@ def console(resultsFiles, mode): ...@@ -120,5 +120,7 @@ def console(resultsFiles, mode):
_print_summary(results) _print_summary(results)
elif mode == 'incomplete': elif mode == 'incomplete':
_print_result(results, results.names.all_incomplete) _print_result(results, results.names.all_incomplete)
elif mode == 'problems':
_print_result(results, results.names.all_problems)
elif mode == 'summary': elif mode == 'summary':
_print_summary(results) _print_summary(results)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment