Commit c4738880 by Zhenyao Mo

Revert "Make EGLQueryContextTest use ANGLE_INSTANTIATE_TEST"

Broke win build ninja: error: '../../gpu/egl_tests/EGLQueryContextTest.cpp', needed by 'obj/gpu/egl_tests/angle_end2end_tests.EGLQueryContextTest.obj', missing and no known rule to make it This reverts commit 887dd2f1. Change-Id: I2ceb430010628c2aa7cb242eb2bf49406d8d87db Reviewed-on: https://chromium-review.googlesource.com/270471Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tested-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent 887dd2f1
...@@ -49,13 +49,14 @@ ...@@ -49,13 +49,14 @@
'<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp', '<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp',
'<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp', '<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp',
'<(angle_path)/src/tests/gl_tests/ViewportTest.cpp', '<(angle_path)/src/tests/gl_tests/ViewportTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
'<(angle_path)/src/tests/test_utils/ANGLETest.cpp', '<(angle_path)/src/tests/test_utils/ANGLETest.cpp',
'<(angle_path)/src/tests/test_utils/ANGLETest.h', '<(angle_path)/src/tests/test_utils/ANGLETest.h',
'<(angle_path)/src/tests/test_utils/angle_test_configs.h', '<(angle_path)/src/tests/test_utils/angle_test_configs.h',
], ],
'angle_end2end_tests_win_sources': 'angle_end2end_tests_win_sources':
[ [
# TODO(cwallez) for Linux, requires only trying the OpenGL ANGLE platform
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
# TODO(cwallez) for Linux, requires a portable implementation of sleep # TODO(cwallez) for Linux, requires a portable implementation of sleep
'<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp', '<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp',
# TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers # TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers
......
...@@ -9,23 +9,19 @@ ...@@ -9,23 +9,19 @@
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h> #include <EGL/eglext.h>
#include "test_utils/angle_test_configs.h" class EGLQueryContextTest : public testing::TestWithParam<int>
using namespace angle;
class EGLQueryContextTest : public testing::TestWithParam<PlatformParameters>
{ {
public: public:
void SetUp() override void SetUp() override
{ {
int clientVersion = GetParam().mClientVersion; int clientVersion = GetParam();
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT")); PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL); EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL);
EGLint dispattrs[] = EGLint dispattrs[] =
{ {
EGL_PLATFORM_ANGLE_TYPE_ANGLE, GetParam().mEGLPlatformParameters.renderer, EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
EGL_NONE EGL_NONE
}; };
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, dispattrs); mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, dispattrs);
...@@ -96,7 +92,7 @@ TEST_P(EGLQueryContextTest, GetClientVersion) ...@@ -96,7 +92,7 @@ TEST_P(EGLQueryContextTest, GetClientVersion)
{ {
EGLint clientVersion; EGLint clientVersion;
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE); EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE);
EXPECT_TRUE(clientVersion == GetParam().mClientVersion); EXPECT_TRUE(clientVersion == GetParam());
} }
TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface) TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface)
...@@ -148,5 +144,4 @@ TEST_P(EGLQueryContextTest, BadAttribute) ...@@ -148,5 +144,4 @@ TEST_P(EGLQueryContextTest, BadAttribute)
EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE); EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE);
} }
ANGLE_INSTANTIATE_TEST(EGLQueryContextTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(), INSTANTIATE_TEST_CASE_P(, EGLQueryContextTest, testing::Values(2, 3));
ES3_D3D11(), ES3_OPENGL());
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