Commit cc54ab36 by Austin Kinross Committed by Geoff Lang

Generate tests.sln for WinRT, and make it include dEQP projects

Change-Id: I34284965f7b4f9d11aa7bab263292d4f41312d04 Reviewed-on: https://chromium-review.googlesource.com/297307Tested-by: 's avatarAustin Kinross <aukinros@microsoft.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ee48376c
...@@ -11,17 +11,16 @@ ...@@ -11,17 +11,16 @@
'dependencies': 'dependencies':
[ [
'../src/angle.gyp:*', '../src/angle.gyp:*',
'../src/tests/tests.gyp:*',
], ],
'conditions': 'conditions':
[ [
# Generate tests and sample projects for classic desktop # Don't generate samples for WinRT
# builds only.
['angle_build_winrt==0', ['angle_build_winrt==0',
{ {
'dependencies': 'dependencies':
[ [
'../samples/samples.gyp:*', '../samples/samples.gyp:*',
'../src/tests/tests.gyp:*',
], ],
}], }],
], ],
......
...@@ -5,11 +5,91 @@ ...@@ -5,11 +5,91 @@
{ {
'variables': 'variables':
{ {
# Define these variables within an inner variables dict.
# This is necessary to get these variables defined for the conditions
# within the outer variables dict which operate on these variables.
'variables':
{
'angle_build_winrt%': 0,
'angle_standalone%': 0,
},
# Copy conditionally-set variables to the outer variables dict.
'angle_build_winrt%': '<(angle_build_winrt)',
'angle_standalone%': '<(angle_standalone)',
'deqp_path': '<(DEPTH)/third_party/deqp/src', 'deqp_path': '<(DEPTH)/third_party/deqp/src',
'delibs_path': '<(deqp_path)/framework/delibs', 'delibs_path': '<(deqp_path)/framework/delibs',
'libpng_path': '<(DEPTH)/third_party/libpng', 'libpng_path': '<(DEPTH)/third_party/libpng',
'zlib_path': '<(DEPTH)/third_party/zlib', 'zlib_path': '<(DEPTH)/third_party/zlib',
'angle_build_deqp_libraries%' : 0,
'angle_build_deqp_gtest_support%' : 0,
'angle_build_deqp_executables%' : 0,
'angle_build_deqp_gtest_executables%' :0,
'conditions':
[
['(OS=="win" or OS=="linux")',
{
# Build the dEQP libraries for all Windows/Linux builds
'angle_build_deqp_libraries%': 1,
}],
['((OS=="win" or OS=="linux") and angle_build_winrt==0)',
{
# Build the dEQP GoogleTest support helpers for all Windows/Linux builds except WinRT
# GoogleTest doesn't support WinRT
'angle_build_deqp_gtest_support%': 1,
}],
['((OS=="win" or OS=="linux") and angle_standalone==1 and angle_build_winrt==0)',
{
# Build the dEQP executables for all standalone Windows/Linux builds except WinRT
# GYP doesn't support generating standalone WinRT executables
'angle_build_deqp_executables%': 1,
# Build the GoogleTest versions of dEQP for all standalone Windows/Linux builds except WinRT
# GoogleTest doesn't support WinRT
'angle_build_deqp_gtest_executables%': 1,
}],
['OS=="win"',
{
'deqp_include_dirs':
[
'<(deqp_path)/framework/platform/win32',
],
'deqp_libtester_sources':
[
'<(deqp_path)/framework/delibs/dethread/win32/deMutexWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deSemaphoreWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deThreadLocalWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deThreadWin32.c',
],
}],
['OS=="linux" and use_x11==1',
{
'deqp_include_dirs':
[
'<(deqp_path)/framework/platform/x11',
],
'deqp_libtester_sources':
[
'<(deqp_path)/framework/delibs/dethread/unix/deMutexUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deNamedSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadLocalUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadUnix.c',
],
'deqp_defines':
[
# Ask the system headers to expose all the regular function otherwise
# dEQP doesn't compile and produces warnings about implicitly defined
# functions.
'_GNU_SOURCE',
],
}],
],
'deqp_msvs_disabled_warnings': 'deqp_msvs_disabled_warnings':
[ [
'4091', # typedef ignored when no variable is declared '4091', # typedef ignored when no variable is declared
...@@ -925,50 +1005,11 @@ ...@@ -925,50 +1005,11 @@
'<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.cpp', '<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.cpp',
'<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.h', '<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.h',
], ],
'conditions':
[
['OS=="win"',
{
'deqp_include_dirs':
[
'<(deqp_path)/framework/platform/win32',
],
'deqp_libtester_sources':
[
'<(deqp_path)/framework/delibs/dethread/win32/deMutexWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deSemaphoreWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deThreadLocalWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deThreadWin32.c',
],
}],
['OS=="linux" and use_x11==1',
{
'deqp_include_dirs':
[
'<(deqp_path)/framework/platform/x11',
],
'deqp_libtester_sources':
[
'<(deqp_path)/framework/delibs/dethread/unix/deMutexUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deNamedSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadLocalUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadUnix.c',
],
'deqp_defines':
[
# Ask the system headers to expose all the regular function otherwise
# dEQP doesn't compile and produces warnings about implicitly defined
# functions.
'_GNU_SOURCE',
],
}],
]
}, },
'conditions': 'conditions':
[ [
['(OS=="win" or OS=="linux") and angle_standalone==1', ['angle_build_deqp_libraries==1 and angle_standalone==1',
{ {
'targets': 'targets':
[ [
...@@ -1001,6 +1042,19 @@ ...@@ -1001,6 +1042,19 @@
], ],
}, },
}, },
'conditions':
[
['angle_build_winrt==1',
{
# In zlib, deflate.c/insert_string_sse assumes _MSC_VER is only used for x86 or x64
# To compile this function for ARM using MSC, we trick it by defining __clang__
# __clang__ isn't used elsewhere zlib, so this workaround shouldn't impact anything else
'defines':
[
'__clang__',
],
}],
],
'sources': 'sources':
[ [
'<(zlib_path)/adler32.c', '<(zlib_path)/adler32.c',
...@@ -1077,9 +1131,9 @@ ...@@ -1077,9 +1131,9 @@
'<(libpng_path)/pngwutil.c', '<(libpng_path)/pngwutil.c',
], ],
}, },
], ], # targets
}], }], # angle_build_deqp_libraries==1 and angle_standalone==1
['OS=="win" or OS=="linux"', ['angle_build_deqp_libraries==1',
{ {
'targets': 'targets':
[ [
...@@ -1107,6 +1161,10 @@ ...@@ -1107,6 +1161,10 @@
}, },
'VCLinkerTool': 'VCLinkerTool':
{ {
'conditions':
[
['angle_build_winrt==0',
{
'AdditionalDependencies': 'AdditionalDependencies':
[ [
'dbghelp.lib', 'dbghelp.lib',
...@@ -1114,6 +1172,18 @@ ...@@ -1114,6 +1172,18 @@
'user32.lib', 'user32.lib',
'ws2_32.lib', 'ws2_32.lib',
], ],
}],
['angle_build_winrt==1',
{
# Disable COMDAT optimizations, disabled by default for non-WinRT
'AdditionalOptions': ['/OPT:NOREF', '/OPT:NOICF'],
# AdditionalDependencies automatically configures the required .libs
'AdditionalDependencies':
[
'%(AdditionalDependencies)'
],
}],
],
}, },
}, },
}, },
...@@ -1132,6 +1202,13 @@ ...@@ -1132,6 +1202,13 @@
'defines': ['<@(deqp_defines)'], 'defines': ['<@(deqp_defines)'],
'defines!': [ '<@(deqp_undefines)' ], 'defines!': [ '<@(deqp_undefines)' ],
}, },
'conditions':
[
['angle_build_winrt==1',
{
'type' : 'shared_library',
}],
],
}, },
# Compile decpp separately because MSVC ignores the extension of the files when # Compile decpp separately because MSVC ignores the extension of the files when
...@@ -1295,7 +1372,56 @@ ...@@ -1295,7 +1372,56 @@
'deqp_support/tcuANGLEPlatform.h', 'deqp_support/tcuANGLEPlatform.h',
], ],
}, },
], # targets
}], # angle_build_deqp_libraries
['angle_build_deqp_executables==1',
{
"targets":
[
{
'target_name': 'angle_deqp_gles2_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libgles2',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
{
'target_name': 'angle_deqp_gles3_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libgles3',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
{
'target_name': 'angle_deqp_egl_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libegl',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
], # targets
}], # angle_build_deqp_executables
['angle_build_deqp_gtest_support==1',
{
'targets':
[
# Helper target for synching our implementation with chrome's # Helper target for synching our implementation with chrome's
{ {
'target_name': 'angle_deqp_gtest_support', 'target_name': 'angle_deqp_gtest_support',
...@@ -1392,51 +1518,12 @@ ...@@ -1392,51 +1518,12 @@
], ],
}, },
], # targets ], # targets
}], # OS=="win" or OS=="linux" }], # angle_build_deqp_gtest_support
['(OS=="win" or OS=="linux") and angle_standalone==1', ['angle_build_deqp_gtest_executables==1',
{ {
"targets": "targets":
[ [
{ {
'target_name': 'angle_deqp_gles2_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libgles2',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
{
'target_name': 'angle_deqp_gles3_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libgles3',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
{
'target_name': 'angle_deqp_egl_tests',
'type': 'executable',
'dependencies':
[
'angle_deqp_libegl',
],
'sources':
[
'deqp_support/angle_deqp_tests_main.cpp',
],
},
{
'target_name': 'angle_deqp_gtest_gles2_tests', 'target_name': 'angle_deqp_gtest_gles2_tests',
'type': 'executable', 'type': 'executable',
'includes': [ '../../build/common_defines.gypi', ], 'includes': [ '../../build/common_defines.gypi', ],
...@@ -1481,6 +1568,6 @@ ...@@ -1481,6 +1568,6 @@
], ],
}, },
], # targets ], # targets
}], # (OS=="win" or OS=="linux") and angle_standalone==1 }], # angle_build_deqp_gtest_executables
], # conditions ], # conditions
} }
...@@ -55,9 +55,16 @@ const char *g_dEQPDataSearchDirs[] = ...@@ -55,9 +55,16 @@ const char *g_dEQPDataSearchDirs[] =
#if (DE_OS == DE_OS_WIN32) #if (DE_OS == DE_OS_WIN32)
deBool deIsDir(const char *filename) deBool deIsDir(const char *filename)
{ {
DWORD attribs = GetFileAttributesA(filename); WIN32_FILE_ATTRIBUTE_DATA fileInformation;
return (attribs != INVALID_FILE_ATTRIBUTES) &&
((attribs & FILE_ATTRIBUTE_DIRECTORY) > 0); BOOL result = GetFileAttributesExA(filename, GetFileExInfoStandard, &fileInformation);
if (result)
{
DWORD attribs = fileInformation.dwFileAttributes;
return (attribs != INVALID_FILE_ATTRIBUTES) && ((attribs & FILE_ATTRIBUTE_DIRECTORY) > 0);
}
return false;
} }
#elif (DE_OS == DE_OS_UNIX) #elif (DE_OS == DE_OS_UNIX)
deBool deIsDir(const char *filename) deBool deIsDir(const char *filename)
......
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
'third_party/rapidjson/include/rapidjson/msinttypes/stdint.h', 'third_party/rapidjson/include/rapidjson/msinttypes/stdint.h',
], ],
}, },
'conditions':
[
# GoogleTest doesn't support WinRT
['angle_build_winrt==0',
{
'targets': 'targets':
[ [
{ {
...@@ -73,10 +78,8 @@ ...@@ -73,10 +78,8 @@
], ],
}, },
], ],
}],
'conditions': ['angle_standalone==1 and angle_build_winrt==0',
[
['angle_standalone==1',
{ {
'targets': 'targets':
[ [
......
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