Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / tests / tests.gyp
1 # Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6     'variables':
7     {
8         'angle_build_conformance_tests%': '0',
9         'angle_build_deqp_tests%': '0',
10     },
11     'targets':
12     [
13         {
14             'target_name': 'gtest',
15             'type': 'static_library',
16             'includes': [ '../build/common_defines.gypi', ],
17             'include_dirs':
18             [
19                 'third_party/googletest',
20                 'third_party/googletest/include',
21             ],
22             'sources':
23             [
24                 'third_party/googletest/src/gtest-all.cc',
25             ],
26             'defines':
27             [
28                 '_VARIADIC_MAX=10',
29             ],
30             'direct_dependent_settings':
31             {
32                 'defines':
33                 [
34                     '_VARIADIC_MAX=10',
35                 ],
36             },
37         },
38
39         {
40             'target_name': 'gmock',
41             'type': 'static_library',
42             'includes': [ '../build/common_defines.gypi', ],
43             'include_dirs':
44             [
45                 'third_party/googlemock',
46                 'third_party/googlemock/include',
47                 'third_party/googletest/include',
48             ],
49             'sources':
50             [
51                 'third_party/googlemock/src/gmock-all.cc',
52             ],
53             'defines':
54             [
55                 '_VARIADIC_MAX=10',
56             ],
57             'direct_dependent_settings':
58             {
59                 'defines':
60                 [
61                     '_VARIADIC_MAX=10',
62                 ],
63             },
64         },
65
66         {
67             'target_name': 'preprocessor_tests',
68             'type': 'executable',
69             'dependencies':
70             [
71                 '../src/angle.gyp:preprocessor',
72                 'gtest',
73                 'gmock',
74             ],
75             'include_dirs':
76             [
77                 '../src/compiler/preprocessor',
78                 'third_party/googletest/include',
79                 'third_party/googlemock/include',
80             ],
81             'includes':
82             [
83                 '../build/common_defines.gypi',
84                 'preprocessor_tests/preprocessor_tests.gypi',
85             ],
86             'sources':
87             [
88                 'preprocessor_tests/preprocessor_test_main.cpp',
89             ],
90         },
91
92         {
93             'target_name': 'compiler_tests',
94             'type': 'executable',
95             'dependencies':
96             [
97                 '../src/angle.gyp:translator_static',
98                 'gtest',
99             ],
100             'include_dirs':
101             [
102                 '../include',
103                 '../src',
104                 'third_party/googletest/include',
105             ],
106             'includes':
107             [
108                 '../build/common_defines.gypi',
109                 'compiler_tests/compiler_tests.gypi',
110             ],
111             'sources':
112             [
113                 'compiler_tests/compiler_test_main.cpp',
114             ],
115         },
116
117         {
118             'target_name': 'angle_implementation_unit_tests',
119             'type': 'executable',
120             'dependencies':
121             [
122                 '../src/angle.gyp:libGLESv2_static',
123                 'gtest',
124                 'gmock',
125             ],
126             'include_dirs':
127             [
128                 '../include',
129                 '../src',
130                 'third_party/googletest/include',
131                 'third_party/googlemock/include',
132             ],
133             'includes':
134             [
135                 '../build/common_defines.gypi',
136                 'angle_implementation_unit_tests/angle_implementation_unit_tests.gypi',
137             ],
138             'sources':
139             [
140                 'angle_implementation_unit_tests/angle_implementation_unit_tests_main.cpp',
141             ],
142         },
143     ],
144
145     'conditions':
146     [
147         ['OS=="win"',
148         {
149             'targets':
150             [
151                 {
152                     'target_name': 'angle_tests',
153                     'type': 'executable',
154                     'includes': [ '../build/common_defines.gypi', ],
155                     'dependencies':
156                     [
157                         '../src/angle.gyp:libGLESv2',
158                         '../src/angle.gyp:libEGL',
159                         'gtest',
160                         '../util/util.gyp:angle_util',
161                     ],
162                     'include_dirs':
163                     [
164                         '../include',
165                         'angle_tests',
166                         'third_party/googletest/include',
167                     ],
168                     'sources':
169                     [
170                         '<!@(python <(angle_path)/enumerate_files.py angle_tests -types *.cpp *.h *.inl)'
171                     ],
172                 },
173                 {
174                     'target_name': 'standalone_tests',
175                     'type': 'executable',
176                     'includes': [ '../build/common_defines.gypi', ],
177                     'dependencies':
178                     [
179                         'gtest',
180                         'gmock',
181                     ],
182                     'include_dirs':
183                     [
184                         '../include',
185                         'angle_tests',
186                         'third_party/googletest/include',
187                         'third_party/googlemock/include',
188                     ],
189                     'sources':
190                     [
191                         '<!@(python <(angle_path)/enumerate_files.py standalone_tests -types *.cpp *.h)'
192                     ],
193                 },
194                 {
195                     'target_name': 'angle_perf_tests',
196                     'type': 'executable',
197                     'includes': [ '../build/common_defines.gypi', ],
198                     'dependencies':
199                     [
200                         '../src/angle.gyp:libGLESv2',
201                         '../src/angle.gyp:libEGL',
202                         'gtest',
203                         '../util/util.gyp:angle_util',
204                     ],
205                     'include_dirs':
206                     [
207                         '../include',
208                         'third_party/googletest/include',
209                     ],
210                     'sources':
211                     [
212                         'perf_tests/BufferSubData.cpp',
213                         'perf_tests/BufferSubData.h',
214                         'perf_tests/SimpleBenchmark.cpp',
215                         'perf_tests/SimpleBenchmark.h',
216                         'perf_tests/SimpleBenchmarks.cpp',
217                         'perf_tests/TexSubImage.cpp',
218                         'perf_tests/TexSubImage.h',
219                     ],
220                 },
221             ],
222             'conditions':
223             [
224                 ['angle_build_conformance_tests',
225                 {
226                     'variables':
227                     {
228                         'gles_conformance_tests_output_dir': '<(SHARED_INTERMEDIATE_DIR)/conformance_tests',
229                         'gles_conformance_tests_input_dir': 'third_party/gles_conformance_tests/conform/GTF_ES/glsl/GTF',
230                         'gles_conformance_tests_generator_script': 'gles_conformance_tests/generate_gles_conformance_tests.py',
231                     },
232                     'targets':
233                     [
234                         {
235                             'target_name': 'gles2_conformance_tests',
236                             'type': 'executable',
237                             'includes': [ '../build/common_defines.gypi', ],
238                             'dependencies':
239                             [
240                                 '../src/angle.gyp:libGLESv2',
241                                 '../src/angle.gyp:libEGL',
242                                 'gtest',
243                                 'third_party/gles_conformance_tests/conform/GTF_ES/glsl/GTF/es_cts.gyp:es_cts_test_data',
244                                 'third_party/gles_conformance_tests/conform/GTF_ES/glsl/GTF/es_cts.gyp:es2_cts',
245                             ],
246                             'variables':
247                             {
248                                 'gles2_conformance_tests_input_file': '<(gles_conformance_tests_input_dir)/mustpass_es20.run',
249                                 'gles2_conformance_tests_generated_file': '<(gles_conformance_tests_output_dir)/generated_gles2_conformance_tests.cpp',
250                             },
251                             'sources':
252                             [
253                                 '<!@(python <(angle_path)/enumerate_files.py gles_conformance_tests -types *.cpp *.h *.inl)',
254                                 '<(gles2_conformance_tests_generated_file)',
255                             ],
256                             'include_dirs':
257                             [
258                                 '../include',
259                                 'gles_conformance_tests',
260                                 'third_party/googletest/include',
261                             ],
262                             'defines':
263                             [
264                                 'CONFORMANCE_TESTS_TYPE=CONFORMANCE_TESTS_ES2',
265                             ],
266                             'actions':
267                             [
268                                 {
269                                     'action_name': 'generate_gles2_conformance_tests',
270                                     'message': 'Generating ES2 conformance tests...',
271                                     'msvs_cygwin_shell': 0,
272                                     'inputs':
273                                     [
274                                         '<(gles_conformance_tests_generator_script)',
275                                         '<(gles2_conformance_tests_input_file)',
276                                     ],
277                                     'outputs':
278                                     [
279                                         '<(gles2_conformance_tests_generated_file)',
280                                     ],
281                                     'action':
282                                     [
283                                         'python',
284                                         '<(gles_conformance_tests_generator_script)',
285                                         '<(gles2_conformance_tests_input_file)',
286                                         '<(gles_conformance_tests_input_dir)',
287                                         '<(gles2_conformance_tests_generated_file)',
288                                     ],
289                                 },
290                             ],
291                         },
292                         {
293                             'target_name': 'gles3_conformance_tests',
294                             'type': 'executable',
295                             'includes': [ '../build/common_defines.gypi', ],
296                             'dependencies':
297                             [
298                                 '../src/angle.gyp:libGLESv2',
299                                 '../src/angle.gyp:libEGL',
300                                 'gtest',
301                                 'third_party/gles_conformance_tests/conform/GTF_ES/glsl/GTF/es_cts.gyp:es_cts_test_data',
302                                 'third_party/gles_conformance_tests/conform/GTF_ES/glsl/GTF/es_cts.gyp:es3_cts',
303                             ],
304                             'variables':
305                             {
306                                 'gles3_conformance_tests_input_file': '<(gles_conformance_tests_input_dir)/mustpass_es30.run',
307                                 'gles3_conformance_tests_generated_file': '<(gles_conformance_tests_output_dir)/generated_gles3_conformance_tests.cpp',
308                             },
309                             'sources':
310                             [
311                                 '<!@(python <(angle_path)/enumerate_files.py gles_conformance_tests -types *.cpp *.h *.inl)',
312                                 '<(gles3_conformance_tests_generated_file)',
313                             ],
314                             'include_dirs':
315                             [
316                                 '../include',
317                                 'gles_conformance_tests',
318                                 'third_party/googletest/include',
319                             ],
320                             'defines':
321                             [
322                                 'CONFORMANCE_TESTS_TYPE=CONFORMANCE_TESTS_ES3',
323                             ],
324                             'msvs_settings':
325                             {
326                                 'VCCLCompilerTool':
327                                 {
328                                     # MSVS has trouble compiling this due to the obj files becoming too large.
329                                     'AdditionalOptions': [ '/bigobj' ],
330                                 },
331                             },
332                             'actions':
333                             [
334                                 {
335                                     'action_name': 'generate_gles3_conformance_tests',
336                                     'message': 'Generating ES3 conformance tests...',
337                                     'msvs_cygwin_shell': 0,
338                                     'inputs':
339                                     [
340                                         '<(gles_conformance_tests_generator_script)',
341                                         '<(gles3_conformance_tests_input_file)',
342                                     ],
343                                     'outputs':
344                                     [
345                                         '<(gles3_conformance_tests_generated_file)',
346                                     ],
347                                     'action':
348                                     [
349                                         'python',
350                                         '<(gles_conformance_tests_generator_script)',
351                                         '<(gles3_conformance_tests_input_file)',
352                                         '<(gles_conformance_tests_input_dir)',
353                                         '<(gles3_conformance_tests_generated_file)',
354                                     ],
355                                 },
356                             ],
357                         },
358                     ],
359                 }],
360                 ['angle_build_deqp_tests',
361                 {
362                     'targets':
363                     [
364                         {
365                             'target_name': 'deqp_tests',
366                             'type': 'executable',
367                             'includes': [ '../build/common_defines.gypi', ],
368                             'dependencies':
369                             [
370                                 '../src/angle.gyp:libGLESv2',
371                                 '../src/angle.gyp:libEGL',
372                                 'gtest',
373                                 'third_party/deqp/src/deqp/modules/gles3/gles3.gyp:deqp-gles3',
374                                 'third_party/deqp/src/deqp/framework/platform/platform.gyp:tcutil-platform',
375                             ],
376                             'include_dirs':
377                             [
378                                 '../include',
379                                 'third_party/googletest/include',
380                                 'deqp_tests',
381                             ],
382                             'variables':
383                             {
384                                 'deqp_tests_output_dir': '<(SHARED_INTERMEDIATE_DIR)/deqp_tests',
385                                 'deqp_tests_input_file': 'deqp_tests/deqp_tests.txt',
386                                 'deqp_tests_generated_file': '<(deqp_tests_output_dir)/generated_deqp_tests.cpp',
387                             },
388                             'sources':
389                             [
390                                 '<!@(python <(angle_path)/enumerate_files.py deqp_tests -types *.cpp *.h *.inl)',
391                                 '<(deqp_tests_generated_file)',
392                             ],
393                             'actions':
394                             [
395                                 {
396                                     'action_name': 'generate_deqp_tests',
397                                     'message': 'Generating dEQP tests...',
398                                     'msvs_cygwin_shell': 0,
399                                     'variables':
400                                     {
401                                         'deqp_tests_generator_script': 'deqp_tests/generate_deqp_tests.py',
402                                     },
403                                     'inputs':
404                                     [
405                                         '<(deqp_tests_generator_script)',
406                                         '<(deqp_tests_input_file)',
407                                     ],
408                                     'outputs':
409                                     [
410                                         '<(deqp_tests_generated_file)',
411                                     ],
412                                     'action':
413                                     [
414                                         'python',
415                                         '<(deqp_tests_generator_script)',
416                                         '<(deqp_tests_input_file)',
417                                         '<(deqp_tests_generated_file)',
418                                     ],
419                                 },
420                             ],
421                         },
422                     ],
423                 }],
424             ],
425         }],
426     ],
427 }