[Piglit] [PATCH 4/4] log: add verbose logger

Ilia Mirkin imirkin at alum.mit.edu
Mon Feb 17 12:43:19 PST 2014


On Mon, Feb 17, 2014 at 2:45 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> diff --git a/piglit-resume.py b/piglit-resume.py
> index 7b82420..5d41b9a 100755
> --- a/piglit-resume.py
> +++ b/piglit-resume.py
> @@ -31,6 +31,10 @@ import framework.core as core
>
>  def main():
>      parser = argparse.ArgumentParser()
> +    parser.add_argument("-v", "--verbose",
> +                        action="store_true",
> +                        help="Produce a line of output for each test before "
> +                             "and after it runs")
>      parser.add_argument("results_path",
>                          type=path.realpath,
>                          metavar="<Results Path>",
> @@ -44,6 +48,10 @@ def main():
>                             execute=results.options['execute'],
>                             valgrind=results.options['valgrind'],
>                             dmesg=results.options['dmesg'])
> +
> +    # Verbosity isn't a useful environment setting, and the user should be able
> +    # to set it on their own.
> +    env.verbose = results.options['verbose']

I'm not sure what your comment is referring to... As far as I can see,
the -v to piglit-resume.py isn't actually used, since you use
result.options['verbose']. However I would argue that the expectation
is that piglit-resume.py should work in exactly the same way as the
piglit run that it's resuming, including the verbose setting.

>
>      # Change working directory to the piglit directory
>      os.chdir(path.dirname(path.realpath(sys.argv[0])))


More information about the Piglit mailing list