Chromium Media Module unittests
%endif
+%if 0%{?build_rtc_unittests}
+%package rtc_unittests
+Summary: Chromium WebRTC unittests
+Group: Development/UnitTests
+Requires: %{name} = %{version}-%{release}
+%description rtc_unittests
+Chromium WebRTC unittests
+%endif
+
%if 0%{?__enable_gcov}
%package -n webkit2-gcov
Summary: Chromium gcov
v8/test/wasm-js/tests.tar.gz
%endif
+%if 0%{?build_rtc_unittests}
+%global TIZEN_RTC_UT_DIR /usr-ut/tizen_rtc_unittests
+%endif
+
# The tv profile has a different tpk generation policy.
# 2 types(update, upgrade) of tpk can be generated and used simultaneously.
# If tpktype is not defined and tizen version is less than 6.0, upgrade type is generated by default.
%if 0%{?__tizen_product_da}
"tizen_product_da=true" \
%endif
+%if 0%{?build_rtc_unittests}
+ "tizen_rtc_unittests=true" \
+%endif
%if "%{?_with_emulator}" == "1"
"tizen_video_hole=false" \
%endif
%endif
%if 0%{?__build_chrome}
%{__browser_binary_name} \
+%endif
+%if 0%{?build_rtc_unittests}
+ webrtc_test_component \
%endif
efl_webprocess chromium-ewk efl_webview_app mini_browser ubrowser
%endif
+%if 0%{?run_unittests_in_gbs}
+%if 0%{?build_rtc_unittests}
+./run_webrtc_unittests.sh %{OUTPUT_FOLDER}
+%endif
+%endif
+
echo %{version} > "%{OUTPUT_FOLDER}"/version
# Prepare Tizen App Manifest
%{buildroot}%{TIZEN_MEDIA_UT_DIR}%{MEDIA_UT_DATA_DIR}
%endif
+%if 0%{?build_rtc_unittests}
+mkdir -p %{buildroot}%{TIZEN_RTC_UT_DIR}
+install -m 0755 -p -D %{OUTPUT_FOLDER}/call_unittests %{buildroot}%{TIZEN_RTC_UT_DIR}
+install -m 0755 -p -D %{OUTPUT_FOLDER}/modules_unittests %{buildroot}%{TIZEN_RTC_UT_DIR}
+install -m 0755 -p -D %{OUTPUT_FOLDER}/peerconnection_unittests %{buildroot}%{TIZEN_RTC_UT_DIR}
+install -m 0755 -p -D %{OUTPUT_FOLDER}/rtc_pc_unittests %{buildroot}%{TIZEN_RTC_UT_DIR}
+install -m 0755 -p -D %{OUTPUT_FOLDER}/video_unittests %{buildroot}%{TIZEN_RTC_UT_DIR}
+%if %{__use_clang} == 1
+ # FIXME: This will copy 3 identical files under different names.
+ # Use symlink or add dependency to package provideing libatomic.
+ install -m 0644 %{_libdir}/libatomic.so* %{buildroot}%{TIZEN_RTC_UT_DIR}
+%endif
+%endif
+
%if 0%{?build_tizen_ppapi_extension_unittests}
mkdir -p %{buildroot}/opt/usr/utc_exec/
install -m 0755 -p -D %{OUTPUT_FOLDER}/efl_integration_unittests %{buildroot}/opt/usr/utc_exec/
%{TIZEN_V8_UT_DIR}/bin
%{TIZEN_V8_UT_DIR}/v8-test-data.tar.bz2
%endif
+
+%if 0%{?build_rtc_unittests}
+%files rtc_unittests
+%manifest ./packaging/chromium-tizen_rtc_unittests.manifest
+%{TIZEN_RTC_UT_DIR}/call_unittests
+%{TIZEN_RTC_UT_DIR}/modules_unittests
+%{TIZEN_RTC_UT_DIR}/peerconnection_unittests
+%{TIZEN_RTC_UT_DIR}/rtc_pc_unittests
+%{TIZEN_RTC_UT_DIR}/video_unittests
+%if %{__use_clang} == 1
+%{TIZEN_RTC_UT_DIR}/libatomic.so*
+%endif
+%endif
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
\ No newline at end of file
--- /dev/null
+#!/bin/bash -e
+
+OUT_DIR=$1
+
+if [ ! -d $OUT_DIR ]; then
+ echo "ERROR: ${OUT_DIR} doesn't point to valid directory"
+ exit 1
+fi
+
+echo "Running: ${OUT_DIR}/call_unittests"
+${OUT_DIR}/call_unittests
+
+# TODO(vd.wasm) Investigate failures of excluded tests under GBS
+echo "Running: ${OUT_DIR}/modules_unittests"
+${OUT_DIR}/modules_unittests --gtest_filter=-\
+AcmSenderBitExactnessOldApi*:\
+AcmSetBitRateNewApi*:\
+AgcManagerDirectParametrizedTest.DisabledAnalogAgcDoesNotAdaptUpwards*:\
+AgcManagerDirectParametrizedTest.EmptyRmsErrorOverrideHasNoEffect*:\
+AgcManagerDirectParametrizedTest.NonEmptyRmsErrorOverrideHasEffect*:\
+AlignmentMixer*:\
+ApmConfiguration*:\
+ApmTest*:\
+AudioEncoderCngDeathTest*:\
+AudioEncoderCopyRedDeathTest.NullSpeechEncoder*:\
+AudioEncoderOpusTest.OpusDtxFilteringHighEnergyRefreshPackets:\
+BandwidthAdaptationTest.BandwidthAdaptationTest:\
+CngDeathTest*:\
+CngTest*:\
+CommonFormats/AudioProcessingTest*:\
+DebugDumpTest*:\
+DifferentInputLengths*:\
+EchoControlMobileBitExactnessTest*:\
+EchoPathDelayEstimator*:\
+EchoRemover*:\
+ExpandTest*:\
+GainController2.CheckEqualResultFromInjectedVadProbabilityWithAdaptiveDigitalController:\
+GainController2.CheckFinalGainWithAdaptiveDigitalController:\
+GainController2.CheckInjectedVadProbabilityUsedWithAdaptiveDigitalController:\
+InputVolumeControllerParametrizedTest.EmptyRmsErrorHasNoEffect*:\
+InputVolumeControllerTest*:\
+LoudnessHistogramTest.ActiveCircularBuffer:\
+LoudnessHistogramTest.InactiveCircularBuffer:\
+MultiChannel/CoarseFilterUpdateGainOneTwoEightRenderChannels.GainCausesFilterToConverge*:\
+MultiChannel/NetEqStereoTest*:\
+Multistream/OpusTest.OpusCbr*:\
+Multistream/OpusTest.OpusDecodeInit*:\
+Multistream/OpusTest.OpusDecodePlc*:\
+Multistream/OpusTest.OpusDecodeRepacketized*:\
+Multistream/OpusTest.OpusDtx*:\
+Multistream/OpusTest.OpusDurationEstimation*:\
+Multistream/OpusTest.OpusEncodeDecode*:\
+Multistream/OpusTest.OpusSetBandwidth*:\
+NetEqBgnTest.RunTest:\
+NetEqDecoderPlc*:\
+NetEqNoTimeStretchingMode.RunTest:\
+NonDebugMultiChannel/SubtractorMultiChannelUpToEightRender.Convergence*:\
+NonDebugMultiChannel/SubtractorMultiChannelUpToFourRender.NonConvergenceOnUncorrelatedSignals*:\
+PacketBufferTest.FramesAfterClear:\
+Param/AudioEncoderOpusTest.EncodeAtMinBitrate*:\
+Param/AudioEncoderOpusTest.OpusFlagDtxAsNonSpeech*:\
+PitchBasedVadTest.VoicingProbabilityTest:\
+RnnVadTest*:\
+Singlestream/OpusTest.OpusCbr*:\
+Singlestream/OpusTest.OpusDecodeInit*:\
+Singlestream/OpusTest.OpusDecodePlc*:\
+Singlestream/OpusTest.OpusDecodeRepacketized*:\
+Singlestream/OpusTest.OpusDtx*:\
+Singlestream/OpusTest.OpusDurationEstimation*:\
+Singlestream/OpusTest.OpusEncodeDecode*:\
+Singlestream/OpusTest.OpusSetBandwidth*:\
+StandaloneVadTest.ActivityDetection:\
+TimeStretchTest*:\
+TransientDetectorTest.CorrectnessBasedOnFiles:\
+TransientFileUtilsTest*:\
+VoiceActivityDetectorTest.Speech16kHzHasHighVoiceProbabilities:\
+VoiceActivityDetectorTest.Speech32kHzHasHighVoiceProbabilities:\
+WPDTreeTest.CorrectnessBasedOnMatlabFiles:\
+NoiseSuppressor.IdenticalChannelEffects:\
+ReceiveSideCongestionControllerTest.ConvergesToCapacity:\
+ReceiveSideCongestionControllerTest.IsFairToTCP:\
+BandwidthQualityScalerTest.*:\
+GoogCcScenario.*:\
+PccNetworkControllerTest.*:\
+FrameCombinerDeathTest.*:\
+TestAudioDeviceModuleTest.*:\
+TestAudioDeviceTest.*:\
+AudioNetworkAdaptorImplTest.*:\
+TaskQueuePacedSenderTest.*:\
+ScreenshareLayerTest.*:\
+Param/AudioEncoderOpusTest.PacketLossFractionSmoothedOnSetUplinkPacketLossFraction*:\
+Param/AudioEncoderOpusTest.UpdateUplinkBandwidthInAudioNetworkAdaptor*:\
+RtpSenderVideoFrameTransformerDelegateTest.OnTransformedFrameCallsSenderSendVideo:\
+RtpSenderVideoFrameTransformerDelegateTest.ReceiverFrameConvertedToSenderFrame:\
+RtpRtcpImpl2Test.*:\
+ControllerManagerTest.ReorderBeyondMinReordingTimeAndMinDistance:\
+ControllerManagerTest.DebugDumpLoggedWhenCreateFromConfigString:\
+ControllerManagerTest.CreateFromConfigStringAndCheckReordering:\
+_/MatchedFilterTest*:\
+DataChannelIntegrationTest/DataChannelIntegrationTest.*:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.*:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.*
+
+
+# TODO(vd.wasm) Investigate failures of excluded tests under GBS
+echo "Running: ${OUT_DIR}/peerconnection_unittests"
+${OUT_DIR}/peerconnection_unittests --gtest_filter=-\
+PeerConnectionEncodingsIntegrationTest.VP8_FallbackFromSvcResultsInL1T2:\
+PeerConnectionFieldTrialTest.ApplyFakeNetworkConfig:\
+PeerConnectionIntegrationTestUnifiedPlan.RenegotiateManyAudioTransceivers:\
+PeerConnectionIntegrationTestUnifiedPlan.RenegotiateManyVideoTransceiversAndWatchAudioDelay:\
+RTCStatsIntegrationTest.GetStatsFromCaller:\
+RTCStatsIntegrationTest.GetStatsFromCallee:\
+RTCStatsIntegrationTest.GetStatsWithReceiverSelector:\
+RTCStatsIntegrationTest.GetStatsWithSenderSelector:\
+PeerConnectionEncodingsIntegrationTest.VP9_LegacySvcWhenScalabilityModeNotSpecified:\
+PeerConnectionEncodingsIntegrationTest.VP9_StandardSvcWithSingleActiveEncoding:\
+RTCStatsCollectorTest.CachedStatsReports:\
+RTCStatsCollectorTest.MultipleCallbacksWithInvalidatedCacheInBetween:\
+RTCStatsCollectorTest.CertificateStatsCache:\
+RtpSenderReceiverTest.LocalAudioSourceOptionsApplied:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.MediaContinuesFlowingAfterIceRestart/0:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalled/0:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalled/1:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalledOnStop/0:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalledOnStop/1:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalledOnClose/0:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTest.RtcEventLogOutputWriteCalledOnClose/1:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTestWithFakeClock.EndToEndConnectionTimeWithTurnTurnPair/0:\
+PeerConnectionIntegrationTest/PeerConnectionIntegrationTestWithFakeClock.EndToEndConnectionTimeWithTurnTurnPair/1:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.Simulcast/VP9:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.Simulcast/AV1:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastWithRequestedResolution/VP9:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastWithRequestedResolution/AV1:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastScaleDownByNoLongerPowerOfTwo/VP8:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastScaleDownByNoLongerPowerOfTwo/VP9:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastScaleDownByNoLongerPowerOfTwo/AV1:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastEncodingStopWhenRtpEncodingChangeToInactive/VP8:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastEncodingStopWhenRtpEncodingChangeToInactive/VP9:\
+StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.SimulcastEncodingStopWhenRtpEncodingChangeToInactive/AV1:\
+DtmfSenderTest.InsertDtmfWithDefaultCommaDelay
+
+echo "Running: ${OUT_DIR}/rtc_pc_unittests"
+${OUT_DIR}/rtc_pc_unittests
+
+
+echo "Running: ${OUT_DIR}/video_unittests"
+${OUT_DIR}/video_unittests --gtest_filter=-\
+MultiCodecReceiveTest.SingleStreamReceivesVp8H264:\
+MultiCodecReceiveTest.SingleStreamReceivesVp8H264WithTl:\
+MultiCodecReceiveTest.SingleStreamReceivesVp8Vp9H264:\
+MultiCodecReceiveTest.SingleStreamReceivesVp8Vp9H264WithTl:\
+FrameCadenceAdapterTest.*:\
+ZeroHertzLayerQualityConvergenceTest.*:\
+FrameInstrumentationGeneratorTest.FailsWhenCodecIsUnsupported:\
+CodecEndToEndTest.SendsAndReceivesVP9:\
+QualityScalingTest.AdaptsDownAndThenUpWithBalanced:\
+QualityScalingTest.AdaptsDownForHighQp_Vp8:\
+QualityScalingTest.AdaptsDownForLowStartBitrateAndThenUp:\
+QualityScalingTest.AdaptsDownForHighQp_HighestStreamActive_Vp8:\
+QualityScalingTest.AdaptsDownForHighQp_Vp9:\
+SendStatisticsProxyTest.TotalEncodedBytesTargetIncrementsBasedOnFrameRate:\
+SendStatisticsProxyTest.EncodeFrameRateInSubStream:\
+SendStatisticsProxyTest.EncodeFrameRateInSubStreamsVp8Simulcast:\
+SendStatisticsProxyTest.EncodeFrameRateInSubStreamsVp9Svc:\
+TaskQueueFrameDecodeSchedulerTest.FrameYieldedAfterSpecifiedPeriod:\
+TaskQueueFrameDecodeSchedulerTest.NegativeDecodeDelayIsRoundedToZero:\
+VideoReceiveStreamTimeoutTrackerTest.TimeoutAfterInitialPeriod:\
+VideoReceiveStreamTimeoutTrackerTest.TimeoutForDeltaFrame:\
+VideoReceiveStreamTimeoutTrackerTest.TimeoutForKeyframeWhenForced:\
+VideoReceiveStreamTimeoutTrackerTest.TotalTimeoutUsedInCallback:\
+VideoSendStreamImplTest.DoNotRegistersAsBitrateObserverOnStrayEncodedImage:\
+VideoSendStreamImplTest.DisablesPaddingOnPausedEncoder:\
+VideoSendStreamTest.SupportsFlexfecWithNackVp9:\
+VideoStreamEncoderTest.*:\
+VideoStreamEncoderFrameCadenceTest.*:\
+BalancedDegradationTest.*:\
+ReconfigureEncoderTest.*:\
+VideoStreamEncoderFrameCadenceRestrictionTest.*:\
+VideoReceiveStream2Test/VideoReceiveStream2Test.*:\
+ZeroHertzQueueOverloadTest.*:\
+FrameCadenceAdapterSimulcastLayersParamTest.*:\
+AdjustWithHeadroomVariations/EncoderBitrateAdjusterTest.*:\
+PerCodecType/EncoderOvershootDetectorTest.:*\
+VideoStreamBufferController/VideoStreamBufferControllerTest.*:\
+VideoStreamBufferController/LowLatencyVideoStreamBufferControllerTest.*:\
+AlignmentAndScaleFactors/ResolutionAlignmentTest.*:\
+ScalabilityMode/Vp9Test.*:\
+ScalabilityModeOn/Vp9Test.*:\
+VideoSendStreamTest.DoesUtilizeUlpfecForVp8WithNackEnabled:\
+VideoStreamEncoderInitialFrameDropperTest/VideoStreamEncoderInitialFrameDropperTest.*:\
+All/VideoStreamEncoderWithRealEncoderTest.*:\
+PerCodecType/EncoderOvershootDetectorTest.*
# }
import("//build_overrides/build.gni")
+import("//tizen_src/build/config/tizen_features.gni")
declare_args() {
absl_build_tests = build_with_chromium
# banned targets like absl/types:any. A few targets require exceptions.
# TODO(crbug.com/1096380): Consider replacing build_with_chromium with
# is_component_build for a narrower, more accurate condition.
- if (build_with_chromium) {
+ if (build_with_chromium && !tizen_rtc_unittests) {
visibility = [
# Abseil itself.
"//third_party/abseil-cpp/*",
]
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("create_peerconnection_factory") {
visibility = [ "*" ]
allow_poison = [ "environment_construction" ]
]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_source_set("video_quality_test_fixture_api") {
visibility = [ "*" ]
testonly = true
}
if (rtc_include_tests) {
- if (rtc_enable_protobuf && !build_with_chromium) {
+ if (rtc_enable_protobuf && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_library("audioproc_f_api") {
visibility = [ "*" ]
testonly = true
defines = [ "WEBRTC_ENABLE_RTC_EVENT_LOG" ]
deps += [ "../../logging:rtc_event_log_impl" ]
}
+
+ if (tizen_rtc_unittests) {
+ deps += [ "../../logging:rtc_event_log_impl" ]
+ }
}
#include "api/field_trials_view.h"
#include "api/rtc_event_log/rtc_event_log.h"
-#ifdef WEBRTC_ENABLE_RTC_EVENT_LOG
+#if defined(WEBRTC_ENABLE_RTC_EVENT_LOG) || \
+ WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
#include "logging/rtc_event_log/rtc_event_log_impl.h"
#endif
absl::Nonnull<std::unique_ptr<RtcEventLog>> RtcEventLogFactory::Create(
const Environment& env) const {
-#ifndef WEBRTC_ENABLE_RTC_EVENT_LOG
+#if !defined(WEBRTC_ENABLE_RTC_EVENT_LOG) && \
+ !WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
return std::make_unique<RtcEventLogNull>();
#else
if (env.field_trials().IsEnabled("WebRTC-RtcEventLogKillSwitch")) {
}
if (rtc_include_tests) {
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("call_tests") {
testonly = true
"//third_party/abseil-cpp/absl/strings:string_view",
"//third_party/abseil-cpp/absl/types:variant",
]
+
+ if (tizen_rtc_unittests) {
+ # Below test depends on LogSink which is not defined
+ # when building for Tizen.
+ sources -= [ "bitrate_estimator_tests.cc" ]
+ }
}
rtc_library("call_perf_tests") {
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
+
+ if (tizen_rtc_unittests) {
+ rtc_test("call_unittests") {
+ testonly = true
+ deps = [
+ ":call_tests",
+ "../system_wrappers:field_trial_for_tests",
+ "../system_wrappers:metrics_for_tests",
+ "../test:test_main",
+ ]
+ }
+ }
}
# TODO(eladalon): This should be moved, as with the TODO for `rtp_interfaces`.
// stream sent along with a secondary untouched stream. The transport wide
// feedback packets from the secondary stream allows the sending side to
// detect and retreansmit the lost packets from the lossy stream.
-TEST(RtpVideoSenderTest, RetransmitsOnTransportWideLossInfo) {
+TEST(RtpVideoSenderTest, DISABLED_RetransmitsOnTransportWideLossInfo) {
int rtx_packets;
test::Scenario s(test_info_);
test::CallClientConfig call_conf;
sources = [ "include/module_fec_types.h" ]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
modules_tests_resources = [
"../resources/audio_coding/testfile16kHz.pcm",
"../resources/audio_coding/testfile32kHz.pcm",
"video_coding/timing:timing_unittests",
]
+ if (tizen_rtc_unittests) {
+ deps += [
+ "../system_wrappers:field_trial_for_tests",
+ "../system_wrappers:metrics_for_tests",
+ ]
+ }
+
if (rtc_desktop_capture_supported) {
deps += [ "desktop_capture:desktop_capture_unittests" ]
}
deps = [ ":g722" ]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_executable("ilbc_test") {
testonly = true
}
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("test_audio_device_module") {
visibility = [ "*" ]
sources = [
]
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("file_audio_device") {
visibility = [ "*" ]
sources = [
defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
deps += [ ":file_audio_device" ]
# TODO(titovartem): remove after downstream is fixed
]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_library("audio_device_unittests") {
testonly = true
]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
group("audio_processing_tests") {
testonly = true
deps = [
]
}
- if (rtc_enable_protobuf && !build_with_chromium) {
+ if (rtc_enable_protobuf && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_library("audioproc_f_impl") {
testonly = true
configs += [ ":apm_debug_dump" ]
import("../../../../webrtc.gni")
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
group("conversational_speech") {
testonly = true
deps = [ ":conversational_speech_generator" ]
import("../../../../webrtc.gni")
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
group("py_quality_assessment") {
testonly = true
deps = [
}
if (rtc_include_tests) {
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_executable("click_annotate") {
testonly = true
sources = [
]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_library("congestion_controller_unittests") {
testonly = true
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("goog_cc_unittests") {
testonly = true
]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_library("pcc_unittests") {
testonly = true
sources = [
EXPECT_CALL(rtcp_sender, Call);
RtpPacketReceived packet;
packet.set_arrival_time(clock.CurrentTime());
- controller.OnReceivedPacket(packet, MediaType::VIDEO);
+ controller.OnReceivedPacket(clock.CurrentTime(), packet, MediaType::VIDEO);
TimeDelta next_process = controller.MaybeProcess();
clock.AdvanceTime(next_process);
next_process = controller.MaybeProcess();
RtpPacketReceived packet;
packet.set_arrival_time(clock.CurrentTime());
- controller.OnReceivedPacket(packet, MediaType::VIDEO);
+ controller.OnReceivedPacket(clock.CurrentTime(), packet, MediaType::VIDEO);
TimeDelta next_process = controller.MaybeProcess();
clock.AdvanceTime(next_process);
next_process = controller.MaybeProcess();
EXPECT_CALL(rtcp_sender, Call).Times(0);
RtpPacketReceived packet;
packet.set_arrival_time(clock.CurrentTime());
- controller.OnReceivedPacket(packet, MediaType::VIDEO);
+ controller.OnReceivedPacket(clock.CurrentTime(), packet, MediaType::VIDEO);
TimeDelta next_process = controller.MaybeProcess();
clock.AdvanceTime(next_process);
next_process = controller.MaybeProcess();
#include "test/gmock.h"
#include "test/gtest.h"
+#if defined(WEBRTC_TIZEN_TV)
+// This tests runs logic inside RTC_DCHECK* macros, so ensure they are enabled.
+#undef RTC_DCHECK
+#define RTC_DCHECK(condition) RTC_CHECK(condition)
+#endif
+
namespace webrtc {
namespace {
RTC_LOG_IF(LS_INFO, !equal)
<< " Not equal got ssrc: " << a.ssrc << ", seq: " << a.sequence_number
<< " arrival_time_offset: " << a.arrival_time_offset.ms_or(-1)
- << " ecn: " << a.ecn << " expected ssrc:" << b.ssrc
- << ", seq: " << b.sequence_number
+ << " ecn: " <<
+#if defined(WEBRTC_TIZEN_TV)
+ static_cast<int>(a.ecn)
+#else
+ a.ecn
+#endif
+ << " expected ssrc:" << b.ssrc << ", seq: " << b.sequence_number
<< " arrival_time_offset: " << b.arrival_time_offset.ms_or(-1)
- << " ecn: " << b.ecn;
+ << " ecn: " <<
+#if defined(WEBRTC_TIZEN_TV)
+ static_cast<int>(b.ecn);
+#else
+ b.ecn;
+#endif
+
return equal;
}
#include "test/gmock.h"
#include "test/gtest.h"
+#if defined(WEBRTC_TIZEN_TV)
+// This tests runs logic inside RTC_DCHECK* macros, so ensure they are enabled.
+#undef RTC_DCHECK
+#undef RTC_DCHECK_EQ
+#define RTC_DCHECK(condition) RTC_CHECK(condition)
+#define RTC_DCHECK_EQ(v1, v2) RTC_CHECK_EQ(v1, v2)
+#endif
+
namespace webrtc {
namespace {
]
}
-if (!build_with_chromium || is_linux || is_chromeos) {
+if (!build_with_chromium || is_linux || is_chromeos || tizen_rtc_unittests) {
rtc_source_set("video_capture_internal_impl") {
visibility = [ "*" ]
deps = [
"svc:svc_rate_allocator_tests",
"timing:jitter_estimator",
"timing:timing_module",
- "//third_party/abseil-cpp/absl/types:variant",
]
+
+ if (tizen_rtc_unittests) {
+ deps -= [ "../../third_party/libyuv:libyuv" ]
+ deps += [ "//third_party/libyuv" ]
+ }
+
if (rtc_build_libvpx) {
deps += [ rtc_libvpx_dir ]
}
]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
rtc_test("rtc_pc_unittests") {
testonly = true
"//testing/android/native_test:native_test_support",
]
}
+
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "../system_wrappers:metrics",
+ ]
+
+ deps += [
+ "../rtc_base/synchronization:yield_policy",
+ "../system_wrappers:field_trial_for_tests",
+ "../system_wrappers:metrics_for_tests",
+ ]
+ }
}
rtc_library("peerconnection_perf_tests") {
"//third_party/abseil-cpp/absl/strings",
]
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "../system_wrappers:metrics",
+ ]
+
+ deps += [
+ "../rtc_base/synchronization:yield_policy",
+ "../system_wrappers:field_trial_for_tests",
+ "../system_wrappers:metrics_for_tests",
+ ]
+ }
+
if (is_android) {
use_default_launcher = false
deps += [
static const char kVideoTrackId[] = "dummy_video_cam_1";
static const char kAudioTrackId[] = "dummy_microphone_1";
+#if !defined(WEBRTC_TIZEN_TV)
using rtc::scoped_refptr;
+#endif
+
using ::testing::Exactly;
namespace webrtc {
}
rtc::AutoThread main_thread_;
- scoped_refptr<MediaStreamInterface> stream_;
- scoped_refptr<AudioTrackInterface> audio_track_;
- scoped_refptr<VideoTrackInterface> video_track_;
+ rtc::scoped_refptr<MediaStreamInterface> stream_;
+ rtc::scoped_refptr<AudioTrackInterface> audio_track_;
+ rtc::scoped_refptr<VideoTrackInterface> video_track_;
};
TEST_F(MediaStreamTest, GetTrackInfo) {
ASSERT_EQ(1u, stream_->GetAudioTracks().size());
// Verify the video track.
- scoped_refptr<MediaStreamTrackInterface> video_track(
+ rtc::scoped_refptr<MediaStreamTrackInterface> video_track(
stream_->GetVideoTracks()[0]);
EXPECT_EQ(0, video_track->id().compare(kVideoTrackId));
EXPECT_TRUE(video_track->enabled());
EXPECT_TRUE(video_track->enabled());
// Verify the audio track.
- scoped_refptr<MediaStreamTrackInterface> audio_track(
+ rtc::scoped_refptr<MediaStreamTrackInterface> audio_track(
stream_->GetAudioTracks()[0]);
EXPECT_EQ(0, audio_track->id().compare(kAudioTrackId));
EXPECT_TRUE(audio_track->enabled());
}
TEST_F(MediaStreamTest, ChangeVideoTrack) {
- scoped_refptr<VideoTrackInterface> video_track(stream_->GetVideoTracks()[0]);
+ rtc::scoped_refptr<VideoTrackInterface> video_track(
+ stream_->GetVideoTracks()[0]);
ChangeTrack(video_track.get());
}
TEST_F(MediaStreamTest, ChangeAudioTrack) {
- scoped_refptr<AudioTrackInterface> audio_track(stream_->GetAudioTracks()[0]);
+ rtc::scoped_refptr<AudioTrackInterface> audio_track(
+ stream_->GetAudioTracks()[0]);
ChangeTrack(audio_track.get());
}
ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
auto elapsed_time_ms = rtc::TimeMillis() - start_time_ms;
RTC_LOG(LS_INFO) << "Renegotiating took " << elapsed_time_ms << " ms";
+#if defined(WEBRTC_TIZEN_TV)
+ // When run in GBS or on TV board directly it usually takes more than
+ // 1 second. Give it some additional margin in case the build server that
+ // runs the tests is heavy loaded.
+ ASSERT_GT(10000, elapsed_time_ms)
+#else
ASSERT_GT(1000, elapsed_time_ms)
+#endif
<< "Video transceivers: Negotiation took too long after "
<< current_size << " tracks added";
}
auto elapsed_time_ms = rtc::TimeMillis() - start_time_ms;
RTC_LOG(LS_INFO) << "Renegotiating took " << elapsed_time_ms << " ms";
// This is a guard against the test using excessive amounts of time.
+#if defined(WEBRTC_TIZEN_TV)
+ // When run in GBS or on TV board directly it usually takes more than
+ // 5 seconds. Give it some additional margin in case the build server that
+ // runs the tests is heavy loaded.
+ ASSERT_GT(20000, elapsed_time_ms)
+#else
ASSERT_GT(5000, elapsed_time_ms)
+#endif
<< "Video transceivers: Negotiation took too long after "
<< current_size << " tracks added";
caller()->UpdateDelayStats("caller reception", current_size);
cached_report_ = partial_report_;
partial_report_ = nullptr;
transceiver_stats_infos_.clear();
+ // The following trace is required by some tests, so enable it
+ // but only for tests.
+#if WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
// Trace WebRTC Stats when getStats is called on Javascript.
// This allows access to WebRTC stats from trace logs. To enable them,
// select the "webrtc_stats" category when recording traces.
TRACE_EVENT_INSTANT1("webrtc_stats", "webrtc_stats", TRACE_EVENT_SCOPE_GLOBAL,
"report", cached_report_->ToJson());
+#endif // if WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
// Deliver report and clear `requests_`.
std::vector<RequestInfo> requests;
return;
}
cricket::AudioOptions options;
-#if !defined(WEBRTC_CHROMIUM_BUILD) && !defined(WEBRTC_WEBKIT_BUILD)
+ // Needed for unit testing and thus enabled via
+ // WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
+#if (!defined(WEBRTC_CHROMIUM_BUILD) && !defined(WEBRTC_WEBKIT_BUILD)) || \
+ WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
// TODO(tommi): Remove this hack when we move CreateAudioSource out of
// PeerConnection. This is a bit of a strange way to apply local audio
// options since it is also applied to all streams/channels, local or remote.
import("../../../../webrtc.gni")
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
copy("noise_tracks") {
testonly = true
sources = [ "noise_tracks/city.wav" ]
"//test:fileutils",
"//test:test_support",
]
+
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "//rtc_base:checks",
+ "//test:fileutils",
+ "//test:test_support",
+ ]
+
+ deps += [
+ "..:checks",
+ "../../test:fileutils",
+ "../../test:test_support",
+ ]
+ }
}
}
# Only expose the targets needed by Chromium (e.g. frame_analyzer) to avoid
# building a lot of redundant code as part of Chromium builds.
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
rtc_executable("psnr_ssim_analyzer") {
testonly = true
sources = [ "psnr_ssim_analyzer/psnr_ssim_analyzer.cc" ]
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/strings:string_view",
]
+
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "//api/units:time_delta",
+ "//logging:rtc_event_log_parser",
+ "//rtc_base:protobuf_utils",
+ "//rtc_base:safe_conversions",
+ ]
+
+ deps += [
+ "../api/units:time_delta",
+ "../logging:rtc_event_log_parser",
+ "../rtc_base:protobuf_utils",
+ "../rtc_base:safe_conversions",
+ ]
+ }
}
rtc_library("event_log_visualizer_bindings_unittest") {
"//test:fileutils",
"//test:test_support",
]
+
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "//rtc_base:protobuf_utils",
+ "//rtc_base/system:file_wrapper",
+ "//test:fileutils",
+ "//test:test_support",
+ ]
+
+ deps += [
+ "../rtc_base:protobuf_utils",
+ "../rtc_base/system:file_wrapper",
+ "../test:fileutils",
+ "../test:test_support",
+ ]
+ }
}
}
"//third_party/abseil-cpp/absl/flags:usage",
"//third_party/abseil-cpp/absl/strings:strings",
]
+ if (tizen_rtc_unittests) {
+ deps -= [
+ "//api:create_frame_generator",
+ "//api:frame_generator_api",
+ "//api/environment",
+ "//api/environment:environment_factory",
+ "//api/video:builtin_video_bitrate_allocator_factory",
+ "//api/video_codecs:builtin_video_decoder_factory",
+ "//api/video_codecs:builtin_video_encoder_factory",
+ "//api/video_codecs:video_codecs_api",
+ "//common_video:common_video",
+ "//media:media_constants",
+ "//modules/video_coding:video_codec_interface",
+ "//modules/video_coding:video_coding_utility",
+ "//modules/video_coding/codecs/av1:av1_svc_config",
+ "//modules/video_coding/svc:scalability_mode_util",
+ "//rtc_base:logging",
+ "//test:y4m_frame_generator",
+ ]
+
+ deps += [
+ "../api:create_frame_generator",
+ "../api:frame_generator_api",
+ "../api/environment",
+ "../api/environment:environment_factory",
+ "../api/video:builtin_video_bitrate_allocator_factory",
+ "../api/video_codecs:builtin_video_decoder_factory",
+ "../api/video_codecs:builtin_video_encoder_factory",
+ "../api/video_codecs:video_codecs_api",
+ "../common_video:common_video",
+ "../media:media_constants",
+ "../modules/video_coding:video_codec_interface",
+ "../modules/video_coding:video_coding_utility",
+ "../modules/video_coding/codecs/av1:av1_svc_config",
+ "../modules/video_coding/svc:scalability_mode_util",
+ "../rtc_base:logging",
+ "../test:y4m_frame_generator",
+ ]
+ }
}
}
if (rtc_include_tests) {
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
if (rtc_enable_protobuf) {
rtc_executable("event_log_visualizer") {
# TODO(bugs.webrtc.org/14248): Remove once usage of std::tmpnam
]
}
+if (tizen_rtc_unittests) {
+ rtc_library("field_trial_for_tests") {
+ testonly = true
+ visibility = [ "*" ]
+ public = [ "include/field_trial.h" ]
+ sources = [ "source/field_trial.cc" ]
+ deps = [
+ "../rtc_base:checks",
+ "../rtc_base:logging",
+ "../rtc_base:stringutils",
+ ]
+ }
+}
+
rtc_library("metrics") {
visibility = [ "*" ]
public = [ "include/metrics.h" ]
]
}
+if (tizen_rtc_unittests) {
+ rtc_library("metrics_for_tests") {
+ testonly = true
+ visibility = [ "*" ]
+ public = [ "include/metrics.h" ]
+ sources = [ "source/metrics.cc" ]
+ deps = [
+ "../rtc_base:checks",
+ "../rtc_base/synchronization:mutex",
+ ]
+ }
+}
+
rtc_library("denormal_disabler") {
visibility = [ "*" ]
public = [ "include/denormal_disabler.h" ]
]
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
if (is_mac || is_ios) {
rtc_library("video_test_mac") {
testonly = true
}
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("resources_dir_flag") {
testonly = true
visibility = [ "*" ]
]
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("copy_to_file_audio_capturer") {
testonly = true
sources = [
sources = [ "metric_metadata_keys.h" ]
}
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
group("e2e") {
testonly = true
import("../../../../../webrtc.gni")
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
group("video_analyzer") {
testonly = true
import("../../../../../../webrtc.gni")
-if (!build_with_chromium) {
+if (!build_with_chromium || tizen_rtc_unittests) {
group("dvqa") {
testonly = true
]
}
-if (rtc_include_tests && !build_with_chromium) {
+if (rtc_include_tests && (!build_with_chromium || tizen_rtc_unittests)) {
scenario_resources = [
"../../resources/difficult_photo_1850_1110.yuv",
"../../resources/photo_1850_1110.yuv",
// Default to LS_INFO, even for release builds to provide better test
// logging.
+#if !defined(WEBRTC_TIZEN_TV)
if (rtc::LogMessage::GetLogToDebug() > rtc::LS_INFO)
+#endif
rtc::LogMessage::LogToDebug(rtc::LS_INFO);
if (absl::GetFlag(FLAGS_verbose))
rtc::LogMessage::LogToDebug(rtc::LS_VERBOSE);
+#if !defined(WEBRTC_TIZEN_TV)
rtc::LogMessage::SetLogToStderr(absl::GetFlag(FLAGS_logs) ||
absl::GetFlag(FLAGS_verbose));
+#endif
// InitFieldTrialsFromString stores the char*, so the char array must
// outlive the application.
"../test:test_support",
]
}
- if (!build_with_chromium) {
+ if (!build_with_chromium || tizen_rtc_unittests) {
rtc_library("video_quality_test") {
testonly = true
deps += [ "../media:rtc_media_base" ]
}
}
+
+ if (tizen_rtc_unittests) {
+ rtc_test("video_unittests") {
+ testonly = true
+ deps = [
+ ":video_tests",
+ "../rtc_base/synchronization:yield_policy",
+ "../system_wrappers:field_trial_for_tests",
+ "../system_wrappers:metrics_for_tests",
+ "../test:test_main",
+ ]
+ }
+ }
}
default:
RTC_DCHECK_NOTREACHED();
}
+#if defined(WEBRTC_TIZEN_TV)
+ // libaom might be disabled on tizen, so encoder may be null in this case.
+ ASSERT_NE(encoder, nullptr);
+#endif
ConfigureEncoderAndBitrate(codec_type_, std::move(encoder));
}
# will tell the pre-processor to remove the default definition of the
# SystemTimeNanos() which is defined in rtc_base/system_time.cc. In
# that case a new implementation needs to be provided.
- rtc_exclude_system_time = build_with_chromium
+ rtc_exclude_system_time = build_with_chromium && !tizen_rtc_unittests
# Setting this to false will require the API user to pass in their own
# SSLCertificateVerifier to verify the certificates presented from a
# By default, use normal platform audio support or dummy audio, but don't
# use file-based audio playout and record.
- rtc_use_dummy_audio_file_devices = false
+ rtc_use_dummy_audio_file_devices = false || tizen_rtc_unittests
# When set to true, replace the audio output with a sinus tone at 440Hz.
# The ADM will ask for audio data from WebRTC but instead of reading real
# Chromium uses its own IO handling, so the internal ADM is only built for
# standalone WebRTC.
- rtc_include_internal_audio_device = !build_with_chromium
+ rtc_include_internal_audio_device = !build_with_chromium || tizen_rtc_unittests
# Set this to true to enable the avx2 support in webrtc.
# TODO: Make sure that AVX2 works also for non-clang compilers.
# Set this to true to build the unit tests.
# Disabled when building with Chromium or Mozilla.
- rtc_include_tests = !build_with_chromium && !build_with_mozilla
+ rtc_include_tests = (!build_with_chromium && !build_with_mozilla) || tizen_rtc_unittests
# Set this to false to skip building code that also requires X11 extensions
# such as Xdamage, Xfixes.
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
- if (build_with_chromium && defined(deps) && !use_efl) {
+ if (build_with_chromium && defined(deps) && !use_efl && !tizen_rtc_unittests) {
absl_dependencies =
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
if (absl_dependencies != []) {
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
- if (build_with_chromium && defined(deps) && !use_efl) {
+ if (build_with_chromium && defined(deps) && !use_efl && !tizen_rtc_unittests) {
absl_dependencies =
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
if (absl_dependencies != []) {
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
- if (build_with_chromium && defined(deps) && !use_efl) {
+ if (build_with_chromium && defined(deps) && !use_efl && !tizen_rtc_unittests) {
absl_dependencies =
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
if (absl_dependencies != []) {
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
- if (build_with_chromium && defined(deps) && !use_efl) {
+ if (build_with_chromium && defined(deps) && !use_efl && !tizen_rtc_unittests) {
absl_dependencies =
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
if (absl_dependencies != []) {
public_deps = webrtc_public_deps
}
+if (tizen_rtc_unittests) {
+ component("webrtc_test_component") {
+ configs += webrtc_configs
+ public_configs = webrtc_public_configs
+ public_deps = webrtc_public_deps
+ testonly = true
+
+ deps = [
+ "//third_party/webrtc/call:call_unittests",
+ "//third_party/webrtc/modules:modules_unittests",
+ "//third_party/webrtc/pc:peerconnection_unittests",
+ "//third_party/webrtc/pc:rtc_pc_unittests",
+ "//third_party/webrtc/video:video_unittests",
+ ]
+ }
+}
+
source_set("init_webrtc") {
visibility = [ ":*" ]
sources = [
"//third_party/webrtc/api/units:time_delta",
"//third_party/webrtc/rtc_base/system:rtc_export",
]
+ if (tizen_rtc_unittests) {
+ deps += [ "//third_party/webrtc/rtc_base/synchronization:yield_policy" ]
+ }
}
source_set("metronome_like_task_queue_test") {
#include "base/time/time.h"
+#if WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
+#include "rtc_base/synchronization/yield_policy.h"
+#endif
+
namespace rtc {
using base::WaitableEvent;
}
bool Event::Wait(webrtc::TimeDelta give_up_after) {
+#if WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS
+ // Needed by UnitTests.
+ ScopedYieldPolicy::YieldExecution();
+#endif
+
if (give_up_after.IsPlusInfinity()) {
event_.Wait();
return true;
tizen_tv_mch_pcm_use_ppi = false
tizen_tv_mch_pcm_use_tinycompress = false
tizen_tv_video_capture = false
+ tizen_rtc_unittests = false
drm_mapi_aarch_64 = false
tizen_tv_riscv64 = false