OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") |
| 7 import("//remoting/remoting_version.gni") |
| 8 import("//testing/test.gni") |
| 9 |
| 10 enable_remoting_host = is_win || is_mac || is_chromeos || use_x11 |
| 11 |
| 12 # Various remoting targets need this version definition. |
| 13 config("version") { |
| 14 defines = [ "VERSION=$version_full" ] |
| 15 } |
| 16 |
| 17 # GYP version: remoting/remoting_test.gypi:remoting_test_common |
| 18 source_set("test_support") { |
| 19 testonly = true |
| 20 |
| 21 sources = [ |
| 22 # Files from remoting_test_common not in separate test_support targets. |
| 23 "signaling/fake_signal_strategy.cc", |
| 24 "signaling/fake_signal_strategy.h", |
| 25 "signaling/mock_signal_strategy.cc", |
| 26 "signaling/mock_signal_strategy.h", |
| 27 "test/access_token_fetcher.cc", |
| 28 "test/app_remoting_test_driver_environment.cc", |
| 29 "test/fake_access_token_fetcher.cc", |
| 30 "test/fake_network_dispatcher.cc", |
| 31 "test/fake_network_dispatcher.h", |
| 32 "test/fake_network_manager.cc", |
| 33 "test/fake_network_manager.h", |
| 34 "test/fake_port_allocator.cc", |
| 35 "test/fake_port_allocator.h", |
| 36 "test/fake_socket_factory.cc", |
| 37 "test/fake_socket_factory.h", |
| 38 "test/leaky_bucket.cc", |
| 39 "test/leaky_bucket.h", |
| 40 "test/mock_access_token_fetcher.cc", |
| 41 "test/refresh_token_store.cc", |
| 42 ] |
| 43 |
| 44 deps = [ |
| 45 "//base", |
| 46 "//components/policy:test_support", |
| 47 "//net", |
| 48 "//remoting/base", |
| 49 "//remoting/client", |
| 50 "//remoting/codec", |
| 51 "//remoting/protocol:test_support", |
| 52 "//remoting/resources", |
| 53 "//testing/gmock", |
| 54 "//testing/gtest", |
| 55 ] |
| 56 |
| 57 if (enable_remoting_host) { |
| 58 deps += [ "//remoting/host:test_support" ] |
| 59 } |
| 60 } |
| 61 |
| 62 # TODO(GYP) remoting_unittests on Windows. Currently this fails with a |
| 63 # duplicate resource error on linking. |
| 64 if (!is_win) { |
| 65 test("remoting_unittests") { |
| 66 # Sources not included in one of the more specific unit_tests deps. |
| 67 sources = [ |
| 68 "signaling/iq_sender_unittest.cc", |
| 69 "signaling/log_to_server_unittest.cc", |
| 70 "signaling/server_log_entry_unittest.cc", |
| 71 "signaling/server_log_entry_unittest.h", |
| 72 "test/access_token_fetcher_unittest.cc", |
| 73 "test/app_remoting_test_driver_environment_unittest.cc", |
| 74 ] |
| 75 |
| 76 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 77 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 78 |
| 79 deps = [ |
| 80 ":test_support", |
| 81 "//base/allocator", |
| 82 "//google_apis", |
| 83 "//remoting/base:unit_tests", |
| 84 "//remoting/client:unit_tests", |
| 85 "//remoting/protocol:unit_tests", |
| 86 "//testing/gmock", |
| 87 "//testing/gtest", |
| 88 "//third_party/webrtc", |
| 89 ] |
| 90 |
| 91 if (is_android) { |
| 92 deps += [ "//testing/android:native_test_native_code" ] |
| 93 } else { |
| 94 deps += [ "//remoting/client/plugin" ] |
| 95 } |
| 96 |
| 97 if (enable_remoting_host) { |
| 98 deps += [ |
| 99 "//remoting/codec:unit_tests", |
| 100 "//remoting/host:unit_tests", |
| 101 ] |
| 102 } |
| 103 |
| 104 if (enable_webrtc) { |
| 105 deps += [ |
| 106 "//third_party/libjingle:libjingle_webrtc", |
| 107 "//third_party/libjingle:libpeerconnection", |
| 108 ] |
| 109 } |
| 110 } |
| 111 } else { |
| 112 group("remoting_unittests") { |
| 113 } |
| 114 } |
OLD | NEW |