Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 204a56f0f2d37a71d3843b59b30a0fd011b91134
      
https://github.com/WebKit/WebKit/commit/204a56f0f2d37a71d3843b59b30a0fd011b91134
  Author: David Kilzer <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    A Source/ThirdParty/libwebrtc/Configurations/webrtc_unittests.xcconfig
    M Source/ThirdParty/libwebrtc/Source/third_party/json/include/json/json.h
    M Source/ThirdParty/libwebrtc/Source/webrtc/p2p/test/fake_port_allocator.h
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/data_channel_integrationtest.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/peer_connection_integrationtest.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/peer_connection_stability_integrationtest.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector_unittest.cc
    M Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_integrationtest.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtp_sender_receiver_unittest.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/slow_peer_connection_integration_test.cc
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/test/integration_test_helpers.cc
    A Source/ThirdParty/libwebrtc/Source/webrtc/pc/webrtc_unittests_main.cc
    A Source/ThirdParty/libwebrtc/Source/webrtc/pc/webrtc_unittests_stubs.cc
    M Source/ThirdParty/libwebrtc/Source/webrtc/stats/rtc_stats_unittest.cc
    M Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [libwebrtc] Build upstream unit tests using new `Unit Tests` aggregate target
<https://bugs.webkit.org/show_bug.cgi?id=315361>
<rdar://177718372>

Reviewed by Zak Ridouh.

The libwebrtc project historically had no Xcode target compiling its
`*_unittest.cc` files, so any regression tests that were added had no
way to be run.  Add a `webrtc_unittests` target that compiles them, and
wrap it in a `Unit Tests` aggregate target so future per-folder splits
can be aggregated without churning callers' schemes.

Running tests currently requires building with
`ENABLE_LIBFUZZER=YES ENABLE_ADDRESS_SANITIZER=YES`.  The LIBFUZZER flag
nullifies both `EXPORTED_SYMBOLS_FILE` and `WEBRTC_ALLOWABLE_CLIENTS` so
the test binary can link unrestricted against `libwebrtc.dylib` without
per-symbol visibility annotations or changing the allowable-client list.

Add stubs for three upstream sources (`test_audio_device.cc`,
`objc_codec_factory_helper.mm`, `dav1d_decoder.cc`) in a new
`webrtc_unittests_stubs.cc` because their compile-time dependencies
are absent from the WebKit tree: `AudioDeviceModuleImpl` is platform
code not in WebKit's API, the ObjC codec helper requires the iOS-only
`sdk/objc/components/video_codec/` headers, and `dav1d_decoder.cc`
needs the dav1d project from `Source/WebCore/PAL/ThirdParty/dav1d`.

Exclude the upstream test sources that cannot compile or link in the
WebKit tree via `EXCLUDED_SOURCE_FILE_NAMES`, grouped into one variable
per missing dependency and documented in `webrtc_unittests.xcconfig`.
The exclusions matter beyond compilation: without the audio-resource
group the first audio test trips a fatal `Check failed: fp_*` in
`input_audio_file.cc` and aborts the entire binary, taking every
subsequent unrelated test with it.

* Source/ThirdParty/libwebrtc/Configurations/webrtc_unittests.xcconfig: Add.
* Source/ThirdParty/libwebrtc/Source/third_party/json/include/json/json.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/p2p/test/fake_port_allocator.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/data_channel_integrationtest.cc:
* 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/peer_connection_integrationtest.cc:
* 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/peer_connection_stability_integrationtest.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector_unittest.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_integrationtest.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtp_sender_receiver_unittest.cc:
* 
Source/ThirdParty/libwebrtc/Source/webrtc/pc/slow_peer_connection_integration_test.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/test/integration_test_helpers.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/webrtc_unittests_main.cc: Add.
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/webrtc_unittests_stubs.cc: Add.
* Source/ThirdParty/libwebrtc/Source/webrtc/stats/rtc_stats_unittest.cc:
* Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/318020@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to