[Piglit] [PATCH 2/6] piglit-run.py: Replace Piglit's --concurent flag with --no-concurrency

Ken Phillis Jr kphillisjr at gmail.com
Mon Mar 4 14:25:01 PST 2013


i agree with adding an easier to understand option, however removing
the old option may have unintended consequences for developers that
use automated test systems. These systems currently add the flag
"-concurrent=off". I would instead option for the solution of keeping
the deprecated behavior for a few more months longer, and print a
warning when users run with the deprecated option(s).

On Sat, Mar 2, 2013 at 6:00 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> Since piglit defaults to using concurrency, and since concurrency is
> generally the desired behavior, it seems more appropriate to have a flag
> that turns off concurrency than one that takes an argument to set it on
> or off.
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
>  piglit-run.py | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/piglit-run.py b/piglit-run.py
> index 0ab8fc6..8931a7d 100755
> --- a/piglit-run.py
> +++ b/piglit-run.py
> @@ -50,8 +50,7 @@ Options:
>    -x regexp, --exclude-tests=regexp Excludey matching tests (can be used
>                              more than once)
>    -n name, --name=name      Name of the testrun
> -  -c bool, --concurrent=bool  Enable/disable concurrent test runs. Valid
> -                             option values are: 0, 1, on, off.  (default: on)
> +  --no-concurrency          Disables concurrent test runs
>    --valgrind                Run tests in valgrind's memcheck.
>    -p platform, --platform=platform  Name of the piglit platform to use.
>  Example:
> @@ -84,7 +83,7 @@ def main():
>                          "include-tests=",
>                          "name=",
>                          "exclude-tests=",
> -                        "concurrent=",
> +                        "no-concurrency",
>                          "platform=",
>                          ]
>                 options, args = getopt(sys.argv[1:], "hdrt:n:x:c:p:", option_list)
> @@ -114,13 +113,8 @@ def main():
>                         env.exclude_filter.append(re.compile(value))
>                 elif name in ('-n', '--name'):
>                         OptionName = value
> -               elif name in ('-c, --concurrent'):
> -                       if value in ('1', 'on'):
> -                               env.concurrent = True
> -                       elif value in ('0', 'off'):
> -                               env.concurrent = False
> -                       else:
> -                               usage()
> +               elif name in ('--no-concurrency'):
> +                       env.concurrent = False
>                 elif name in ('-p, --platform'):
>                         platform = value
>
> --
> 1.8.1.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list