[Piglit] [PATCH 3/5] all.tests: Move EGL tests into all.tests
Chad Versace
chad.versace at linux.intel.com
Thu Nov 29 18:32:07 PST 2012
No one runs the EGL tests. That needs to be fixed.
If you don't build the EGL tests, then piglit-run.py will skip them.
all.tests is getting *very* bloated. Let's be honest... it's an
unmaintainable mess. So, rather than add to its unmaintainability, this
splits all_egl.tests into two files, each included by all.tests:
tests/egl/tests.py
tests/egl/spec/egl_khr_create_context/tests.py
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/all.tests | 3 ++
tests/all_egl.tests | 45 --------------------------
tests/egl/spec/egl_khr_create_context/tests.py | 20 ++++++++++++
tests/egl/tests.py | 15 +++++++++
4 files changed, 38 insertions(+), 45 deletions(-)
delete mode 100644 tests/all_egl.tests
create mode 100644 tests/egl/spec/egl_khr_create_context/tests.py
create mode 100644 tests/egl/tests.py
diff --git a/tests/all.tests b/tests/all.tests
index 0cfdc65..7881c20 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -2633,6 +2633,9 @@ profile.tests['spec'] = spec
if platform.system() is not 'Windows':
profile.tests['glx'] = glx
+execfile(path.join(testsDir, 'egl', 'tests.py'))
+execfile(path.join(testsDir, 'egl', 'spec', 'egl_khr_create_context', 'tests.py'))
+
# Remove blacklisted tests
for test_path in blacklist:
profile.remove_test(test_path)
diff --git a/tests/all_egl.tests b/tests/all_egl.tests
deleted file mode 100644
index 56cdf6e..0000000
--- a/tests/all_egl.tests
+++ /dev/null
@@ -1,45 +0,0 @@
-import shlex
-
-from framework.core import *
-from framework.exectest import *
-
-def plain_test(args):
- return PlainExecTest(shlex.split(args) + ['-auto'])
-
-def concurrent_test(args):
- test = PlainExecTest(args.split() + ['-auto'])
- test.runConcurrent = True
- return test
-
-profile = TestProfile()
-
-egl = Group()
-profile.tests['egl'] = egl
-egl['egl-create-surface'] = plain_test('egl-create-surface')
-egl['egl-nok-swap-region'] = plain_test('egl-nok-swap-region')
-egl['egl-nok-texture-from-pixmap'] = plain_test('egl-nok-texture-from-pixmap')
-egl['egl-query-surface-EGL_BAD_ATTRIBUTE'] = plain_test('egl-query-surface --bad-attr')
-egl['egl-query-surface-EGL_BAD_SURFACE'] = plain_test('egl-query-surface --bad-surface')
-egl['egl-query-surface-EGL_HEIGHT'] = plain_test('egl-query-surface --attr=EGL_HEIGHT')
-egl['egl-query-surface-EGL_WIDTH'] = plain_test('egl-query-surface --attr=EGL_WIDTH')
-
-create_context = Group();
-egl['EGL_KHR_create_context'] = create_context
-create_context['default major version GLES'] = concurrent_test('egl-create-context-default-major-version-gles')
-create_context['default major version GL'] = concurrent_test('egl-create-context-default-major-version-gl')
-create_context['default minor version GLES'] = concurrent_test('egl-create-context-default-minor-version-gles')
-create_context['default minor version GL'] = concurrent_test('egl-create-context-default-minor-version-gl')
-create_context['valid attribute empty GLES'] = concurrent_test('egl-create-context-valid-attribute-empty-gles')
-create_context['valid attribute empty GL'] = concurrent_test('egl-create-context-valid-attribute-empty-gl')
-create_context['NULL valid attribute GLES'] = concurrent_test('egl-create-context-valid-attribute-null-gles')
-create_context['NULL valid attribute GL'] = concurrent_test('egl-create-context-valid-attribute-null-gl')
-create_context['invalid OpenGL version'] = concurrent_test('egl-create-context-invalid-gl-version')
-create_context['invalid attribute GLES'] = concurrent_test('egl-create-context-invalid-attribute-gles')
-create_context['invalid attribute GL'] = concurrent_test('egl-create-context-invalid-attribute-gl')
-create_context['invalid flag GLES'] = concurrent_test('egl-create-context-invalid-flag-gles')
-create_context['invalid flag GL'] = concurrent_test('egl-create-context-invalid-flag-gl')
-create_context['valid forward-compatible flag GL'] = concurrent_test('egl-create-context-valid-flag-forward-compatible-gl')
-create_context['invalid profile'] = concurrent_test('egl-create-context-invalid-profile')
-create_context['3.2 core profile required'] = concurrent_test('egl-create-context-core-profile')
-create_context['pre-GL3.2 profile'] = concurrent_test('egl-create-context-pre-GL32-profile')
-create_context['verify GL flavor'] = concurrent_test('egl-create-context-verify-gl-flavor')
diff --git a/tests/egl/spec/egl_khr_create_context/tests.py b/tests/egl/spec/egl_khr_create_context/tests.py
new file mode 100644
index 0000000..66bc247
--- /dev/null
+++ b/tests/egl/spec/egl_khr_create_context/tests.py
@@ -0,0 +1,20 @@
+egl_khr_create_context = Group();
+spec['EGL_KHR_create_context'] = egl_khr_create_context
+egl_khr_create_context['default major version GLES'] = plain_test('egl-create-context-default-major-version-gles')
+egl_khr_create_context['default major version GL'] = plain_test('egl-create-context-default-major-version-gl')
+egl_khr_create_context['default minor version GLES'] = plain_test('egl-create-context-default-minor-version-gles')
+egl_khr_create_context['default minor version GL'] = plain_test('egl-create-context-default-minor-version-gl')
+egl_khr_create_context['valid attribute empty GLES'] = plain_test('egl-create-context-valid-attribute-empty-gles')
+egl_khr_create_context['valid attribute empty GL'] = plain_test('egl-create-context-valid-attribute-empty-gl')
+egl_khr_create_context['NULL valid attribute GLES'] = plain_test('egl-create-context-valid-attribute-null-gles')
+egl_khr_create_context['NULL valid attribute GL'] = plain_test('egl-create-context-valid-attribute-null-gl')
+egl_khr_create_context['invalid OpenGL version'] = plain_test('egl-create-context-invalid-gl-version')
+egl_khr_create_context['invalid attribute GLES'] = plain_test('egl-create-context-invalid-attribute-gles')
+egl_khr_create_context['invalid attribute GL'] = plain_test('egl-create-context-invalid-attribute-gl')
+egl_khr_create_context['invalid flag GLES'] = plain_test('egl-create-context-invalid-flag-gles')
+egl_khr_create_context['invalid flag GL'] = plain_test('egl-create-context-invalid-flag-gl')
+egl_khr_create_context['valid forward-compatible flag GL'] = plain_test('egl-create-context-valid-flag-forward-compatible-gl')
+egl_khr_create_context['invalid profile'] = plain_test('egl-create-context-invalid-profile')
+egl_khr_create_context['3.2 core profile required'] = plain_test('egl-create-context-core-profile')
+egl_khr_create_context['pre-GL3.2 profile'] = plain_test('egl-create-context-pre-GL32-profile')
+egl_khr_create_context['verify GL flavor'] = plain_test('egl-create-context-verify-gl-flavor')
diff --git a/tests/egl/tests.py b/tests/egl/tests.py
new file mode 100644
index 0000000..c741978
--- /dev/null
+++ b/tests/egl/tests.py
@@ -0,0 +1,15 @@
+egl14 = Group()
+spec['EGL 1.4'] = egl14
+egl14['eglCreateSurface'] = plain_test('egl-create-surface')
+egl14['eglQuerySurface EGL_BAD_ATTRIBUTE'] = plain_test('egl-query-surface --bad-attr')
+egl14['eglQuerySurface EGL_BAD_SURFACE'] = plain_test('egl-query-surface --bad-surface')
+egl14['eglQuerySurface EGL_HEIGHT'] = plain_test('egl-query-surface --attr=EGL_HEIGHT')
+egl14['eglQuerySurface EGL_WIDTH'] = plain_test('egl-query-surface --attr=EGL_WIDTH')
+
+egl_nok_swap_region = Group()
+spec['EGL_NOK_swap_region'] = egl_nok_swap_region
+egl_nok_swap_region['basic'] = plain_test('egl-nok-swap-region')
+
+egl_nok_texture_from_pixmap = Group()
+spec['EGL_NOK_texture_from_pixmap'] = egl_nok_texture_from_pixmap
+egl_nok_texture_from_pixmap['basic'] = plain_test('egl-nok-texture-from-pixmap')
--
1.7.11.7
More information about the Piglit
mailing list