Commit 973402fd by Corentin Wallez

Compile end2end tests on Linux

BUG=angleproject:892 Change-Id: Id4a9ddc35ae9600080e743c77476d36743a3e646 Reviewed-on: https://chromium-review.googlesource.com/270199Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/270412
parent e45b7458
...@@ -33,12 +33,9 @@ ...@@ -33,12 +33,9 @@
'<(angle_path)/src/tests/gl_tests/MaxTextureSizeTest.cpp', '<(angle_path)/src/tests/gl_tests/MaxTextureSizeTest.cpp',
'<(angle_path)/src/tests/gl_tests/MipmapTest.cpp', '<(angle_path)/src/tests/gl_tests/MipmapTest.cpp',
'<(angle_path)/src/tests/gl_tests/media/pixel.inl', '<(angle_path)/src/tests/gl_tests/media/pixel.inl',
'<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp',
'<(angle_path)/src/tests/gl_tests/PBOExtensionTest.cpp', '<(angle_path)/src/tests/gl_tests/PBOExtensionTest.cpp',
'<(angle_path)/src/tests/gl_tests/PbufferTest.cpp',
'<(angle_path)/src/tests/gl_tests/PointSpritesTest.cpp', '<(angle_path)/src/tests/gl_tests/PointSpritesTest.cpp',
'<(angle_path)/src/tests/gl_tests/ProgramBinaryTest.cpp', '<(angle_path)/src/tests/gl_tests/ProgramBinaryTest.cpp',
'<(angle_path)/src/tests/gl_tests/QueryDisplayAttribTest.cpp',
'<(angle_path)/src/tests/gl_tests/ReadPixelsTest.cpp', '<(angle_path)/src/tests/gl_tests/ReadPixelsTest.cpp',
'<(angle_path)/src/tests/gl_tests/RendererTest.cpp', '<(angle_path)/src/tests/gl_tests/RendererTest.cpp',
'<(angle_path)/src/tests/gl_tests/SimpleOperationTest.cpp', '<(angle_path)/src/tests/gl_tests/SimpleOperationTest.cpp',
...@@ -52,13 +49,24 @@ ...@@ -52,13 +49,24 @@
'<(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/egl_tests/EGLSurfaceTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLThreadTest.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':
[
# 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
'<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp',
# TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers
'<(angle_path)/src/tests/gl_tests/PbufferTest.cpp',
'<(angle_path)/src/tests/gl_tests/QueryDisplayAttribTest.cpp',
# TODO(cwallez) for Linux, remove the reliance on the ANGLE_platform_angle_d3d extension
'<(angle_path)/src/tests/egl_tests/EGLSurfaceTest.cpp',
# TODO(cwallez) for Linux, requires a portable implementation of threads
'<(angle_path)/src/tests/egl_tests/EGLThreadTest.cpp',
],
}, },
'dependencies': 'dependencies':
[ [
...@@ -77,4 +85,14 @@ ...@@ -77,4 +85,14 @@
[ [
'<@(angle_end2end_tests_sources)', '<@(angle_end2end_tests_sources)',
], ],
'conditions':
[
['OS=="win"',
{
'sources':
[
'<@(angle_end2end_tests_win_sources)',
],
}],
]
} }
...@@ -824,7 +824,7 @@ TEST_P(GLSLTest, FixedShaderLength) ...@@ -824,7 +824,7 @@ TEST_P(GLSLTest, FixedShaderLength)
const std::string appendGarbage = "abcasdfasdfasdfasdfasdf"; const std::string appendGarbage = "abcasdfasdfasdfasdfasdf";
const std::string source = "void main() { gl_FragColor = vec4(0, 0, 0, 0); }" + appendGarbage; const std::string source = "void main() { gl_FragColor = vec4(0, 0, 0, 0); }" + appendGarbage;
const char *sourceArray[1] = { source.c_str() }; const char *sourceArray[1] = { source.c_str() };
GLint lengths[1] = { source.length() - appendGarbage.length() }; GLint lengths[1] = { static_cast<GLint>(source.length() - appendGarbage.length()) };
glShaderSource(shader, ArraySize(sourceArray), sourceArray, lengths); glShaderSource(shader, ArraySize(sourceArray), sourceArray, lengths);
glCompileShader(shader); glCompileShader(shader);
...@@ -864,7 +864,7 @@ TEST_P(GLSLTest, MixedShaderLengths) ...@@ -864,7 +864,7 @@ TEST_P(GLSLTest, MixedShaderLengths)
{ {
-10, -10,
1, 1,
std::strlen(sourceArray[2]), static_cast<GLint>(strlen(sourceArray[2])),
-1, -1,
}; };
ASSERT_EQ(ArraySize(sourceArray), ArraySize(lengths)); ASSERT_EQ(ArraySize(sourceArray), ArraySize(lengths));
......
...@@ -71,8 +71,8 @@ class PbufferTest : public ANGLETest ...@@ -71,8 +71,8 @@ class PbufferTest : public ANGLETest
const EGLint pBufferAttributes[] = const EGLint pBufferAttributes[] =
{ {
EGL_WIDTH, mPbufferSize, EGL_WIDTH, static_cast<EGLint>(mPbufferSize),
EGL_HEIGHT, mPbufferSize, EGL_HEIGHT, static_cast<EGLint>(mPbufferSize),
EGL_TEXTURE_FORMAT, mSupportsBindTexImage ? EGL_TEXTURE_RGBA : EGL_NO_TEXTURE, EGL_TEXTURE_FORMAT, mSupportsBindTexImage ? EGL_TEXTURE_RGBA : EGL_NO_TEXTURE,
EGL_TEXTURE_TARGET, mSupportsBindTexImage ? EGL_TEXTURE_2D : EGL_NO_TEXTURE, EGL_TEXTURE_TARGET, mSupportsBindTexImage ? EGL_TEXTURE_2D : EGL_NO_TEXTURE,
EGL_NONE, EGL_NONE, EGL_NONE, EGL_NONE,
......
...@@ -336,7 +336,7 @@ TEST_P(PointSpritesTest, PointSizeEnabledCompliance) ...@@ -336,7 +336,7 @@ TEST_P(PointSpritesTest, PointSizeEnabledCompliance)
glUniform1f(pointSizeLoc, 1.0f); glUniform1f(pointSizeLoc, 1.0f);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
glDrawArrays(GL_POINTS, 0, _countof(vertices) / 3); glDrawArrays(GL_POINTS, 0, ArraySize(vertices) / 3);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
// Test the pixels around the target Red pixel to ensure // Test the pixels around the target Red pixel to ensure
...@@ -370,7 +370,7 @@ TEST_P(PointSpritesTest, PointSizeEnabledCompliance) ...@@ -370,7 +370,7 @@ TEST_P(PointSpritesTest, PointSizeEnabledCompliance)
glUniform1f(pointSizeLoc, 2.0f); glUniform1f(pointSizeLoc, 2.0f);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
glDrawArrays(GL_POINTS, 0, _countof(vertices) / 3); glDrawArrays(GL_POINTS, 0, ArraySize(vertices) / 3);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
// Test the pixels to ensure the target is ALL Red pixels // Test the pixels to ensure the target is ALL Red pixels
......
...@@ -183,6 +183,19 @@ ...@@ -183,6 +183,19 @@
4244, # Conversion from 'type1' to 'type2', possible loss of data 4244, # Conversion from 'type1' to 'type2', possible loss of data
], ],
}, },
{
'target_name': 'angle_end2end_tests',
'type': 'executable',
'includes':
[
'../../build/common_defines.gypi',
'angle_end2end_tests.gypi',
],
'sources':
[
'angle_end2end_tests_main.cpp',
],
},
], ],
'conditions': 'conditions':
[ [
...@@ -190,19 +203,6 @@ ...@@ -190,19 +203,6 @@
{ {
'targets': 'targets':
[ [
{
'target_name': 'angle_end2end_tests',
'type': 'executable',
'includes':
[
'../../build/common_defines.gypi',
'angle_end2end_tests.gypi',
],
'sources':
[
'angle_end2end_tests_main.cpp',
],
},
{ {
'target_name': 'angle_perftests', 'target_name': 'angle_perftests',
......
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