Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / remoting / BUILD.gn
blob02adc68d0ab95ec3965cf58a360342a20cca442e
1 # Copyright 2015 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 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//remoting/remoting_version.gni")
8 import("//remoting/remoting_enable.gni")
9 import("//testing/test.gni")
11 # Various remoting targets need this version definition.
12 config("version") {
13   defines = [ "VERSION=$version_full" ]
16 group("remoting_all") {
17   testonly = true
19   deps = [
20     #"//remoting:remoting_browser_test_resources",
21     "//remoting:remoting_unittests",
22     #"//remoting:remoting_webapp_unittests",
23     #"//app_remoting_test.gyp:ar_sample_test_driver",
24     #"//app_remoting_webapp.gyp:ar_sample_app",
25   ]
27   if ((is_linux && !is_chromeos) || is_mac) {
28     deps += [
29       # TODO(gyp) Enable this for Windows once the webapp can be built without
30       # exceeding the 8k cmd line limit on Windows.
31       "//remoting/webapp",
32     ]
33   }
35   if (is_win) {
36     deps += [
37       #"//remoting:remoting_breakpad_tester",
38       #"//remoting:remoting_console",
39       #"//remoting:remoting_desktop",
40       #"//remoting:remoting_host_installation",
41     ]
42   }
44   if (is_android) {
45     deps += [
46       #"//remoting:remoting_apk",
47       #"//remoting:remoting_test_apk",
48       #"//remoting:remoting_unittests_apk",
49     ]
50   }
52   if (enable_remoting_host) {
53     deps += [
54       "//remoting:remoting_perftests",
55       "//remoting/host",
56       "//remoting/host:remoting_start_host",
57       "//remoting/host/it2me:remote_assistance_host",
59       #"//remoting:remoting_it2me_native_messaging_host",
60       #"//remoting:remoting_native_messaging_manifests",
61     ]
62   }
64   if (enable_me2me_host) {
65     deps += [
66       "//remoting/host:remoting_me2me_host",
67       #"//remoting/host:remoting_me2me_host_archive",
68     ]
69   }
71   # TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
72   if (enable_nacl) {
73     deps += [ "//remoting:remoting_key_tester" ]
74   }
77 # GYP version: remoting/remoting_test.gypi:remoting_test_common
78 source_set("test_support") {
79   testonly = true
81   sources = [
82     # Files from remoting_test_common not in separate test_support targets.
83     "signaling/fake_signal_strategy.cc",
84     "signaling/fake_signal_strategy.h",
85     "signaling/mock_signal_strategy.cc",
86     "signaling/mock_signal_strategy.h",
87     "test/access_token_fetcher.cc",
88     "test/access_token_fetcher.h",
89     "test/app_remoting_test_driver_environment.cc",
90     "test/app_remoting_test_driver_environment.h",
91     "test/app_remoting_test_driver_environment_app_details.cc",
92     "test/fake_access_token_fetcher.cc",
93     "test/fake_access_token_fetcher.h",
94     "test/fake_network_dispatcher.cc",
95     "test/fake_network_dispatcher.h",
96     "test/fake_network_manager.cc",
97     "test/fake_network_manager.h",
98     "test/fake_port_allocator.cc",
99     "test/fake_port_allocator.h",
100     "test/fake_remote_host_info_fetcher.cc",
101     "test/fake_remote_host_info_fetcher.h",
102     "test/fake_socket_factory.cc",
103     "test/fake_socket_factory.h",
104     "test/leaky_bucket.cc",
105     "test/leaky_bucket.h",
106     "test/mock_access_token_fetcher.cc",
107     "test/mock_access_token_fetcher.h",
108     "test/refresh_token_store.cc",
109     "test/refresh_token_store.h",
110     "test/remote_application_details.h",
111     "test/remote_connection_observer.h",
112     "test/remote_host_info.cc",
113     "test/remote_host_info.h",
114     "test/remote_host_info_fetcher.cc",
115     "test/remote_host_info_fetcher.h",
116     "test/test_chromoting_client.cc",
117     "test/test_chromoting_client.h",
118     "test/test_video_renderer.cc",
119     "test/test_video_renderer.h",
120   ]
122   deps = [
123     "//base",
124     "//net",
125     "//remoting/base",
126     "//remoting/client",
127     "//remoting/codec",
128     "//remoting/protocol:test_support",
129     "//remoting/resources",
130     "//testing/gmock",
131     "//testing/gtest",
132   ]
134   if (enable_configuration_policy) {
135     deps += [ "//components/policy:test_support" ]
136   }
138   if (enable_remoting_host) {
139     deps += [ "//remoting/host:test_support" ]
140   }
143 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
144 if (!is_mac) {
145   test("remoting_unittests") {
146     # Sources not included in one of the more specific unit_tests deps.
147     sources = [
148       "signaling/iq_sender_unittest.cc",
149       "signaling/log_to_server_unittest.cc",
150       "signaling/server_log_entry_unittest.cc",
151       "signaling/server_log_entry_unittest.h",
152       "test/access_token_fetcher_unittest.cc",
153       "test/app_remoting_test_driver_environment_unittest.cc",
154       "test/remote_host_info_fetcher_unittest.cc",
155       "test/test_chromoting_client_unittest.cc",
156     ]
158     configs += [
159       ":version",
161       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
162       "//build/config/compiler:no_size_t_to_int_warning",
163     ]
165     deps = [
166       ":test_support",
167       "//base/allocator",
168       "//google_apis",
169       "//remoting/base:unit_tests",
170       "//remoting/client:unit_tests",
171       "//remoting/protocol:test_support",
172       "//remoting/protocol:unit_tests",
173       "//testing/gmock",
174       "//testing/gtest",
175       "//third_party/webrtc",
176     ]
178     if (is_android) {
179       deps += [ "//testing/android/native_test:native_test_native_code" ]
180     } else {
181       deps += [
182         "//remoting/client/plugin",
183         "//remoting/client/plugin:unit_tests",
184       ]
185     }
187     if (enable_remoting_host) {
188       deps += [
189         "//remoting/codec:unit_tests",
190         "//remoting/host:unit_tests",
191         "//ui/gfx",
192       ]
193     }
195     if (enable_webrtc) {
196       deps += [
197         "//third_party/libjingle:libjingle_webrtc",
198         "//third_party/libjingle:libpeerconnection",
199       ]
200     }
201   }
203   if (enable_remoting_host) {
204     test("remoting_perftests") {
205       sources = [
206         "codec/codec_test.cc",
207         "codec/codec_test.h",
208         "codec/video_encoder_vpx_perftest.cc",
209         "test/protocol_perftest.cc",
210       ]
212       configs += [ ":version" ]
214       deps = [
215         ":test_support",
216         "//base",
217         "//base/test:run_all_unittests",
218         "//base/test:test_support",
219         "//net:test_support",
220         "//remoting/base",
221         "//testing/gtest",
222         "//third_party/webrtc/modules/desktop_capture",
223         "//third_party/libjingle",
224       ]
226       if (enable_webrtc) {
227         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
228       }
229     }
230   }
231 } else {
232   group("remoting_unittests") {
233   }
236 if (enable_pnacl) {
237   group("remoting_key_tester") {
238     deps = [
239       ":remoting_key_tester_copies",
240     ]
241   }
243   copy("remoting_key_tester_copies") {
244     sources = [
245       "tools/javascript_key_tester/background.js",
246       "tools/javascript_key_tester/chord_tracker.js",
247       "tools/javascript_key_tester/event_listeners.js",
248       "tools/javascript_key_tester/icon_128.png",
249       "tools/javascript_key_tester/main.css",
250       "tools/javascript_key_tester/main.html",
251       "tools/javascript_key_tester/main.js",
252       "tools/javascript_key_tester/manifest.json",
253       "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
255       # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
256     ]
258     outputs = [
259       "$target_out_dir/remoting/key_tester/{{source_file_part}}",
260     ]
262     deps = [
263       ":remoting_key_tester_jscompile",
264       ":remoting_key_tester_pexe",
265     ]
266   }
268   group("remoting_key_tester_jscompile") {
269     # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
270     run_jscompile = false
271     if (run_jscompile) {
272     }
273   }
275   group("remoting_key_tester_pexe") {
276     # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
277     #sources = [
278     # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",
279     #]
280   }