| # 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 = "webrtc/tools/network_tester" |
| } |
| |
| proto_library("network_tester_packet_proto") { |
| sources = [ |
| "network_tester_packet.proto", |
| ] |
| proto_out_dir = "webrtc/tools/network_tester" |
| } |
| |
| rtc_static_library("network_tester") { |
| sources = [ |
| "config_reader.cc", |
| "config_reader.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", |
| "../../base:rtc_task_queue", |
| "../../p2p", |
| ] |
| |
| 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") { |
| sources = [ |
| "network_tester_unittest.cc", |
| ] |
| |
| testonly = true |
| deps = [ |
| ":network_tester", |
| "//testing/gtest", |
| "//webrtc/base:rtc_base_tests_utils", |
| "//webrtc/test:test_support", |
| ] |
| |
| if (is_ios) { |
| deps += [ ":network_tester_unittests_bundle_data" ] |
| } |
| |
| defines = [ "GTEST_RELATIVE_PATH" ] |
| |
| 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" ] |
| } |
| } |
| } |