1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../../webrtc.gni")
import("//third_party/protobuf/proto_library.gni")
if (rtc_enable_protobuf) {
proto_library("network_tester_config_proto") {
sources = [
"network_tester_config.proto",
]
proto_out_dir = "rtc_tools/network_tester"
}
proto_library("network_tester_packet_proto") {
sources = [
"network_tester_packet.proto",
]
proto_out_dir = "rtc_tools/network_tester"
}
rtc_static_library("network_tester") {
sources = [
"config_reader.cc",
"config_reader.h",
"packet_logger.cc",
"packet_logger.h",
"packet_sender.cc",
"packet_sender.h",
"test_controller.cc",
"test_controller.h",
]
defines = [ "WEBRTC_NETWORK_TESTER_PROTO" ]
deps = [
":network_tester_config_proto",
":network_tester_packet_proto",
"../../p2p",
"../../rtc_base:checks",
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_task_queue",
"../../rtc_base:sequenced_task_checker",
"//third_party/abseil-cpp/absl/types:optional",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
network_tester_unittests_resources = [
"../../resources/network_tester/client_config.dat",
"../../resources/network_tester/server_config.dat",
]
if (is_ios) {
bundle_data("network_tester_unittests_bundle_data") {
testonly = true
sources = network_tester_unittests_resources
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
}
rtc_source_set("network_tester_unittests") {
testonly = true
sources = [
"network_tester_unittest.cc",
]
deps = [
":network_tester",
"../../rtc_base:rtc_base_tests_utils",
"../../test:fileutils",
"../../test:test_support",
"//testing/gtest",
]
if (is_ios) {
deps += [ ":network_tester_unittests_bundle_data" ]
}
defines = [ "WEBRTC_NETWORK_TESTER_TEST_ENABLED" ]
data = network_tester_unittests_resources
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
rtc_executable("network_tester_server") {
sources = [
"server.cc",
]
deps = [
":network_tester",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
}
if (is_android) {
android_apk("NetworkTesterMobile") {
testonly = true
apk_name = "NetworkTesterMobile"
android_manifest = "androidapp/AndroidManifest.xml"
deps = [
":NetworkTesterMobile_javalib",
":NetworkTesterMobile_resources",
"../../rtc_base:base_java",
]
shared_libraries = [ "../../rtc_tools/network_tester:network_tester_so" ]
}
android_library("NetworkTesterMobile_javalib") {
testonly = true
android_manifest_for_lint = "androidapp/AndroidManifest.xml"
java_files = [
"androidapp/src/com/google/media/networktester/MainActivity.java",
"androidapp/src/com/google/media/networktester/NetworkTester.java",
]
deps = [
":NetworkTesterMobile_resources",
"../../rtc_base:base_java",
]
}
android_resources("NetworkTesterMobile_resources") {
testonly = true
resource_dirs = [ "androidapp/res" ]
custom_package = "com.google.media.networktester"
}
rtc_shared_library("network_tester_so") {
sources = [
"jni.cpp",
]
deps = [
":network_tester",
"../../system_wrappers:field_trial_default",
]
suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ]
output_extension = "so"
}
}
|