[Piglit] [PATCH piglit 1/2] Make Python scripts independent of the current working directory

Paul Berry stereotype441 at gmail.com
Thu Oct 13 09:59:37 PDT 2011


On 12 October 2011 03:06, Matěj Cepl <mcepl at redhat.com> wrote:

> > > +    # Return back to the original path
> > > +    os.chdir(start_dir)
> >
> > Is this actually necessary?  This only resets the working directory for
> the
> > process that is just about to terminate.
>
> Yes, you are right. I was afraid of changing cwd of calling shell, but
> that's
> nonsense.
>
> Otherwise I have just rewritten and extended patch commentary.
>
> -----------------------------------
> The main purpose of this patch is to make piglit independent of the
> current working directory, so it is possible to package piglit as a RPM
> package (with binaries symlinked to /usr/bin, most of the files in
> read-only /usr/lib*/piglit directory, and results somewhere else).
>
> So it is now possible to run
>
> $ piglit-run tests/quick-driver.tests /tmp/piglit
>
> and then with this command
>
> $ piglit-summary-html --overwrite /tmp/piglit/results /tmp/piglit/main
>
> generate a report in /tmp/piglit/results/index.html & al.
>
> Signed-off-by: Matěj Cepl <mcepl at redhat.com>
>

I verified with Ian that these two patches address his comments, so I've
pushed them to master.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111013/4feb59ab/attachment.htm>


More information about the Piglit mailing list