[Piglit] [PATCH] summary/console: Add -p / --problems
Adam Jackson
ajax at redhat.com
Tue Dec 5 16:08:37 UTC 2017
This is convenient for extracting a focused test set from a more
comprehensive run, to speed up bisection or per-commit validation.
---
framework/programs/summary.py | 5 +++++
framework/summary/console_.py | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index e400d9a76..ef106bc1b 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -145,6 +145,11 @@ def console(input_):
const="incomplete",
dest='mode',
help="Only display tests that are incomplete.")
+ excGroup1.add_argument("-p", "--problems",
+ action="store_const",
+ const="problems",
+ dest='mode',
+ help="Onlu display tests that had problems.")
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 ee6cbd858..a51a54efc 100644
--- a/framework/summary/console_.py
+++ b/framework/summary/console_.py
@@ -108,7 +108,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', 'all'], mode
+ assert mode in ['summary', 'diff', 'incomplete', 'problems', 'all'], mode
results = Results([backends.load(r) for r in resultsFiles])
# Print the name of the test and the status from each test run
@@ -120,5 +120,7 @@ def console(resultsFiles, mode):
_print_summary(results)
elif mode == 'incomplete':
_print_result(results, results.names.all_incomplete)
+ elif mode == 'problems':
+ _print_result(results, results.names.all_problems)
elif mode == 'summary':
_print_summary(results)
--
2.14.3
More information about the Piglit
mailing list