[Piglit] [PATCH] piglit-run: Fix default search directory for piglit.conf

Dylan Baker baker.dylan.c at gmail.com
Thu May 8 15:32:32 PDT 2014


On Thursday, May 08, 2014 18:21:12 Tom Stellard wrote:
> On Thu, May 08, 2014 at 06:14:32PM -0400, Ilia Mirkin wrote:
> > That'll get it out of the cwd though... not the piglit dir? Where is
> > the piglit.conf file expected to live? Based on the code, seems like
> > it was the piglit dir.
> > 
> 
> My main goal with the default location is to make sure that it works
> with the most common piglit use case, which is to invoke piglit run ...
> from the piglit dir, so in that case either cwd or the pigilt dir would
> be fine, and it doesn't matter to me.
> 
> -Tom
> 
> > On Fri, May 9, 2014 at 3:06 AM, Tom Stellard <thomas.stellard at amd.com> wrote:
> > > We need to use os.getcwd() now that run.py is its own module.
> > > ---
> > >  framework/programs/run.py | 3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/framework/programs/run.py b/framework/programs/run.py
> > > index 9c5b033..71865e7 100644
> > > --- a/framework/programs/run.py
> > > +++ b/framework/programs/run.py
> > > @@ -112,8 +112,7 @@ def run(input_):
> > >          core.PIGLIT_CONFIG.readfp(args.config_file)
> > >          args.config_file.close()
> > >      else:
> > > -        core.PIGLIT_CONFIG.read(os.path.join(os.path.dirname(__file__),
> > > -                                'piglit.conf'))
> > > +        core.PIGLIT_CONFIG.read(os.path.join(os.getcwd(), 'piglit.conf'))
> > >
> > >      # Pass arguments into Environment
> > >      env = core.Environment(concurrent=args.concurrency,
> > > --
> > > 1.8.1.5
> > >
> > > _______________________________________________
> > > Piglit mailing list
> > > Piglit at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/piglit
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

I think that using the environment variable PIGLIT_SOURCE_DIR is what
we actually want to use here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140508/da0f1664/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140508/da0f1664/attachment-0001.sig>


More information about the Piglit mailing list