Commit 8c2b7506 authored by Dylan Baker's avatar Dylan Baker

framework/test/ Add environment variable to turn off fast skipping

Setting PIGLIT_NO_FAST_SKIP will disable the fast skipping mechanism

It does this by shadowing FastSkipMixin at import time. This method is
robust and cheap, but makes testing difficult.
Signed-off-by: 's avatarDylan Baker <>
parent 317a0f0c
......@@ -297,6 +297,13 @@ behaves.
glslparsertest. This can be used to test ES<x>_COMPATABILITY extensions
for OpenGL
Piglit has a mechanism run in the python layer for skipping tests with
unmet OpenGL or window system dependencies without starting a new
process (which is expensive). Sometimes this system doesn't work or is
undesirable, setting this environment variable to True will disable this
3.2 Note
......@@ -24,6 +24,7 @@ from __future__ import absolute_import, division, print_function
import errno
import os
import subprocess
import warnings
from framework import exceptions, core
from framework.options import OPTIONS
......@@ -35,6 +36,10 @@ __all__ = [
# An environment variable that when set to true disables the FastSkipMixin by
# stubbing it out
_DISABLED = bool(os.environ.get('PIGLIT_NO_FAST_SKIP', False))
class StopWflinfo(exceptions.PiglitException):
"""Exception called when wlfinfo getter should stop."""
......@@ -364,3 +369,23 @@ class FastSkipMixin(object):
self.glsl_es_version, self.__info.glsl_es_version))
super(FastSkipMixin, self).is_skip()
class FastSkipMixinDisabled(object):
def __init__(self, *args, **kwargs):
# Tests that implement the FastSkipMixin expect to have these values
# set, so just fill them in with the default values.
self.gl_required = set()
self.gl_version = None
self.gles_version = None
self.glsl_version = None
self.glsl_es_version = None
super(FastSkipMixinDisabled, self).__init__(*args, **kwargs)
# Shadow the real FastSkipMixin with the Disabled version if
warnings.warn('Fast Skipping Disabled')
FastSkipMixin = FastSkipMixinDisabled
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment