blob: 06ce45d4f82dda367cc153d150d59a9797f9e3e4 [file] [log] [blame]
hbos615d3012016-08-24 01:33:13 -07001# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
hbos615d3012016-08-24 01:33:13 -070010
11group("stats") {
kjellander705ecc52016-09-15 00:53:26 -070012 public_deps = [
hbos615d3012016-08-24 01:33:13 -070013 ":rtc_stats",
14 ]
15}
16
kjellanderb62dbbe2016-09-23 00:38:52 -070017rtc_static_library("rtc_stats") {
hbos615d3012016-08-24 01:33:13 -070018 cflags = []
19 sources = [
20 "rtcstats.cc",
hbosd565b732016-08-30 14:04:35 -070021 "rtcstats_objects.cc",
hbos615d3012016-08-24 01:33:13 -070022 "rtcstatsreport.cc",
23 ]
24
hbos615d3012016-08-24 01:33:13 -070025 deps = [
hbos74e1a4f2016-09-15 23:33:01 -070026 "../api:rtc_stats_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070027 "../rtc_base:rtc_base_approved",
hbos615d3012016-08-24 01:33:13 -070028 ]
29}
30
hbos27e177c2016-09-19 06:05:56 -070031rtc_source_set("rtc_stats_test_utils") {
32 cflags = []
33 sources = [
34 "test/rtcteststats.cc",
35 "test/rtcteststats.h",
36 ]
37
hbos27e177c2016-09-19 06:05:56 -070038 deps = [
39 ":rtc_stats",
40 "../api:rtc_stats_api",
41 ]
42}
43
hbos615d3012016-08-24 01:33:13 -070044if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -070045 rtc_test("rtc_stats_unittests") {
hbos615d3012016-08-24 01:33:13 -070046 testonly = true
47 sources = [
48 "rtcstats_unittest.cc",
hbos6d183ac2016-08-29 07:20:33 -070049 "rtcstatsreport_unittest.cc",
hbos615d3012016-08-24 01:33:13 -070050 ]
51
kjellandere40a7ee2016-10-16 23:56:12 -070052 if (!build_with_chromium && is_clang) {
hbosd565b732016-08-30 14:04:35 -070053 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070054 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
hbosd565b732016-08-30 14:04:35 -070055 }
56
hbos615d3012016-08-24 01:33:13 -070057 deps = [
58 ":rtc_stats",
hbos27e177c2016-09-19 06:05:56 -070059 ":rtc_stats_test_utils",
kjellanderdcb4b432017-02-27 15:53:39 -080060 "../api:rtc_stats_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070061 "../rtc_base:rtc_base_approved",
62 "../rtc_base:rtc_base_tests_main",
63 "../rtc_base:rtc_base_tests_utils",
ehmaldonado35a872c2017-07-28 07:29:12 -070064 "../rtc_base:rtc_json",
hbos615d3012016-08-24 01:33:13 -070065 "../system_wrappers:metrics_default",
66 "//testing/gmock",
67 ]
68
69 if (is_android) {
70 deps += [ "//testing/android/native_test:native_test_native_code" ]
71 }
hbos615d3012016-08-24 01:33:13 -070072 }
73}