[Piglit] [PATCH] summary/console: Add -p / --problems

Dylan Baker dylan at pnwbakers.com
Mon Dec 11 22:52:55 UTC 2017


Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Adam Jackson (2017-12-05 08:08:37)
> 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
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20171211/951547c6/attachment.sig>


More information about the Piglit mailing list