[Piglit] [PATCH 10/18] util/wfl, run.py: Allow PIGLIT_PLATFORM="gl=>glx, gles=>xegl"

Dylan Baker baker.dylan.c at gmail.com
Fri Jul 11 11:32:30 PDT 2014


From: Chad Versace <chad.versace at linux.intel.com>

If environment variable PIGLIT_PLATFORM is unset, then Piglit defaults
to choosing GLX for GL tests and X/EGL for GLES tests. This patch does
not change the default behavior.

Now PIGLIT_PLATFORM="gl=>glx,gles=>xegl" explicitly selects that default
behavior.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 framework/programs/run.py                             | 3 ++-
 tests/util/piglit-framework-gl/piglit_wfl_framework.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/framework/programs/run.py b/framework/programs/run.py
index 478e522..0622063 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -71,7 +71,8 @@ def run(input_):
                              dest="concurrency",
                              help="Disable concurrent test runs")
     parser.add_argument("-p", "--platform",
-                        choices=["glx", "xegl", "x11_egl", "wayland", "gbm"],
+                        choices=["glx", "xegl", "x11_egl", "wayland", "gbm",
+                                 "gl=>glx,gles=>xegl"],
                         help="Name of windows system passed to waffle")
     parser.add_argument("-f", "--config",
                         dest="config_file",
diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
index 8072abf..bcdb931 100644
--- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
@@ -51,7 +51,7 @@ piglit_wfl_framework_choose_platform(const struct piglit_gl_test_config *test_co
 {
 	const char *env = getenv("PIGLIT_PLATFORM");
 
-	if (env == NULL) {
+	if (env == NULL || streq(env, "gl=>glx,gles=>xegl")) {
 #if defined(PIGLIT_HAS_X11) && defined(PIGLIT_HAS_EGL)
 		if (test_config->supports_gl_es_version) {
 			/* Some GLX implementations don't support creation of
-- 
2.0.0



More information about the Piglit mailing list