brettw@chromium.org | 240e303 | 2014-05-27 20:15:20 | [diff] [blame] | 1 | # Copyright 2014 The Chromium 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 | |
slan | 074ec34 | 2016-01-29 23:52:26 | [diff] [blame] | 5 | import("//build/config/features.gni") |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 6 | import("//build/config/nacl/config.gni") |
| 7 | import("//build/config/nacl/rules.gni") |
Dirk Pranke | ccc0c36 | 2017-09-28 22:15:11 | [diff] [blame] | 8 | import("//components/nacl/features.gni") |
brettw | 4b46108 | 2016-11-19 18:55:16 | [diff] [blame] | 9 | import("//ppapi/features/features.gni") |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 10 | import("//testing/test.gni") |
| 11 | if (is_mac) { |
| 12 | import("//build/config/mac/rules.gni") |
| 13 | } |
slan | 074ec34 | 2016-01-29 23:52:26 | [diff] [blame] | 14 | |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame] | 15 | assert(!is_android || enable_plugins, |
| 16 | "//ppapi should not be referenced when is_android && !enable_plugins") |
| 17 | |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 18 | # Test files shared between several targets below. |
| 19 | # |
| 20 | # TODO(brettw) it seems like it should be possible to factor this in a source |
| 21 | # set that is shared in such a way that these only need to be referenced once. |
| 22 | test_common_source_files = [ |
| 23 | "lib/gl/gles2/gl2ext_ppapi.c", |
| 24 | "lib/gl/gles2/gl2ext_ppapi.h", |
| 25 | "lib/gl/gles2/gles2.c", |
| 26 | "tests/all_c_includes.h", |
| 27 | "tests/all_cpp_includes.h", |
| 28 | "tests/arch_dependent_sizes_32.h", |
| 29 | "tests/arch_dependent_sizes_64.h", |
| 30 | "tests/pp_thread.h", |
| 31 | "tests/test_audio.cc", |
| 32 | "tests/test_audio.h", |
| 33 | "tests/test_audio_config.cc", |
| 34 | "tests/test_audio_config.h", |
| 35 | "tests/test_audio_encoder.cc", |
| 36 | "tests/test_audio_encoder.h", |
| 37 | "tests/test_case.cc", |
| 38 | "tests/test_case.h", |
| 39 | "tests/test_compositor.cc", |
| 40 | "tests/test_compositor.h", |
| 41 | "tests/test_console.cc", |
| 42 | "tests/test_console.h", |
| 43 | "tests/test_core.cc", |
| 44 | "tests/test_core.h", |
| 45 | "tests/test_cursor_control.cc", |
| 46 | "tests/test_cursor_control.h", |
| 47 | "tests/test_empty.cc", |
| 48 | "tests/test_empty.h", |
| 49 | "tests/test_file_io.cc", |
| 50 | "tests/test_file_io.h", |
| 51 | "tests/test_file_ref.cc", |
| 52 | "tests/test_file_ref.h", |
| 53 | "tests/test_file_system.cc", |
| 54 | "tests/test_file_system.h", |
| 55 | "tests/test_fullscreen.cc", |
| 56 | "tests/test_fullscreen.h", |
| 57 | "tests/test_graphics_2d.cc", |
| 58 | "tests/test_graphics_2d.h", |
| 59 | "tests/test_graphics_3d.cc", |
| 60 | "tests/test_graphics_3d.h", |
| 61 | "tests/test_host_resolver.cc", |
| 62 | "tests/test_host_resolver.h", |
| 63 | "tests/test_host_resolver_private.cc", |
| 64 | "tests/test_host_resolver_private.h", |
| 65 | "tests/test_host_resolver_private_disallowed.cc", |
| 66 | "tests/test_host_resolver_private_disallowed.h", |
| 67 | "tests/test_image_data.cc", |
| 68 | "tests/test_image_data.h", |
| 69 | "tests/test_ime_input_event.cc", |
| 70 | "tests/test_ime_input_event.h", |
| 71 | "tests/test_input_event.cc", |
| 72 | "tests/test_input_event.h", |
| 73 | "tests/test_media_stream_audio_track.cc", |
| 74 | "tests/test_media_stream_audio_track.h", |
| 75 | "tests/test_media_stream_video_track.cc", |
| 76 | "tests/test_media_stream_video_track.h", |
| 77 | "tests/test_memory.cc", |
| 78 | "tests/test_memory.h", |
| 79 | "tests/test_message_handler.cc", |
| 80 | "tests/test_message_handler.h", |
| 81 | "tests/test_message_loop.cc", |
| 82 | "tests/test_message_loop.h", |
| 83 | "tests/test_mouse_cursor.cc", |
| 84 | "tests/test_mouse_cursor.h", |
| 85 | "tests/test_mouse_lock.cc", |
| 86 | "tests/test_mouse_lock.h", |
| 87 | "tests/test_net_address.cc", |
| 88 | "tests/test_net_address.h", |
| 89 | "tests/test_net_address_private_untrusted.cc", |
| 90 | "tests/test_net_address_private_untrusted.h", |
| 91 | "tests/test_network_monitor.cc", |
| 92 | "tests/test_network_monitor.h", |
| 93 | "tests/test_network_proxy.cc", |
| 94 | "tests/test_network_proxy.h", |
| 95 | "tests/test_output_protection_private.cc", |
| 96 | "tests/test_output_protection_private.h", |
| 97 | "tests/test_paint_aggregator.cc", |
| 98 | "tests/test_paint_aggregator.h", |
| 99 | "tests/test_post_message.cc", |
| 100 | "tests/test_post_message.h", |
| 101 | "tests/test_printing.cc", |
| 102 | "tests/test_printing.h", |
| 103 | "tests/test_tcp_server_socket_private.cc", |
| 104 | "tests/test_tcp_server_socket_private.h", |
| 105 | "tests/test_tcp_socket.cc", |
| 106 | "tests/test_tcp_socket.h", |
| 107 | "tests/test_tcp_socket_private.cc", |
| 108 | "tests/test_tcp_socket_private.h", |
| 109 | "tests/test_test_internals.cc", |
| 110 | "tests/test_test_internals.h", |
| 111 | "tests/test_trace_event.cc", |
| 112 | "tests/test_trace_event.h", |
| 113 | "tests/test_truetype_font.cc", |
| 114 | "tests/test_truetype_font.h", |
| 115 | "tests/test_udp_socket.cc", |
| 116 | "tests/test_udp_socket.h", |
| 117 | "tests/test_udp_socket_private.cc", |
| 118 | "tests/test_udp_socket_private.h", |
| 119 | "tests/test_uma.cc", |
| 120 | "tests/test_uma.h", |
| 121 | "tests/test_url_loader.cc", |
| 122 | "tests/test_url_loader.h", |
| 123 | "tests/test_url_request.cc", |
| 124 | "tests/test_url_request.h", |
| 125 | "tests/test_utils.cc", |
| 126 | "tests/test_var.cc", |
| 127 | "tests/test_var.h", |
| 128 | "tests/test_var_resource.cc", |
| 129 | "tests/test_var_resource.h", |
| 130 | "tests/test_video_decoder.cc", |
| 131 | "tests/test_video_decoder.h", |
| 132 | "tests/test_video_destination.cc", |
| 133 | "tests/test_video_destination.h", |
| 134 | "tests/test_video_encoder.cc", |
| 135 | "tests/test_video_encoder.h", |
| 136 | "tests/test_video_source.cc", |
| 137 | "tests/test_video_source.h", |
| 138 | "tests/test_view.cc", |
| 139 | "tests/test_view.h", |
| 140 | "tests/test_websocket.cc", |
| 141 | "tests/test_websocket.h", |
| 142 | "tests/testing_instance.cc", |
| 143 | "tests/testing_instance.h", |
| 144 | |
| 145 | # Compile-time tests |
| 146 | "tests/test_c_includes.c", |
| 147 | "tests/test_cpp_includes.cc", |
| 148 | "tests/test_struct_sizes.c", |
| 149 | ] |
rsesek | 53dc310 | 2016-04-18 18:48:42 | [diff] [blame] | 150 | |
jam | b533b7e | 2015-03-04 17:12:05 | [diff] [blame] | 151 | copy("copy_test_files") { |
| 152 | visibility = [ ":*" ] |
| 153 | sources = [ |
| 154 | # Keep "test_case.html.mock-http-headers" with "test_case.html". |
| 155 | "tests/test_case.html", |
| 156 | "tests/test_case.html.mock-http-headers", |
| 157 | "tests/test_page.css", |
mkwst | b28d5ba | 2015-05-12 05:47:51 | [diff] [blame] | 158 | "tests/test_page.css.mock-http-headers", |
jam | b533b7e | 2015-03-04 17:12:05 | [diff] [blame] | 159 | ] |
| 160 | outputs = [ |
| 161 | "$root_out_dir/{{source_file_part}}", |
| 162 | ] |
| 163 | } |
| 164 | |
| 165 | copy("copy_test_files2") { |
| 166 | visibility = [ ":*" ] |
| 167 | sources = [ |
| 168 | "tests/test_url_loader_data/hello.txt", |
| 169 | ] |
| 170 | outputs = [ |
| 171 | "$root_out_dir/test_url_loader_data/{{source_file_part}}", |
| 172 | ] |
| 173 | } |
| 174 | |
rsesek | 4a73557 | 2016-04-20 00:18:24 | [diff] [blame] | 175 | source_set("ppapi_tests_sources") { |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 176 | sources = test_common_source_files |
| 177 | sources += [ |
| 178 | "tests/test_broker.cc", |
| 179 | "tests/test_broker.h", |
| 180 | "tests/test_browser_font.cc", |
| 181 | "tests/test_browser_font.h", |
| 182 | "tests/test_buffer.cc", |
| 183 | "tests/test_buffer.h", |
| 184 | "tests/test_char_set.cc", |
| 185 | "tests/test_char_set.h", |
| 186 | "tests/test_crypto.cc", |
| 187 | "tests/test_crypto.h", |
| 188 | "tests/test_file_chooser.cc", |
| 189 | "tests/test_file_chooser.h", |
| 190 | "tests/test_flash.cc", |
| 191 | "tests/test_flash.h", |
| 192 | "tests/test_flash_clipboard.cc", |
| 193 | "tests/test_flash_clipboard.h", |
| 194 | "tests/test_flash_drm.cc", |
| 195 | "tests/test_flash_drm.h", |
| 196 | "tests/test_flash_file.cc", |
| 197 | "tests/test_flash_file.h", |
| 198 | "tests/test_flash_fullscreen.cc", |
| 199 | "tests/test_flash_fullscreen.h", |
| 200 | "tests/test_flash_fullscreen_for_browser_ui.cc", |
| 201 | "tests/test_flash_fullscreen_for_browser_ui.h", |
| 202 | "tests/test_flash_message_loop.cc", |
| 203 | "tests/test_flash_message_loop.h", |
| 204 | "tests/test_net_address_private.cc", |
| 205 | "tests/test_net_address_private.h", |
| 206 | "tests/test_pdf.cc", |
| 207 | "tests/test_pdf.h", |
| 208 | "tests/test_platform_verification_private.cc", |
| 209 | "tests/test_platform_verification_private.h", |
| 210 | "tests/test_tcp_socket_private_trusted.cc", |
| 211 | "tests/test_tcp_socket_private_trusted.h", |
| 212 | "tests/test_url_util.cc", |
| 213 | "tests/test_url_util.h", |
| 214 | "tests/test_utils.h", |
| 215 | "tests/test_video_decoder_dev.cc", |
| 216 | "tests/test_video_decoder_dev.h", |
| 217 | "tests/test_x509_certificate_private.cc", |
| 218 | "tests/test_x509_certificate_private.h", |
| 219 | |
| 220 | # Deprecated test cases. |
| 221 | "tests/test_instance_deprecated.cc", |
| 222 | "tests/test_instance_deprecated.h", |
| 223 | "tests/test_var_deprecated.cc", |
| 224 | "tests/test_var_deprecated.h", |
| 225 | ] |
jam | b3dd0498 | 2015-02-25 18:22:56 | [diff] [blame] | 226 | |
dpranke | a22b073 | 2015-10-21 21:15:11 | [diff] [blame] | 227 | configs += [ |
| 228 | "//build/config:precompiled_headers", |
| 229 | "//v8:external_startup_data", |
| 230 | ] |
| 231 | |
jam | b3dd0498 | 2015-02-25 18:22:56 | [diff] [blame] | 232 | defines = [ "GL_GLEXT_PROTOTYPES" ] |
| 233 | include_dirs = [ "lib/gl/include" ] |
| 234 | |
| 235 | deps = [ |
jam | b533b7e | 2015-03-04 17:12:05 | [diff] [blame] | 236 | ":copy_test_files", |
| 237 | ":copy_test_files2", |
thomasanderson | 84fa8b0 | 2017-05-18 23:38:47 | [diff] [blame] | 238 | "//build/config:exe_and_shlib_deps", |
brettw | ba7a73d | 2015-08-31 22:17:39 | [diff] [blame] | 239 | "//ppapi/cpp", |
| 240 | "//ppapi/shared_impl", |
jam | b3dd0498 | 2015-02-25 18:22:56 | [diff] [blame] | 241 | ] |
| 242 | } |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 243 | |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 244 | if (is_mac) { |
| 245 | ppapi_tests_target_type = "mac_plugin_bundle" |
rsesek | 4a73557 | 2016-04-20 00:18:24 | [diff] [blame] | 246 | } else { |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 247 | ppapi_tests_target_type = "shared_library" |
| 248 | } |
| 249 | target(ppapi_tests_target_type, "ppapi_tests") { |
| 250 | deps = [ |
| 251 | ":ppapi_tests_sources", |
| 252 | ] |
rsesek | 4a73557 | 2016-04-20 00:18:24 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | source_set("power_saver_test_plugin_sources") { |
tommycli | 0dd1301 | 2015-04-24 20:27:22 | [diff] [blame] | 256 | sources = [ |
| 257 | "tests/power_saver_test_plugin.cc", |
| 258 | "tests/test_utils.cc", |
| 259 | ] |
| 260 | |
| 261 | deps = [ |
thomasanderson | 84fa8b0 | 2017-05-18 23:38:47 | [diff] [blame] | 262 | "//build/config:exe_and_shlib_deps", |
tommycli | 0dd1301 | 2015-04-24 20:27:22 | [diff] [blame] | 263 | "//ppapi/cpp", |
| 264 | "//ppapi/shared_impl", |
| 265 | ] |
| 266 | } |
| 267 | |
rsesek | 4a73557 | 2016-04-20 00:18:24 | [diff] [blame] | 268 | if (!is_mac) { |
| 269 | shared_library("power_saver_test_plugin") { |
| 270 | deps = [ |
| 271 | ":power_saver_test_plugin_sources", |
| 272 | ] |
| 273 | } |
| 274 | } else { |
| 275 | mac_plugin_bundle("power_saver_test_plugin") { |
| 276 | deps = [ |
| 277 | ":power_saver_test_plugin_sources", |
| 278 | ] |
| 279 | } |
| 280 | } |
| 281 | |
rsesek | 53dc310 | 2016-04-18 18:48:42 | [diff] [blame] | 282 | source_set("blink_deprecated_test_plugin_sources") { |
dcheng | c70b36e | 2016-03-02 02:36:10 | [diff] [blame] | 283 | sources = [ |
| 284 | "tests/blink_deprecated_test_plugin.cc", |
| 285 | ] |
| 286 | |
| 287 | deps = [ |
| 288 | "//base", |
thomasanderson | 84fa8b0 | 2017-05-18 23:38:47 | [diff] [blame] | 289 | "//build/config:exe_and_shlib_deps", |
dcheng | c70b36e | 2016-03-02 02:36:10 | [diff] [blame] | 290 | "//ppapi/cpp", |
| 291 | "//ppapi/shared_impl", |
| 292 | ] |
| 293 | } |
| 294 | |
rsesek | 53dc310 | 2016-04-18 18:48:42 | [diff] [blame] | 295 | if (!is_mac) { |
| 296 | loadable_module("blink_deprecated_test_plugin") { |
| 297 | deps = [ |
| 298 | ":blink_deprecated_test_plugin_sources", |
| 299 | ] |
| 300 | } |
| 301 | } else { |
| 302 | mac_plugin_bundle("blink_deprecated_test_plugin") { |
| 303 | deps = [ |
| 304 | ":blink_deprecated_test_plugin_sources", |
| 305 | ] |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | source_set("blink_test_plugin_sources") { |
dcheng | 0d93c1a | 2015-12-03 02:46:41 | [diff] [blame] | 310 | sources = [ |
| 311 | "tests/blink_test_plugin.cc", |
| 312 | ] |
| 313 | |
| 314 | deps = [ |
dcheng | ad95910 | 2016-03-02 05:23:13 | [diff] [blame] | 315 | "//base", |
thomasanderson | 84fa8b0 | 2017-05-18 23:38:47 | [diff] [blame] | 316 | "//build/config:exe_and_shlib_deps", |
dcheng | 0d93c1a | 2015-12-03 02:46:41 | [diff] [blame] | 317 | "//ppapi/cpp", |
| 318 | "//ppapi/shared_impl", |
| 319 | ] |
| 320 | } |
| 321 | |
rsesek | 53dc310 | 2016-04-18 18:48:42 | [diff] [blame] | 322 | if (!is_mac) { |
| 323 | loadable_module("blink_test_plugin") { |
| 324 | deps = [ |
| 325 | ":blink_test_plugin_sources", |
| 326 | ] |
| 327 | } |
| 328 | } else { |
| 329 | mac_plugin_bundle("blink_test_plugin") { |
| 330 | deps = [ |
| 331 | ":blink_test_plugin_sources", |
| 332 | ] |
| 333 | } |
| 334 | } |
| 335 | |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 336 | test("ppapi_unittests") { |
| 337 | sources = [ |
| 338 | "host/resource_message_filter_unittest.cc", |
| 339 | "proxy/device_enumeration_resource_helper_unittest.cc", |
| 340 | "proxy/file_chooser_resource_unittest.cc", |
| 341 | "proxy/file_system_resource_unittest.cc", |
| 342 | "proxy/flash_resource_unittest.cc", |
| 343 | "proxy/interface_list_unittest.cc", |
| 344 | "proxy/mock_resource.cc", |
| 345 | "proxy/mock_resource.h", |
| 346 | "proxy/nacl_message_scanner_unittest.cc", |
| 347 | "proxy/pdf_resource_unittest.cc", |
| 348 | "proxy/plugin_dispatcher_unittest.cc", |
| 349 | "proxy/plugin_resource_tracker_unittest.cc", |
| 350 | "proxy/plugin_var_tracker_unittest.cc", |
| 351 | "proxy/ppb_var_unittest.cc", |
| 352 | "proxy/ppp_instance_private_proxy_unittest.cc", |
| 353 | "proxy/ppp_instance_proxy_unittest.cc", |
| 354 | "proxy/ppp_messaging_proxy_unittest.cc", |
| 355 | "proxy/printing_resource_unittest.cc", |
| 356 | "proxy/raw_var_data_unittest.cc", |
| 357 | "proxy/serialized_var_unittest.cc", |
dmichael | 342e880 | 2015-03-31 22:48:40 | [diff] [blame] | 358 | "proxy/tracked_callback_unittest.cc", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 359 | "proxy/video_decoder_resource_unittest.cc", |
| 360 | "proxy/video_encoder_resource_unittest.cc", |
| 361 | "proxy/websocket_resource_unittest.cc", |
| 362 | "shared_impl/media_stream_audio_track_shared_unittest.cc", |
| 363 | "shared_impl/media_stream_buffer_manager_unittest.cc", |
| 364 | "shared_impl/media_stream_video_track_shared_unittest.cc", |
| 365 | "shared_impl/proxy_lock_unittest.cc", |
| 366 | "shared_impl/resource_tracker_unittest.cc", |
| 367 | "shared_impl/thread_aware_callback_unittest.cc", |
| 368 | "shared_impl/time_conversion_unittest.cc", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 369 | "shared_impl/var_tracker_unittest.cc", |
| 370 | ] |
| 371 | |
| 372 | deps = [ |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 373 | "//base/test:test_support", |
fsamuel | 19acfae | 2016-03-22 05:38:24 | [diff] [blame] | 374 | "//gpu/ipc/common:command_buffer_traits", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 375 | "//ipc", |
rockot | 6d7be62 | 2016-06-15 18:25:19 | [diff] [blame] | 376 | "//ipc:run_all_unittests", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 377 | "//ipc:test_support", |
| 378 | "//media:shared_memory_support", |
| 379 | "//ppapi/host", |
| 380 | "//ppapi/proxy", |
| 381 | "//ppapi/proxy:test_support", |
| 382 | "//ppapi/shared_impl", |
| 383 | "//ppapi/shared_impl:test_support", |
tomhudson | 21f6e9ba | 2016-02-01 14:06:40 | [diff] [blame] | 384 | "//skia", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 385 | "//testing/gmock", |
| 386 | "//testing/gtest", |
| 387 | "//ui/surface", |
| 388 | ] |
| 389 | } |
| 390 | |
| 391 | test("ppapi_perftests") { |
| 392 | sources = [ |
| 393 | "proxy/ppapi_perftests.cc", |
| 394 | "proxy/ppp_messaging_proxy_perftest.cc", |
| 395 | ] |
| 396 | |
| 397 | deps = [ |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 398 | "//base/test:test_support", |
rockot | 6d7be62 | 2016-06-15 18:25:19 | [diff] [blame] | 399 | "//mojo/edk/system", |
brettw | 31f4de69 | 2015-03-04 17:24:45 | [diff] [blame] | 400 | "//ppapi/proxy", |
| 401 | "//ppapi/proxy:test_support", |
| 402 | "//ppapi/shared_impl", |
| 403 | "//ppapi/shared_impl:test_support", |
| 404 | "//testing/gtest", |
| 405 | ] |
| 406 | } |
dpranke | c09ccaa | 2015-03-27 22:00:38 | [diff] [blame] | 407 | |
| 408 | executable("pepper_hash_for_uma") { |
| 409 | sources = [ |
| 410 | "tools/pepper_hash_for_uma.cc", |
| 411 | ] |
| 412 | |
| 413 | deps = [ |
| 414 | "//base", |
thomasanderson | 84fa8b0 | 2017-05-18 23:38:47 | [diff] [blame] | 415 | "//build/config:exe_and_shlib_deps", |
brucedawson | f9f7d629 | 2016-04-27 19:11:07 | [diff] [blame] | 416 | "//build/win:default_exe_manifest", |
dpranke | c09ccaa | 2015-03-27 22:00:38 | [diff] [blame] | 417 | ] |
| 418 | } |
phosek | 73470e0 | 2015-08-28 22:34:28 | [diff] [blame] | 419 | |
phosek | 73470e0 | 2015-08-28 22:34:28 | [diff] [blame] | 420 | source_set("ppapi_gles2_lib") { |
| 421 | include_dirs = [ "lib/gl/include" ] |
| 422 | sources = [ |
| 423 | "lib/gl/gles2/gl2ext_ppapi.c", |
| 424 | "lib/gl/gles2/gl2ext_ppapi.h", |
| 425 | "lib/gl/gles2/gles2.c", |
| 426 | ] |
| 427 | deps = [ |
| 428 | "//ppapi/cpp", |
| 429 | ] |
| 430 | } |
| 431 | |
Nico Weber | 524e0f86 | 2015-09-02 22:23:10 | [diff] [blame] | 432 | if (enable_nacl) { |
phosek | e19dffc | 2016-05-09 07:03:49 | [diff] [blame] | 433 | import("//ppapi/native_client/nacl_test_data.gni") |
| 434 | |
thakis | 92ba97f | 2015-09-02 17:21:37 | [diff] [blame] | 435 | if (is_nacl) { |
phosek | e19dffc | 2016-05-09 07:03:49 | [diff] [blame] | 436 | nacl_test_data("ppapi_nacl_tests") { |
phosek | 70a330f | 2015-09-24 03:23:22 | [diff] [blame] | 437 | include_dirs = [ "lib/gl/include" ] |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 438 | sources = test_common_source_files |
| 439 | |
| 440 | sources += [ |
| 441 | "tests/test_nacl_irt_stack_alignment.cc", |
| 442 | "tests/test_nacl_irt_stack_alignment.h", |
| 443 | "tests/test_tcp_server_socket_private_disallowed.cc", |
thakis | b8590c9 | 2017-03-23 18:14:53 | [diff] [blame] | 444 | "tests/test_tcp_server_socket_private_disallowed.h", |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 445 | "tests/test_tcp_socket_private_disallowed.cc", |
thakis | b8590c9 | 2017-03-23 18:14:53 | [diff] [blame] | 446 | "tests/test_tcp_socket_private_disallowed.h", |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 447 | "tests/test_udp_socket_private_disallowed.cc", |
thakis | b8590c9 | 2017-03-23 18:14:53 | [diff] [blame] | 448 | "tests/test_udp_socket_private_disallowed.h", |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 449 | ] |
| 450 | |
phosek | 70a330f | 2015-09-24 03:23:22 | [diff] [blame] | 451 | defines = [ |
| 452 | "GL_GLEXT_PROTOTYPES", |
| 453 | "PPAPI_TEST_IMPLEMENTATION", |
| 454 | ] |
thakis | 92ba97f | 2015-09-02 17:21:37 | [diff] [blame] | 455 | deps = [ |
brettw | 9d6a868b | 2016-08-30 05:52:06 | [diff] [blame] | 456 | "//ppapi/cpp", |
thakis | 92ba97f | 2015-09-02 17:21:37 | [diff] [blame] | 457 | ] |
phosek | c635281 | 2015-10-06 20:34:55 | [diff] [blame] | 458 | if (current_cpu == "pnacl") { |
phosek | e19dffc | 2016-05-09 07:03:49 | [diff] [blame] | 459 | pretranslate_pexe = true |
phosek | c635281 | 2015-10-06 20:34:55 | [diff] [blame] | 460 | } |
thakis | 92ba97f | 2015-09-02 17:21:37 | [diff] [blame] | 461 | } |
phosek | 73470e0 | 2015-08-28 22:34:28 | [diff] [blame] | 462 | } |
| 463 | |
phosek | 70a330f | 2015-09-24 03:23:22 | [diff] [blame] | 464 | group("ppapi_nacl_tests_all") { |
mcgrathr | 13eefcb | 2015-10-22 19:35:07 | [diff] [blame] | 465 | data_deps = [ |
| 466 | ":copy_test_files", |
phosek | e19dffc | 2016-05-09 07:03:49 | [diff] [blame] | 467 | ":ppapi_nacl_tests(//build/toolchain/nacl:clang_newlib_${target_cpu})", |
mcgrathr | 0c27b8c | 2016-01-20 19:51:11 | [diff] [blame] | 468 | ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)", |
mcgrathr | 13eefcb | 2015-10-22 19:35:07 | [diff] [blame] | 469 | ] |
milko.leporis | 3de038d | 2016-08-18 09:59:37 | [diff] [blame] | 470 | |
| 471 | if (target_cpu != "mipsel") { |
| 472 | data_deps += |
| 473 | [ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ] |
| 474 | } |
| 475 | |
| 476 | if (is_linux && enable_nacl_nonsfi) { |
| 477 | data_deps += |
| 478 | [ ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)" ] |
| 479 | } |
phosek | 73470e0 | 2015-08-28 22:34:28 | [diff] [blame] | 480 | } |
| 481 | } |