diff options
author | Brian Paul <brianp@vmware.com> | 2014-09-22 11:49:25 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2014-09-23 16:43:30 -0600 |
commit | 0311c37864675ea3cbd86aecfd819217a26680ea (patch) | |
tree | 7830236f0505df5cd8b9114cd9ca10808e7107c3 /framework/core.py | |
parent | b4144e981caad175a82936fddc620aa6342f5548 (diff) |
core.py: don't overwrite user's PIGLIT_SOURCE_DIR env var
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.
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'framework/core.py')
-rw-r--r-- | framework/core.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/core.py b/framework/core.py index f7d6f7134..c265e249a 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): |