summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2020-11-05 16:25:00 -0500
committerAdam Jackson <ajax@redhat.com>2020-12-02 10:33:00 -0500
commitb1ef8101fa61a672f26b79b757868b773557336c (patch)
tree2968f7511629a4ebacffe1653c2ac788793580cc /framework
parent9173582181fe9891b1cc8af050dd0d14e930cfb1 (diff)
summary: Add -r/--regressions to console-mode output
The mode's already there, just not wired up for some reason.
Diffstat (limited to 'framework')
-rw-r--r--framework/programs/summary.py5
-rw-r--r--framework/summary/console_.py4
2 files changed, 8 insertions, 1 deletions
diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index 3a6e4f3c2..4790bf0bc 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -148,6 +148,11 @@ def console(input_):
const="problems",
dest='mode',
help="Only display tests that had problems.")
+ excGroup1.add_argument("-r", "--regressions",
+ action="store_const",
+ const="regressions",
+ dest='mode',
+ help="Only display tests that regressed.")
parser.add_argument("-l", "--list",
action="store",
help="Use test results from a list file")
diff --git a/framework/summary/console_.py b/framework/summary/console_.py
index 287e52a45..4b392430d 100644
--- a/framework/summary/console_.py
+++ b/framework/summary/console_.py
@@ -105,7 +105,7 @@ def _print_result(results, list_):
def console(resultsFiles, mode):
""" Write summary information to the console for the given list of
results files in the given mode."""
- assert mode in ['summary', 'diff', 'incomplete', 'problems', 'all'], mode
+ assert mode in ['summary', 'diff', 'incomplete', 'problems', 'regressions', 'all'], mode
results = Results([backends.load(r) for r in resultsFiles])
# Print the name of the test and the status from each test run
@@ -119,5 +119,7 @@ def console(resultsFiles, mode):
_print_result(results, results.names.all_incomplete)
elif mode == 'problems':
_print_result(results, results.names.all_problems)
+ elif mode == 'regressions':
+ _print_result(results, results.names.all_regressions)
elif mode == 'summary':
_print_summary(results)