[Piglit] [PATCH] core.py: don't overwrite user's PIGLIT_SOURCE_DIR env var

Dylan Baker baker.dylan.c at gmail.com
Tue Sep 23 14:59:15 PDT 2014


Looks good, thanks for making those changes for me.

Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>

On Tuesday, September 23, 2014 09:24:41 AM Brian Paul wrote:
> When creating an Options object, use the environment's PIGLIT_SOURCE_DIR
> value when available.
> 
> Fixes spec/ARB_ES3_compatibility/oes_compressed_etc2_texture-miptree test
> failures in Cywin.
> 
> Also, remove the MESA_DEBUG=silent setting.  Piglit shouldn't care if
> debug output is on/off (we stopped looking for Mesa error messages a
> long time ago).
> 
> v2: simplify code with dict get() method and default value.
> ---
>  framework/core.py |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/framework/core.py b/framework/core.py
> index f7d6f71..c265e24 100644
> --- a/framework/core.py
> +++ b/framework/core.py
> @@ -107,11 +107,10 @@ class Options(object):
>          self.sync = sync
>          # env is used to set some base environment variables that are not going
>          # to change across runs, without sending them to os.environ which is
> -        # fickle as easy to break
> +        # fickle and easy to break
>          self.env = {
> -            'PIGLIT_SOURCE_DIR': os.path.abspath(
> -                os.path.join(os.path.dirname(__file__), '..')),
> -            'MESA_DEBUG': 'silent',
> +            'PIGLIT_SOURCE_DIR': os.environ.get('PIGLIT_SOURCE_DIR',
> +                 os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
>          }
>  
>      def __iter__(self):
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140923/0a1e0ac2/attachment.sig>


More information about the Piglit mailing list