diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-06-20 11:02:48 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-09-20 06:37:10 -0700 |
commit | c53f6ba3e961bb6f257c8309cb285db82576bd1f (patch) | |
tree | 26b7ace97eb3903f23d402822bc35d54c3a4a8cf /unittests | |
parent | 45f2526a71747f4ce68497d9f8affc8aadd08ef2 (diff) |
wflinfo: Reimplement wflinfo separating the various API's
Currently fast skipping is implemented such that it assumes there's a
single version of ES, a single version of desktop, and all extensions
are shared between them. This has basically worked because 1) there are
basically no gles1 tests, and 2) piglit didn't have compat profile. But
worked and correct are two different things.
With the addition of compat profiles it's time to re-evaluate how fast
skipping works. Namely we need to have different attributes for ES1,
ES1+, core, compat, and I've added on for "legacy" (pre-profile), since
waffle supports that.
This maintains legacy interfaces so that existing code continues to
work.
v2: - Fix versions < 3.1 on implementations without core profile
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/framework/test_wflinfo.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/unittests/framework/test_wflinfo.py b/unittests/framework/test_wflinfo.py index d7e924e95..fcff30034 100644 --- a/unittests/framework/test_wflinfo.py +++ b/unittests/framework/test_wflinfo.py @@ -78,8 +78,14 @@ class TestWflInfo(object): """wflinfo.WflInfo.gl_extensions: Provides list of gl extensions. """ - rv = (b'foo\nbar\nboink\nOpenGL extensions: ' - b'GL_foobar GL_ham_sandwhich\n') + rv = textwrap.dedent("""\ + foo + bar + boink + OpenGL version string: 1.1 + OpenGL shading language: 1.1 + OpenGL extensions: GL_foobar GL_ham_sandwhich + """).encode('utf-8') expected = set(['GL_foobar', 'GL_ham_sandwhich']) with mock.patch('framework.wflinfo.subprocess.check_output', @@ -93,8 +99,10 @@ class TestWflInfo(object): Waffle api: gl OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile - OpenGL version string: 18 (Core Profile) Mesa 11.0.4 OpenGL context flags: 0x0 + OpenGL shading language: 1.1 + OpenGL extensions: GL_foobar GL_ham_sandwhich + OpenGL version string: 18 (Core Profile) Mesa 11.0.4 """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', mock.Mock(return_value=rv)): @@ -108,6 +116,8 @@ class TestWflInfo(object): OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile OpenGL version string: OpenGL ES 7.1 Mesa 11.0.4 + OpenGL shading language: 1.1 + OpenGL extensions: GL_foobar GL_ham_sandwhich """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', mock.Mock(return_value=rv)): @@ -138,6 +148,7 @@ class TestWflInfo(object): OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile OpenGL version string: OpenGL ES 3.0 Mesa 11.0.4 OpenGL shading language version string: OpenGL ES GLSL ES 1.0.17 + OpenGL version string: 1.1 (Core Profile) Mesa 11.0.4 OpenGL extensions: this is some extension strings. """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', @@ -167,6 +178,8 @@ class TestWflInfo(object): OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile OpenGL version string: 18.0.1 (Core Profile) Mesa 11.0.4 + OpenGL shading language version string: OpenGL ES GLSL ES 5.00 + OpenGL extensions: this is some extension strings. OpenGL context flags: 0x0 """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', @@ -199,6 +212,8 @@ class TestWflInfo(object): OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile OpenGL version string: 18.0.1 (Core Profile) Mesa 11.0.4 OpenGL context flags: 0x0 + OpenGL shading language version string: 9.30.7 + OpenGL extensions: ARB_ham_sandwich """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', mock.Mock(return_value=rv)): @@ -216,6 +231,8 @@ class TestWflInfo(object): Warning: I'm a big fat warnngs OpenGL version string: 18.0.1 (Core Profile) Mesa 11.0.4 OpenGL context flags: 0x0 + OpenGL shading language version string: 9.30.7 + OpenGL extensions: ARB_ham_sandwich """).encode('utf-8') with mock.patch('framework.wflinfo.subprocess.check_output', mock.Mock(return_value=rv)): |