• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2019 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
9import("../../../webrtc.gni")
10
11rtc_library("metric_metadata_keys") {
12  testonly = true
13  sources = [ "metric_metadata_keys.h" ]
14}
15
16if (!build_with_chromium) {
17  group("e2e") {
18    testonly = true
19
20    deps = [ ":metric_metadata_keys" ]
21    if (rtc_include_tests) {
22      deps += [
23        ":peerconnection_quality_test",
24        ":test_peer",
25      ]
26    }
27  }
28
29  if (rtc_include_tests) {
30    group("e2e_unittests") {
31      testonly = true
32
33      deps = [
34        ":peer_connection_e2e_smoke_test",
35        ":peer_connection_quality_test_metric_names_test",
36        ":peer_connection_quality_test_test",
37        ":stats_based_network_quality_metrics_reporter_test",
38        ":stats_poller_test",
39      ]
40    }
41  }
42
43  if (rtc_include_tests) {
44    rtc_library("echo_emulation") {
45      testonly = true
46      sources = [
47        "echo/echo_emulation.cc",
48        "echo/echo_emulation.h",
49      ]
50      deps = [
51        "../../../api/test/pclf:media_configuration",
52        "../../../modules/audio_device:audio_device_impl",
53        "../../../rtc_base:swap_queue",
54      ]
55    }
56
57    rtc_library("test_peer") {
58      testonly = true
59      sources = [
60        "test_peer.cc",
61        "test_peer.h",
62      ]
63      deps = [
64        ":stats_provider",
65        "../../../api:frame_generator_api",
66        "../../../api:function_view",
67        "../../../api:libjingle_peerconnection_api",
68        "../../../api:scoped_refptr",
69        "../../../api:sequence_checker",
70        "../../../api/task_queue:pending_task_safety_flag",
71        "../../../api/test/pclf:media_configuration",
72        "../../../api/test/pclf:media_quality_test_params",
73        "../../../api/test/pclf:peer_configurer",
74        "../../../modules/audio_processing:api",
75        "../../../pc:peerconnection_wrapper",
76        "../../../rtc_base:logging",
77        "../../../rtc_base:refcount",
78        "../../../rtc_base/synchronization:mutex",
79      ]
80      absl_deps = [
81        "//third_party/abseil-cpp/absl/memory",
82        "//third_party/abseil-cpp/absl/strings",
83        "//third_party/abseil-cpp/absl/types:variant",
84      ]
85    }
86
87    rtc_library("test_peer_factory") {
88      testonly = true
89      sources = [
90        "test_peer_factory.cc",
91        "test_peer_factory.h",
92      ]
93      deps = [
94        ":echo_emulation",
95        ":test_peer",
96        "../..:copy_to_file_audio_capturer",
97        "../../../api:create_time_controller",
98        "../../../api:time_controller",
99        "../../../api/rtc_event_log:rtc_event_log_factory",
100        "../../../api/task_queue:default_task_queue_factory",
101        "../../../api/test/pclf:media_configuration",
102        "../../../api/test/pclf:media_quality_test_params",
103        "../../../api/test/pclf:peer_configurer",
104        "../../../api/transport:field_trial_based_config",
105        "../../../api/video_codecs:builtin_video_decoder_factory",
106        "../../../api/video_codecs:builtin_video_encoder_factory",
107        "../../../media:rtc_audio_video",
108        "../../../media:rtc_media_engine_defaults",
109        "../../../modules/audio_device:audio_device_impl",
110        "../../../modules/audio_processing/aec_dump",
111        "../../../p2p:rtc_p2p",
112        "../../../rtc_base:rtc_task_queue",
113        "../../../rtc_base:threading",
114        "analyzer/video:quality_analyzing_video_encoder",
115        "analyzer/video:video_quality_analyzer_injection_helper",
116      ]
117      absl_deps = [
118        "//third_party/abseil-cpp/absl/memory",
119        "//third_party/abseil-cpp/absl/strings",
120      ]
121    }
122
123    rtc_library("media_helper") {
124      testonly = true
125      sources = [
126        "media/media_helper.cc",
127        "media/media_helper.h",
128        "media/test_video_capturer_video_track_source.h",
129      ]
130      deps = [
131        ":test_peer",
132        "../..:fileutils",
133        "../..:platform_video_capturer",
134        "../..:video_test_common",
135        "../../../api:create_frame_generator",
136        "../../../api:frame_generator_api",
137        "../../../api:media_stream_interface",
138        "../../../api/test/pclf:media_configuration",
139        "../../../api/test/pclf:peer_configurer",
140        "../../../api/video:video_frame",
141        "../../../pc:session_description",
142        "../../../pc:video_track_source",
143        "analyzer/video:video_quality_analyzer_injection_helper",
144      ]
145      absl_deps = [ "//third_party/abseil-cpp/absl/types:variant" ]
146    }
147
148    rtc_library("peer_params_preprocessor") {
149      visibility = [ "*" ]
150      testonly = true
151      sources = [
152        "peer_params_preprocessor.cc",
153        "peer_params_preprocessor.h",
154      ]
155      deps = [
156        "../..:fileutils",
157        "../../../api:peer_network_dependencies",
158        "../../../api/test/pclf:media_configuration",
159        "../../../api/test/pclf:media_quality_test_params",
160        "../../../api/test/pclf:peer_configurer",
161        "../../../modules/video_coding/svc:scalability_mode_util",
162        "../../../modules/video_coding/svc:scalability_structures",
163        "../../../rtc_base:macromagic",
164      ]
165      absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
166    }
167
168    rtc_library("test_activities_executor") {
169      testonly = true
170      sources = [
171        "test_activities_executor.cc",
172        "test_activities_executor.h",
173      ]
174      deps = [
175        "../../../api/task_queue",
176        "../../../api/units:time_delta",
177        "../../../api/units:timestamp",
178        "../../../rtc_base:checks",
179        "../../../rtc_base:criticalsection",
180        "../../../rtc_base:logging",
181        "../../../rtc_base:task_queue_for_test",
182        "../../../rtc_base/synchronization:mutex",
183        "../../../rtc_base/task_utils:repeating_task",
184        "../../../system_wrappers",
185      ]
186      absl_deps = [
187        "//third_party/abseil-cpp/absl/memory",
188        "//third_party/abseil-cpp/absl/types:optional",
189      ]
190    }
191
192    rtc_library("peerconnection_quality_test") {
193      testonly = true
194
195      sources = [
196        "peer_connection_quality_test.cc",
197        "peer_connection_quality_test.h",
198      ]
199      deps = [
200        ":analyzer_helper",
201        ":cross_media_metrics_reporter",
202        ":default_audio_quality_analyzer",
203        ":media_helper",
204        ":metric_metadata_keys",
205        ":peer_params_preprocessor",
206        ":sdp_changer",
207        ":stats_poller",
208        ":test_activities_executor",
209        ":test_peer",
210        ":test_peer_factory",
211        "../..:field_trial",
212        "../..:fileutils",
213        "../..:perf_test",
214        "../../../api:audio_quality_analyzer_api",
215        "../../../api:libjingle_peerconnection_api",
216        "../../../api:media_stream_interface",
217        "../../../api:peer_connection_quality_test_fixture_api",
218        "../../../api:rtc_event_log_output_file",
219        "../../../api:scoped_refptr",
220        "../../../api:time_controller",
221        "../../../api:video_quality_analyzer_api",
222        "../../../api/rtc_event_log",
223        "../../../api/task_queue",
224        "../../../api/test/metrics:metric",
225        "../../../api/test/metrics:metrics_logger",
226        "../../../api/test/pclf:media_configuration",
227        "../../../api/test/pclf:media_quality_test_params",
228        "../../../api/test/pclf:peer_configurer",
229        "../../../api/units:time_delta",
230        "../../../api/units:timestamp",
231        "../../../pc:pc_test_utils",
232        "../../../pc:sdp_utils",
233        "../../../rtc_base",
234        "../../../rtc_base:gunit_helpers",
235        "../../../rtc_base:macromagic",
236        "../../../rtc_base:safe_conversions",
237        "../../../rtc_base:stringutils",
238        "../../../rtc_base:task_queue_for_test",
239        "../../../rtc_base:threading",
240        "../../../rtc_base/synchronization:mutex",
241        "../../../system_wrappers",
242        "../../../system_wrappers:field_trial",
243        "analyzer/video:default_video_quality_analyzer",
244        "analyzer/video:single_process_encoded_image_data_injector",
245        "analyzer/video:video_frame_tracking_id_injector",
246        "analyzer/video:video_quality_analyzer_injection_helper",
247        "analyzer/video:video_quality_metrics_reporter",
248      ]
249      absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
250    }
251
252    peer_connection_e2e_smoke_test_resources = [
253      "../../../resources/pc_quality_smoke_test_alice_source.wav",
254      "../../../resources/pc_quality_smoke_test_bob_source.wav",
255    ]
256    if (is_ios) {
257      bundle_data("peer_connection_e2e_smoke_test_resources_bundle_data") {
258        testonly = true
259        sources = peer_connection_e2e_smoke_test_resources
260        outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
261      }
262    }
263
264    rtc_library("peer_connection_e2e_smoke_test") {
265      testonly = true
266
267      sources = [ "peer_connection_e2e_smoke_test.cc" ]
268      deps = [
269        ":default_audio_quality_analyzer",
270        ":network_quality_metrics_reporter",
271        ":stats_based_network_quality_metrics_reporter",
272        "../../../api:callfactory_api",
273        "../../../api:create_network_emulation_manager",
274        "../../../api:create_peer_connection_quality_test_frame_generator",
275        "../../../api:create_peerconnection_quality_test_fixture",
276        "../../../api:libjingle_peerconnection_api",
277        "../../../api:media_stream_interface",
278        "../../../api:network_emulation_manager_api",
279        "../../../api:peer_connection_quality_test_fixture_api",
280        "../../../api:scoped_refptr",
281        "../../../api:simulated_network_api",
282        "../../../api/audio_codecs:builtin_audio_decoder_factory",
283        "../../../api/audio_codecs:builtin_audio_encoder_factory",
284        "../../../api/test/metrics:global_metrics_logger_and_exporter",
285        "../../../api/test/pclf:media_configuration",
286        "../../../api/test/pclf:media_quality_test_params",
287        "../../../api/test/pclf:peer_configurer",
288        "../../../api/video_codecs:builtin_video_decoder_factory",
289        "../../../api/video_codecs:builtin_video_encoder_factory",
290        "../../../call:simulated_network",
291        "../../../media:rtc_audio_video",
292        "../../../modules/audio_device:audio_device_impl",
293        "../../../p2p:rtc_p2p",
294        "../../../pc:pc_test_utils",
295        "../../../pc:peerconnection_wrapper",
296        "../../../rtc_base",
297        "../../../rtc_base:gunit_helpers",
298        "../../../rtc_base:logging",
299        "../../../rtc_base:rtc_event",
300        "../../../system_wrappers:field_trial",
301        "../../../test:field_trial",
302        "../../../test:fileutils",
303        "../../../test:test_support",
304        "analyzer/video:default_video_quality_analyzer",
305        "analyzer/video:default_video_quality_analyzer_shared",
306      ]
307      data = peer_connection_e2e_smoke_test_resources
308      if (is_mac || is_ios) {
309        deps += [ "../../../modules/video_coding:objc_codec_factory_helper" ]
310      }
311      if (is_ios) {
312        deps += [ ":peer_connection_e2e_smoke_test_resources_bundle_data" ]
313      }
314    }
315
316    rtc_library("peer_connection_quality_test_metric_names_test") {
317      testonly = true
318      sources = [ "peer_connection_quality_test_metric_names_test.cc" ]
319      deps = [
320        ":metric_metadata_keys",
321        ":peerconnection_quality_test",
322        ":stats_based_network_quality_metrics_reporter",
323        "../..:test_support",
324        "../../../api:create_network_emulation_manager",
325        "../../../api:create_peer_connection_quality_test_frame_generator",
326        "../../../api:network_emulation_manager_api",
327        "../../../api:peer_connection_quality_test_fixture_api",
328        "../../../api/test/metrics:metrics_logger",
329        "../../../api/test/metrics:stdout_metrics_exporter",
330        "../../../api/test/pclf:media_configuration",
331        "../../../api/test/pclf:media_quality_test_params",
332        "../../../api/test/pclf:peer_configurer",
333        "../../../api/units:time_delta",
334      ]
335    }
336
337    rtc_library("stats_based_network_quality_metrics_reporter_test") {
338      testonly = true
339      sources = [ "stats_based_network_quality_metrics_reporter_test.cc" ]
340      deps = [
341        ":metric_metadata_keys",
342        ":peerconnection_quality_test",
343        ":stats_based_network_quality_metrics_reporter",
344        "../..:test_support",
345        "../../../api:array_view",
346        "../../../api:create_network_emulation_manager",
347        "../../../api:create_peer_connection_quality_test_frame_generator",
348        "../../../api:network_emulation_manager_api",
349        "../../../api:peer_connection_quality_test_fixture_api",
350        "../../../api/test/metrics:metrics_logger",
351        "../../../api/test/metrics:stdout_metrics_exporter",
352        "../../../api/test/pclf:media_configuration",
353        "../../../api/test/pclf:media_quality_test_params",
354        "../../../api/test/pclf:peer_configurer",
355        "../../../api/units:time_delta",
356      ]
357      absl_deps = [
358        "//third_party/abseil-cpp/absl/strings",
359        "//third_party/abseil-cpp/absl/types:optional",
360      ]
361    }
362
363    rtc_library("peer_connection_quality_test_test") {
364      testonly = true
365      sources = [ "peer_connection_quality_test_test.cc" ]
366      deps = [
367        ":peerconnection_quality_test",
368        "../..:fileutils",
369        "../..:test_support",
370        "../..:video_test_support",
371        "../../../api:create_network_emulation_manager",
372        "../../../api:network_emulation_manager_api",
373        "../../../api:peer_connection_quality_test_fixture_api",
374        "../../../api/test/metrics:global_metrics_logger_and_exporter",
375        "../../../api/test/pclf:media_configuration",
376        "../../../api/test/pclf:media_quality_test_params",
377        "../../../api/test/pclf:peer_configurer",
378        "../../../api/units:time_delta",
379        "../../../rtc_base:timeutils",
380      ]
381    }
382
383    rtc_library("stats_provider") {
384      testonly = true
385      sources = [ "stats_provider.h" ]
386      deps = [ "../../../api:rtc_stats_api" ]
387    }
388
389    rtc_library("stats_poller") {
390      testonly = true
391      sources = [
392        "stats_poller.cc",
393        "stats_poller.h",
394      ]
395      deps = [
396        ":stats_provider",
397        ":test_peer",
398        "../../../api:libjingle_peerconnection_api",
399        "../../../api:rtc_stats_api",
400        "../../../api:stats_observer_interface",
401        "../../../rtc_base:logging",
402        "../../../rtc_base:macromagic",
403        "../../../rtc_base/synchronization:mutex",
404      ]
405    }
406
407    rtc_library("stats_poller_test") {
408      testonly = true
409      sources = [ "stats_poller_test.cc" ]
410      deps = [
411        ":stats_poller",
412        "../..:test_support",
413        "../../../api:rtc_stats_api",
414      ]
415    }
416  }
417
418  rtc_library("analyzer_helper") {
419    sources = [
420      "analyzer_helper.cc",
421      "analyzer_helper.h",
422    ]
423    deps = [
424      "../../../api:sequence_checker",
425      "../../../api:track_id_stream_info_map",
426      "../../../rtc_base:macromagic",
427    ]
428    absl_deps = [
429      "//third_party/abseil-cpp/absl/strings",
430      "//third_party/abseil-cpp/absl/types:optional",
431    ]
432  }
433
434  rtc_library("default_audio_quality_analyzer") {
435    testonly = true
436    sources = [
437      "analyzer/audio/default_audio_quality_analyzer.cc",
438      "analyzer/audio/default_audio_quality_analyzer.h",
439    ]
440
441    deps = [
442      ":metric_metadata_keys",
443      "../..:perf_test",
444      "../../../api:audio_quality_analyzer_api",
445      "../../../api:rtc_stats_api",
446      "../../../api:stats_observer_interface",
447      "../../../api:track_id_stream_info_map",
448      "../../../api/numerics",
449      "../../../api/test/metrics:metric",
450      "../../../api/test/metrics:metrics_logger",
451      "../../../api/units:time_delta",
452      "../../../api/units:timestamp",
453      "../../../rtc_base:checks",
454      "../../../rtc_base:criticalsection",
455      "../../../rtc_base:logging",
456      "../../../rtc_base:rtc_numerics",
457      "../../../rtc_base/synchronization:mutex",
458    ]
459    absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
460  }
461
462  rtc_library("network_quality_metrics_reporter") {
463    testonly = true
464    sources = [
465      "network_quality_metrics_reporter.cc",
466      "network_quality_metrics_reporter.h",
467    ]
468    deps = [
469      "../..:perf_test",
470      "../../../api:network_emulation_manager_api",
471      "../../../api:peer_connection_quality_test_fixture_api",
472      "../../../api:rtc_stats_api",
473      "../../../api:track_id_stream_info_map",
474      "../../../api/test/metrics:metric",
475      "../../../api/test/metrics:metrics_logger",
476      "../../../api/units:data_size",
477      "../../../rtc_base:checks",
478      "../../../rtc_base:criticalsection",
479      "../../../rtc_base:rtc_event",
480      "../../../rtc_base/synchronization:mutex",
481      "../../../system_wrappers:field_trial",
482    ]
483    absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
484  }
485
486  rtc_library("stats_based_network_quality_metrics_reporter") {
487    testonly = true
488    sources = [
489      "stats_based_network_quality_metrics_reporter.cc",
490      "stats_based_network_quality_metrics_reporter.h",
491    ]
492    deps = [
493      ":metric_metadata_keys",
494      "../..:perf_test",
495      "../../../api:array_view",
496      "../../../api:network_emulation_manager_api",
497      "../../../api:peer_connection_quality_test_fixture_api",
498      "../../../api:rtc_stats_api",
499      "../../../api:scoped_refptr",
500      "../../../api:sequence_checker",
501      "../../../api/numerics",
502      "../../../api/test/metrics:metric",
503      "../../../api/test/metrics:metrics_logger",
504      "../../../api/test/network_emulation",
505      "../../../api/units:data_rate",
506      "../../../api/units:data_size",
507      "../../../api/units:timestamp",
508      "../../../rtc_base",
509      "../../../rtc_base:checks",
510      "../../../rtc_base:ip_address",
511      "../../../rtc_base:rtc_event",
512      "../../../rtc_base:stringutils",
513      "../../../rtc_base/synchronization:mutex",
514      "../../../rtc_base/system:no_unique_address",
515      "../../../system_wrappers:field_trial",
516    ]
517    absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
518  }
519
520  rtc_library("cross_media_metrics_reporter") {
521    testonly = true
522    sources = [
523      "cross_media_metrics_reporter.cc",
524      "cross_media_metrics_reporter.h",
525    ]
526    deps = [
527      ":metric_metadata_keys",
528      "../..:perf_test",
529      "../../../api:network_emulation_manager_api",
530      "../../../api:peer_connection_quality_test_fixture_api",
531      "../../../api:rtc_stats_api",
532      "../../../api:track_id_stream_info_map",
533      "../../../api/numerics",
534      "../../../api/test/metrics:metric",
535      "../../../api/test/metrics:metrics_logger",
536      "../../../api/units:timestamp",
537      "../../../rtc_base:checks",
538      "../../../rtc_base:criticalsection",
539      "../../../rtc_base:rtc_event",
540      "../../../rtc_base:rtc_numerics",
541      "../../../rtc_base/synchronization:mutex",
542      "../../../system_wrappers:field_trial",
543    ]
544    absl_deps = [
545      "//third_party/abseil-cpp/absl/strings",
546      "//third_party/abseil-cpp/absl/types:optional",
547    ]
548  }
549
550  rtc_library("sdp_changer") {
551    testonly = true
552    sources = [
553      "sdp/sdp_changer.cc",
554      "sdp/sdp_changer.h",
555    ]
556    deps = [
557      "../../../api:array_view",
558      "../../../api:libjingle_peerconnection_api",
559      "../../../api:rtp_parameters",
560      "../../../api/test/pclf:media_configuration",
561      "../../../media:rtc_media_base",
562      "../../../p2p:rtc_p2p",
563      "../../../pc:sdp_utils",
564      "../../../pc:session_description",
565      "../../../pc:simulcast_description",
566      "../../../rtc_base:stringutils",
567    ]
568    absl_deps = [
569      "//third_party/abseil-cpp/absl/memory",
570      "//third_party/abseil-cpp/absl/strings:strings",
571      "//third_party/abseil-cpp/absl/types:optional",
572    ]
573  }
574}
575