Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 # TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330. | 9 # TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330. |
| 10 | 10 |
| 11 import("//build/config/linux/pkg_config.gni") | 11 import("//build/config/linux/pkg_config.gni") |
| 12 import("//build/config/sanitizers/sanitizers.gni") | 12 import("//build/config/sanitizers/sanitizers.gni") |
| 13 import("build/webrtc.gni") | 13 import("build/webrtc.gni") |
| 14 import("//testing/test.gni") | |
| 14 import("//third_party/protobuf/proto_library.gni") | 15 import("//third_party/protobuf/proto_library.gni") |
| 15 | 16 |
| 16 # Contains the defines and includes in common.gypi that are duplicated both as | 17 # Contains the defines and includes in common.gypi that are duplicated both as |
| 17 # target_defaults and direct_dependent_settings. | 18 # target_defaults and direct_dependent_settings. |
| 18 config("common_inherited_config") { | 19 config("common_inherited_config") { |
| 19 defines = [] | 20 defines = [] |
| 20 if (build_with_mozilla) { | 21 if (build_with_mozilla) { |
| 21 defines += [ "WEBRTC_MOZILLA_BUILD" ] | 22 defines += [ "WEBRTC_MOZILLA_BUILD" ] |
| 22 } | 23 } |
| 23 if (build_with_chromium) { | 24 if (build_with_chromium) { |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 if (use_libfuzzer || use_drfuzz) { | 371 if (use_libfuzzer || use_drfuzz) { |
| 371 # This target is only here for gn to discover fuzzer build targets under | 372 # This target is only here for gn to discover fuzzer build targets under |
| 372 # webrtc/test/fuzzers/. | 373 # webrtc/test/fuzzers/. |
| 373 group("webrtc_fuzzers_dummy") { | 374 group("webrtc_fuzzers_dummy") { |
| 374 testonly = true | 375 testonly = true |
| 375 deps = [ | 376 deps = [ |
| 376 "test/fuzzers:webrtc_fuzzer_main", | 377 "test/fuzzers:webrtc_fuzzer_main", |
| 377 ] | 378 ] |
| 378 } | 379 } |
| 379 } | 380 } |
| 381 | |
| 382 # There's no point processing WebRTC standalone tests in a Chromium build. | |
| 383 if (!build_with_chromium) { | |
| 384 config("rtc_unittests_config") { | |
| 385 # GN orders flags on a target before flags from configs. The default config | |
| 386 # adds -Wall, and this flag have to be after -Wall -- so they need to | |
| 387 # come from a config and can"t be on the target directly. | |
|
phoglund
2016/06/03 14:28:56
Nit: ', not "
| |
| 388 if (is_clang) { | |
| 389 cflags = [ | |
| 390 "-Wno-missing-braces", | |
| 391 "-Wno-sign-compare", | |
| 392 "-Wno-unused-const-variable", | |
| 393 ] | |
| 394 } | |
| 395 } | |
| 396 | |
| 397 test("rtc_unittests") { | |
| 398 testonly = true | |
| 399 sources = [ | |
| 400 "base/array_view_unittest.cc", | |
| 401 "base/atomicops_unittest.cc", | |
| 402 "base/autodetectproxy_unittest.cc", | |
| 403 "base/bandwidthsmoother_unittest.cc", | |
| 404 "base/base64_unittest.cc", | |
| 405 "base/basictypes_unittest.cc", | |
| 406 "base/bind_unittest.cc", | |
| 407 "base/bitbuffer_unittest.cc", | |
| 408 "base/buffer_unittest.cc", | |
| 409 "base/bufferqueue_unittest.cc", | |
| 410 "base/bytebuffer_unittest.cc", | |
| 411 "base/byteorder_unittest.cc", | |
| 412 "base/callback_unittest.cc", | |
| 413 "base/copyonwritebuffer_unittest.cc", | |
| 414 "base/crc32_unittest.cc", | |
| 415 "base/criticalsection_unittest.cc", | |
| 416 "base/event_tracer_unittest.cc", | |
| 417 "base/event_unittest.cc", | |
| 418 "base/exp_filter_unittest.cc", | |
| 419 "base/fakeclock.cc", | |
| 420 "base/fakeclock.h", | |
| 421 "base/filerotatingstream_unittest.cc", | |
| 422 "base/fileutils_unittest.cc", | |
| 423 "base/helpers_unittest.cc", | |
| 424 "base/httpbase_unittest.cc", | |
| 425 "base/httpcommon_unittest.cc", | |
| 426 "base/httpserver_unittest.cc", | |
| 427 "base/ipaddress_unittest.cc", | |
| 428 "base/logging_unittest.cc", | |
| 429 "base/md5digest_unittest.cc", | |
| 430 "base/messagedigest_unittest.cc", | |
| 431 "base/messagequeue_unittest.cc", | |
| 432 "base/mod_ops_unittest.cc", | |
| 433 "base/multipart_unittest.cc", | |
| 434 "base/nat_unittest.cc", | |
| 435 "base/network_unittest.cc", | |
| 436 "base/onetimeevent_unittest.cc", | |
| 437 "base/optional_unittest.cc", | |
| 438 "base/optionsfile_unittest.cc", | |
| 439 "base/pathutils_unittest.cc", | |
| 440 "base/platform_thread_unittest.cc", | |
| 441 "base/profiler_unittest.cc", | |
| 442 "base/proxy_unittest.cc", | |
| 443 "base/proxydetect_unittest.cc", | |
| 444 "base/random_unittest.cc", | |
| 445 "base/rate_statistics_unittest.cc", | |
| 446 "base/ratelimiter_unittest.cc", | |
| 447 "base/ratetracker_unittest.cc", | |
| 448 "base/referencecountedsingletonfactory_unittest.cc", | |
| 449 "base/rollingaccumulator_unittest.cc", | |
| 450 "base/rtccertificate_unittest.cc", | |
| 451 "base/rtccertificategenerator_unittest.cc", | |
| 452 "base/scopedptrcollection_unittest.cc", | |
| 453 "base/sha1digest_unittest.cc", | |
| 454 "base/sharedexclusivelock_unittest.cc", | |
| 455 "base/signalthread_unittest.cc", | |
| 456 "base/sigslot_unittest.cc", | |
| 457 "base/sigslottester.h", | |
| 458 "base/sigslottester.h.pump", | |
| 459 "base/stream_unittest.cc", | |
| 460 "base/stringencode_unittest.cc", | |
| 461 "base/stringutils_unittest.cc", | |
| 462 "base/swap_queue_unittest.cc", | |
| 463 | |
| 464 # TODO(ronghuawu): Reenable this test. | |
| 465 # "systeminfo_unittest.cc", | |
| 466 "base/task_queue_unittest.cc", | |
| 467 "base/task_unittest.cc", | |
| 468 "base/testclient_unittest.cc", | |
| 469 "base/thread_checker_unittest.cc", | |
| 470 "base/thread_unittest.cc", | |
| 471 "base/timedelta.h", | |
| 472 "base/timeutils_unittest.cc", | |
| 473 "base/urlencode_unittest.cc", | |
| 474 "base/versionparsing_unittest.cc", | |
| 475 | |
| 476 # TODO(ronghuawu): Reenable this test. | |
| 477 # "windowpicker_unittest.cc", | |
| 478 "p2p/base/dtlstransportchannel_unittest.cc", | |
| 479 "p2p/base/fakeportallocator.h", | |
| 480 "p2p/base/faketransportcontroller.h", | |
| 481 "p2p/base/p2ptransportchannel_unittest.cc", | |
| 482 "p2p/base/port_unittest.cc", | |
| 483 "p2p/base/portallocator_unittest.cc", | |
| 484 "p2p/base/pseudotcp_unittest.cc", | |
| 485 "p2p/base/relayport_unittest.cc", | |
| 486 "p2p/base/relayserver_unittest.cc", | |
| 487 "p2p/base/stun_unittest.cc", | |
| 488 "p2p/base/stunport_unittest.cc", | |
| 489 "p2p/base/stunrequest_unittest.cc", | |
| 490 "p2p/base/stunserver_unittest.cc", | |
| 491 "p2p/base/tcpport_unittest.cc", | |
| 492 "p2p/base/testrelayserver.h", | |
| 493 "p2p/base/teststunserver.h", | |
| 494 "p2p/base/testturnserver.h", | |
| 495 "p2p/base/transport_unittest.cc", | |
| 496 "p2p/base/transportcontroller_unittest.cc", | |
| 497 "p2p/base/transportdescriptionfactory_unittest.cc", | |
| 498 "p2p/base/turnport_unittest.cc", | |
| 499 "p2p/client/basicportallocator_unittest.cc", | |
| 500 "p2p/stunprober/stunprober_unittest.cc", | |
| 501 ] | |
| 502 | |
| 503 if (is_linux) { | |
| 504 sources += [ | |
| 505 "base/latebindingsymboltable_unittest.cc", | |
| 506 | |
| 507 # TODO(ronghuawu): Reenable this test. | |
| 508 # "linux_unittest.cc", | |
| 509 "base/linuxfdwalk_unittest.cc", | |
| 510 ] | |
| 511 } | |
| 512 | |
| 513 if (is_win) { | |
| 514 sources += [ | |
| 515 "base/win32_unittest.cc", | |
| 516 "base/win32regkey_unittest.cc", | |
| 517 "base/win32window_unittest.cc", | |
| 518 "base/win32windowpicker_unittest.cc", | |
| 519 "base/winfirewall_unittest.cc", | |
| 520 ] | |
| 521 } | |
| 522 | |
| 523 if (is_mac) { | |
| 524 sources += [ "base/macutils_unittest.cc" ] | |
| 525 } | |
| 526 | |
| 527 if (is_posix) { | |
| 528 sources += [ | |
| 529 "base/ssladapter_unittest.cc", | |
| 530 "base/sslidentity_unittest.cc", | |
| 531 "base/sslstreamadapter_unittest.cc", | |
| 532 ] | |
| 533 } | |
| 534 if (is_ios || (is_mac && target_cpu != "x86")) { | |
| 535 defines = [ "CARBON_DEPRECATED=YES" ] | |
| 536 } | |
| 537 | |
| 538 if (rtc_use_quic) { | |
| 539 sources += [ | |
| 540 "p2p/quic/quicconnectionhelper_unittest.cc", | |
| 541 "p2p/quic/quicsession_unittest.cc", | |
| 542 "p2p/quic/quictransport_unittest.cc", | |
| 543 "p2p/quic/quictransportchannel_unittest.cc", | |
| 544 "p2p/quic/reliablequicstream_unittest.cc", | |
| 545 ] | |
| 546 } | |
| 547 | |
| 548 configs += [ | |
| 549 ":common_config", | |
| 550 ":rtc_unittests_config", | |
| 551 ] | |
| 552 public_configs = [ ":common_inherited_config" ] | |
| 553 | |
| 554 if (is_clang) { | |
| 555 # Suppress warnings from the Chromium Clang plugin. | |
| 556 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
| 557 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
| 558 } | |
| 559 | |
| 560 deps = [ | |
| 561 "base:rtc_base", | |
| 562 "base:rtc_base_test_utils", | |
| 563 "base:rtc_task_queue", | |
| 564 "p2p:libstunprober", | |
| 565 "p2p:rtc_p2p", | |
| 566 "//testing/gmock", | |
| 567 "//testing/gtest", | |
| 568 ] | |
| 569 | |
| 570 if (is_android) { | |
| 571 deps += [ "//testing/android/native_test:native_test_support" ] | |
| 572 } | |
| 573 } | |
| 574 } | |
| OLD | NEW |