Add new termination status for failed child process launch.
[chromium-blink-merge.git] / ppapi / BUILD.gn
blobd08d2214b3efe30c239d8a94a4e6a6f735b3f08e
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.
5 copy("copy_test_files") {
6   visibility = [ ":*" ]
7   sources = [
8     # Keep "test_case.html.mock-http-headers" with "test_case.html".
9     "tests/ppapi_nacl_tests_newlib.nmf",
10     "tests/test_case.html",
11     "tests/test_case.html.mock-http-headers",
12     "tests/test_page.css",
13     "tests/test_page.css.mock-http-headers",
14   ]
15   outputs = [
16     "$root_out_dir/{{source_file_part}}",
17   ]
20 copy("copy_test_files2") {
21   visibility = [ ":*" ]
22   sources = [
23     "tests/test_url_loader_data/hello.txt",
24   ]
25   outputs = [
26     "$root_out_dir/test_url_loader_data/{{source_file_part}}",
27   ]
30 import("//build/config/features.gni")
31 import("//ppapi/ppapi_sources.gni")
32 import("//testing/test.gni")
34 shared_library("ppapi_tests") {
35   sources = ppapi_sources.test_common_source_files +
36             ppapi_sources.test_trusted_source_files
38   configs += [ "//build/config:precompiled_headers" ]
39   defines = [ "GL_GLEXT_PROTOTYPES" ]
40   include_dirs = [ "lib/gl/include" ]
42   deps = [
43     ":copy_test_files",
44     ":copy_test_files2",
45     "//build/config/sanitizers:deps",
46     "//ppapi/cpp",
47     "//ppapi/shared_impl",
48   ]
51 shared_library("power_saver_test_plugin") {
52   sources = [
53     "tests/power_saver_test_plugin.cc",
54     "tests/test_utils.cc",
55   ]
57   deps = [
58     "//build/config/sanitizers:deps",
59     "//ppapi/cpp",
60     "//ppapi/shared_impl",
61   ]
64 test("ppapi_unittests") {
65   sources = [
66     "host/resource_message_filter_unittest.cc",
67     "proxy/device_enumeration_resource_helper_unittest.cc",
68     "proxy/file_chooser_resource_unittest.cc",
69     "proxy/file_system_resource_unittest.cc",
70     "proxy/flash_resource_unittest.cc",
71     "proxy/interface_list_unittest.cc",
72     "proxy/mock_resource.cc",
73     "proxy/mock_resource.h",
74     "proxy/nacl_message_scanner_unittest.cc",
75     "proxy/pdf_resource_unittest.cc",
76     "proxy/plugin_dispatcher_unittest.cc",
77     "proxy/plugin_resource_tracker_unittest.cc",
78     "proxy/plugin_var_tracker_unittest.cc",
79     "proxy/ppb_var_unittest.cc",
80     "proxy/ppp_instance_private_proxy_unittest.cc",
81     "proxy/ppp_instance_proxy_unittest.cc",
82     "proxy/ppp_messaging_proxy_unittest.cc",
83     "proxy/printing_resource_unittest.cc",
84     "proxy/raw_var_data_unittest.cc",
85     "proxy/serialized_var_unittest.cc",
86     "proxy/tracked_callback_unittest.cc",
87     "proxy/video_decoder_resource_unittest.cc",
88     "proxy/video_encoder_resource_unittest.cc",
89     "proxy/websocket_resource_unittest.cc",
90     "shared_impl/media_stream_audio_track_shared_unittest.cc",
91     "shared_impl/media_stream_buffer_manager_unittest.cc",
92     "shared_impl/media_stream_video_track_shared_unittest.cc",
93     "shared_impl/proxy_lock_unittest.cc",
94     "shared_impl/resource_tracker_unittest.cc",
95     "shared_impl/thread_aware_callback_unittest.cc",
96     "shared_impl/time_conversion_unittest.cc",
97     "shared_impl/var_tracker_unittest.cc",
98   ]
100   deps = [
101     "//base/allocator",
102     "//base/test:run_all_unittests",
103     "//base/test:test_support",
104     "//gpu/ipc",
105     "//ipc",
106     "//ipc:test_support",
107     "//media:shared_memory_support",
108     "//ppapi/host",
109     "//ppapi/proxy",
110     "//ppapi/proxy:test_support",
111     "//ppapi/shared_impl",
112     "//ppapi/shared_impl:test_support",
113     "//testing/gmock",
114     "//testing/gtest",
115     "//ui/surface",
116   ]
119 test("ppapi_perftests") {
120   sources = [
121     "proxy/ppapi_perftests.cc",
122     "proxy/ppp_messaging_proxy_perftest.cc",
123   ]
125   deps = [
126     "//base/allocator",
127     "//base/test:test_support",
128     "//ppapi/proxy",
129     "//ppapi/proxy:test_support",
130     "//ppapi/shared_impl",
131     "//ppapi/shared_impl:test_support",
132     "//testing/gtest",
133   ]
136 executable("pepper_hash_for_uma") {
137   sources = [
138     "tools/pepper_hash_for_uma.cc",
139   ]
141   deps = [
142     "//base",
143     "//build/config/sanitizers:deps",
144   ]
147 source_set("ppapi_cpp_lib") {
148   sources = ppapi_sources.cpp_source_files
149   sources += [
150     "cpp/module_embedder.h",
151     "cpp/ppp_entrypoints.cc",
152   ]
155 source_set("ppapi_gles2_lib") {
156   include_dirs = [ "lib/gl/include" ]
157   sources = [
158     "lib/gl/gles2/gl2ext_ppapi.c",
159     "lib/gl/gles2/gl2ext_ppapi.h",
160     "lib/gl/gles2/gles2.c",
161   ]
162   deps = [
163     "//ppapi/cpp",
164   ]
167 if (enable_nacl) {
168   if (is_nacl) {
169     executable("ppapi_nacl_tests_newlib") {
170       include_dirs = [
171         "lib/gl/include",
172         "..",
173       ]
175       sources = ppapi_sources.test_common_source_files +
176                 ppapi_sources.test_nacl_source_files
178       defines = [ "GL_GLEXT_PROTOTYPES" ]
180       deps = [
181         ":ppapi_cpp_lib",
182         "//ppapi/native_client:ppapi_lib",
183       ]
184     }
186     copy("nacl_tests_copy") {
187       sources = [
188         "${root_out_dir}/ppapi_nacl_tests_newlib.nexe",
189       ]
190       outputs = [
191         "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe",
192       ]
193       deps = [
194         ":ppapi_nacl_tests_newlib",
195       ]
196     }
197   }
199   group("ppapi_nacl_tests") {
200     deps = []
201     if (target_cpu == "x86" || target_cpu == "x64") {
202       deps += [ ":nacl_tests_copy(//native_client/build/toolchain/nacl:clang_newlib_${target_cpu})" ]
203     }
204   }