diff --git a/webrtc/base/autodetectproxy_unittest.cc b/webrtc/base/autodetectproxy_unittest.cc index bc57304c0a..2ae7a6aa25 100644 --- a/webrtc/base/autodetectproxy_unittest.cc +++ b/webrtc/base/autodetectproxy_unittest.cc @@ -12,7 +12,6 @@ #include "webrtc/base/gunit.h" #include "webrtc/base/httpcommon.h" #include "webrtc/base/httpcommon-inl.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/criticalsection_unittest.cc b/webrtc/base/criticalsection_unittest.cc index 85ef20dc40..d6990c0023 100644 --- a/webrtc/base/criticalsection_unittest.cc +++ b/webrtc/base/criticalsection_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/base/scoped_ptr.h" #include "webrtc/base/scopedptrcollection.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/logging_unittest.cc b/webrtc/base/logging_unittest.cc index 3719cde4e9..6047361bf5 100644 --- a/webrtc/base/logging_unittest.cc +++ b/webrtc/base/logging_unittest.cc @@ -14,7 +14,6 @@ #include "webrtc/base/pathutils.h" #include "webrtc/base/stream.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/messagequeue_unittest.cc b/webrtc/base/messagequeue_unittest.cc index 871542df28..78024e0b2d 100644 --- a/webrtc/base/messagequeue_unittest.cc +++ b/webrtc/base/messagequeue_unittest.cc @@ -16,7 +16,6 @@ #include "webrtc/base/thread.h" #include "webrtc/base/timeutils.h" #include "webrtc/base/nullsocketserver.h" -#include "webrtc/test/testsupport/gtest_disable.h" using namespace rtc; diff --git a/webrtc/base/nat_unittest.cc b/webrtc/base/nat_unittest.cc index f8895eb690..8be1be9f05 100644 --- a/webrtc/base/nat_unittest.cc +++ b/webrtc/base/nat_unittest.cc @@ -21,7 +21,6 @@ #include "webrtc/base/testclient.h" #include "webrtc/base/asynctcpsocket.h" #include "webrtc/base/virtualsocketserver.h" -#include "webrtc/test/testsupport/gtest_disable.h" using namespace rtc; diff --git a/webrtc/base/nullsocketserver_unittest.cc b/webrtc/base/nullsocketserver_unittest.cc index 2aa38b490d..4f22c382d8 100644 --- a/webrtc/base/nullsocketserver_unittest.cc +++ b/webrtc/base/nullsocketserver_unittest.cc @@ -10,7 +10,6 @@ #include "webrtc/base/gunit.h" #include "webrtc/base/nullsocketserver.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/physicalsocketserver_unittest.cc b/webrtc/base/physicalsocketserver_unittest.cc index 5ff4859e13..a2fde80b42 100644 --- a/webrtc/base/physicalsocketserver_unittest.cc +++ b/webrtc/base/physicalsocketserver_unittest.cc @@ -18,7 +18,6 @@ #include "webrtc/base/socket_unittest.h" #include "webrtc/base/testutils.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/proxy_unittest.cc b/webrtc/base/proxy_unittest.cc index 03dc154a6f..d8a523fe17 100644 --- a/webrtc/base/proxy_unittest.cc +++ b/webrtc/base/proxy_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/base/testclient.h" #include "webrtc/base/testechoserver.h" #include "webrtc/base/virtualsocketserver.h" -#include "webrtc/test/testsupport/gtest_disable.h" using rtc::Socket; using rtc::Thread; diff --git a/webrtc/base/sharedexclusivelock_unittest.cc b/webrtc/base/sharedexclusivelock_unittest.cc index 2857e00449..9b64ed760a 100644 --- a/webrtc/base/sharedexclusivelock_unittest.cc +++ b/webrtc/base/sharedexclusivelock_unittest.cc @@ -16,7 +16,6 @@ #include "webrtc/base/sharedexclusivelock.h" #include "webrtc/base/thread.h" #include "webrtc/base/timeutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/signalthread_unittest.cc b/webrtc/base/signalthread_unittest.cc index fe6c6023a6..a583aefcb5 100644 --- a/webrtc/base/signalthread_unittest.cc +++ b/webrtc/base/signalthread_unittest.cc @@ -11,7 +11,6 @@ #include "webrtc/base/gunit.h" #include "webrtc/base/signalthread.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" using namespace rtc; diff --git a/webrtc/base/sslstreamadapter_unittest.cc b/webrtc/base/sslstreamadapter_unittest.cc index 72f02e88d2..1ed06c3154 100644 --- a/webrtc/base/sslstreamadapter_unittest.cc +++ b/webrtc/base/sslstreamadapter_unittest.cc @@ -22,7 +22,6 @@ #include "webrtc/base/sslidentity.h" #include "webrtc/base/sslstreamadapter.h" #include "webrtc/base/stream.h" -#include "webrtc/test/testsupport/gtest_disable.h" using ::testing::WithParamInterface; using ::testing::Values; diff --git a/webrtc/base/stream_unittest.cc b/webrtc/base/stream_unittest.cc index 4172a9726c..8cfd052fe5 100644 --- a/webrtc/base/stream_unittest.cc +++ b/webrtc/base/stream_unittest.cc @@ -12,7 +12,6 @@ #include "webrtc/base/gunit.h" #include "webrtc/base/pathutils.h" #include "webrtc/base/stream.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/task_unittest.cc b/webrtc/base/task_unittest.cc index 3508219c9a..7492436a5d 100644 --- a/webrtc/base/task_unittest.cc +++ b/webrtc/base/task_unittest.cc @@ -28,7 +28,6 @@ #include "webrtc/base/taskrunner.h" #include "webrtc/base/thread.h" #include "webrtc/base/timeutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace rtc { diff --git a/webrtc/base/testclient_unittest.cc b/webrtc/base/testclient_unittest.cc index 17bf4e6c46..bdd06b329a 100644 --- a/webrtc/base/testclient_unittest.cc +++ b/webrtc/base/testclient_unittest.cc @@ -14,7 +14,6 @@ #include "webrtc/base/testclient.h" #include "webrtc/base/testechoserver.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" using namespace rtc; diff --git a/webrtc/base/thread_checker_unittest.cc b/webrtc/base/thread_checker_unittest.cc index bcffb523ab..338190093d 100644 --- a/webrtc/base/thread_checker_unittest.cc +++ b/webrtc/base/thread_checker_unittest.cc @@ -15,7 +15,6 @@ #include "webrtc/base/thread.h" #include "webrtc/base/thread_checker.h" #include "webrtc/base/scoped_ptr.h" -#include "webrtc/test/testsupport/gtest_disable.h" // Duplicated from base/threading/thread_checker.h so that we can be // good citizens there and undef the macro. diff --git a/webrtc/base/thread_unittest.cc b/webrtc/base/thread_unittest.cc index a8262982aa..7ed4326724 100644 --- a/webrtc/base/thread_unittest.cc +++ b/webrtc/base/thread_unittest.cc @@ -15,7 +15,6 @@ #include "webrtc/base/physicalsocketserver.h" #include "webrtc/base/socketaddress.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" #if defined(WEBRTC_WIN) #include // NOLINT diff --git a/webrtc/base/virtualsocket_unittest.cc b/webrtc/base/virtualsocket_unittest.cc index 68ad23bd78..2cd2b5e4de 100644 --- a/webrtc/base/virtualsocket_unittest.cc +++ b/webrtc/base/virtualsocket_unittest.cc @@ -22,7 +22,6 @@ #include "webrtc/base/thread.h" #include "webrtc/base/timeutils.h" #include "webrtc/base/virtualsocketserver.h" -#include "webrtc/test/testsupport/gtest_disable.h" using namespace rtc; diff --git a/webrtc/call/rtc_event_log_unittest.cc b/webrtc/call/rtc_event_log_unittest.cc index dd2a2f801c..f590f669a2 100644 --- a/webrtc/call/rtc_event_log_unittest.cc +++ b/webrtc/call/rtc_event_log_unittest.cc @@ -27,7 +27,6 @@ #include "webrtc/system_wrappers/include/clock.h" #include "webrtc/test/test_suite.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" // Files generated at build-time by the protobuf compiler. #ifdef WEBRTC_ANDROID_PLATFORM_BUILD diff --git a/webrtc/common_audio/signal_processing/real_fft_unittest.cc b/webrtc/common_audio/signal_processing/real_fft_unittest.cc index 9bd35cd68b..fa98836b9a 100644 --- a/webrtc/common_audio/signal_processing/real_fft_unittest.cc +++ b/webrtc/common_audio/signal_processing/real_fft_unittest.cc @@ -10,7 +10,6 @@ #include "webrtc/common_audio/signal_processing/include/real_fft.h" #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/typedefs.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/webrtc/common_video/libyuv/scaler_unittest.cc b/webrtc/common_video/libyuv/scaler_unittest.cc index 526e62cb3c..6d026383a2 100644 --- a/webrtc/common_video/libyuv/scaler_unittest.cc +++ b/webrtc/common_video/libyuv/scaler_unittest.cc @@ -15,7 +15,6 @@ #include "webrtc/common_video/libyuv/include/scaler.h" #include "webrtc/system_wrappers/include/tick_util.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -115,7 +114,12 @@ TEST_F(TestScaler, ScaleSendingBufferTooSmall) { } // TODO(mikhal): Converge the test into one function that accepts the method. -TEST_F(TestScaler, DISABLED_ON_ANDROID(PointScaleTest)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_PointScaleTest DISABLED_PointScaleTest +#else +#define MAYBE_PointScaleTest PointScaleTest +#endif +TEST_F(TestScaler, MAYBE_PointScaleTest) { double avg_psnr; FILE* source_file2; ScaleMethod method = kScalePoint; @@ -182,7 +186,12 @@ TEST_F(TestScaler, DISABLED_ON_ANDROID(PointScaleTest)) { ASSERT_EQ(0, fclose(source_file2)); } -TEST_F(TestScaler, DISABLED_ON_ANDROID(BiLinearScaleTest)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_BilinearScaleTest DISABLED_BiLinearScaleTest +#else +#define MAYBE_BilinearScaleTest BiLinearScaleTest +#endif +TEST_F(TestScaler, MAYBE_BiLinearScaleTest) { double avg_psnr; FILE* source_file2; ScaleMethod method = kScaleBilinear; @@ -234,7 +243,12 @@ TEST_F(TestScaler, DISABLED_ON_ANDROID(BiLinearScaleTest)) { 400, 300); } -TEST_F(TestScaler, DISABLED_ON_ANDROID(BoxScaleTest)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_BoxScaleTest DISABLED_BoxScaleTest +#else +#define MAYBE_BoxScaleTest BoxScaleTest +#endif +TEST_F(TestScaler, MAYBE_BoxScaleTest) { double avg_psnr; FILE* source_file2; ScaleMethod method = kScaleBox; diff --git a/webrtc/libjingle/xmllite/xmlelement_unittest.cc b/webrtc/libjingle/xmllite/xmlelement_unittest.cc index 257899aba1..df8faedbf0 100644 --- a/webrtc/libjingle/xmllite/xmlelement_unittest.cc +++ b/webrtc/libjingle/xmllite/xmlelement_unittest.cc @@ -15,7 +15,6 @@ #include "webrtc/base/common.h" #include "webrtc/base/gunit.h" #include "webrtc/base/thread.h" -#include "webrtc/test/testsupport/gtest_disable.h" using buzz::QName; using buzz::XmlAttr; diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc index a7dd3d4484..24ecc694ff 100644 --- a/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc +++ b/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc @@ -20,7 +20,6 @@ #include "webrtc/system_wrappers/include/clock.h" #include "webrtc/test/test_suite.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -164,7 +163,12 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback, FrameType last_frame_type_; }; -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecGetCodec)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_AddCodecGetCodec DISABLED_AddCodecGetCodec +#else +#define MAYBE_AddCodecGetCodec AddCodecGetCodec +#endif +TEST_F(AcmReceiverTestOldApi, MAYBE_AddCodecGetCodec) { // Add codec. for (size_t n = 0; n < codecs_.size(); ++n) { if (n & 0x1) // Just add codecs with odd index. @@ -188,7 +192,12 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecGetCodec)) { } } -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecChangePayloadType)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_AddCodecChangePayloadType DISABLED_AddCodecChangePayloadType +#else +#define MAYBE_AddCodecChangePayloadType AddCodecChangePayloadType +#endif +TEST_F(AcmReceiverTestOldApi, MAYBE_AddCodecChangePayloadType) { const CodecIdInst codec1(RentACodec::CodecId::kPCMA); CodecInst codec2 = codec1.inst; ++codec2.pltype; @@ -209,7 +218,12 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecChangePayloadType)) { EXPECT_EQ(true, CodecsEqual(codec2, test_codec)); } -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecChangeCodecId)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_AddCodecChangeCodecId DISABLED_AddCodecChangeCodecId +#else +#define MAYBE_AddCodecChangeCodecId AddCodecChangeCodecId +#endif +TEST_F(AcmReceiverTestOldApi, AddCodecChangeCodecId) { const CodecIdInst codec1(RentACodec::CodecId::kPCMU); CodecIdInst codec2(RentACodec::CodecId::kPCMA); codec2.inst.pltype = codec1.inst.pltype; @@ -229,7 +243,12 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecChangeCodecId)) { EXPECT_EQ(true, CodecsEqual(codec2.inst, test_codec)); } -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecRemoveCodec)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_AddCodecRemoveCodec DISABLED_AddCodecRemoveCodec +#else +#define MAYBE_AddCodecRemoveCodec AddCodecRemoveCodec +#endif +TEST_F(AcmReceiverTestOldApi, MAYBE_AddCodecRemoveCodec) { const CodecIdInst codec(RentACodec::CodecId::kPCMA); const int payload_type = codec.inst.pltype; EXPECT_EQ( @@ -247,7 +266,12 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(AddCodecRemoveCodec)) { EXPECT_EQ(-1, receiver_->DecoderByPayloadType(payload_type, &ci)); } -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(SampleRate)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_SampleRate DISABLED_SampleRate +#else +#define MAYBE_SampleRate SampleRate +#endif +TEST_F(AcmReceiverTestOldApi, MAYBE_SampleRate) { const RentACodec::CodecId kCodecId[] = {RentACodec::CodecId::kISAC, RentACodec::CodecId::kISACSWB}; AddSetOfCodecs(kCodecId); @@ -265,7 +289,12 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(SampleRate)) { } } -TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(PostdecodingVad)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_PostdecodingVad DISABLED_PostdecodingVad +#else +#define MAYBE_PostdecodingVad PostdecodingVad +#endif +TEST_F(AcmReceiverTestOldApi, MAYBE_PostdecodingVad) { receiver_->EnableVad(); EXPECT_TRUE(receiver_->vad_enabled()); const CodecIdInst codec(RentACodec::CodecId::kPCM16Bwb); @@ -293,14 +322,13 @@ TEST_F(AcmReceiverTestOldApi, DISABLED_ON_ANDROID(PostdecodingVad)) { EXPECT_EQ(AudioFrame::kVadUnknown, frame.vad_activity_); } -#ifdef WEBRTC_CODEC_ISAC -#define IF_ISAC_FLOAT(x) x +#if defined(WEBRTC_ANDROID) +#define MAYBE_LastAudioCodec DISABLED_LastAudioCodec #else -#define IF_ISAC_FLOAT(x) DISABLED_##x +#define MAYBE_LastAudioCodec LastAudioCodec #endif - -TEST_F(AcmReceiverTestOldApi, - DISABLED_ON_ANDROID(IF_ISAC_FLOAT(LastAudioCodec))) { +#if defined(WEBRTC_CODEC_ISAC) +TEST_F(AcmReceiverTestOldApi, MAYBE_LastAudioCodec) { const RentACodec::CodecId kCodecId[] = { RentACodec::CodecId::kISAC, RentACodec::CodecId::kPCMA, RentACodec::CodecId::kISACSWB, RentACodec::CodecId::kPCM16Bswb32kHz}; @@ -363,6 +391,7 @@ TEST_F(AcmReceiverTestOldApi, EXPECT_TRUE(CodecsEqual(c.inst, codec)); } } +#endif } // namespace acm2 diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc index 8de6c9100d..ef48a48d94 100644 --- a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc +++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc @@ -41,7 +41,6 @@ #include "webrtc/system_wrappers/include/event_wrapper.h" #include "webrtc/system_wrappers/include/sleep.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" using ::testing::AtLeast; using ::testing::Invoke; @@ -238,7 +237,12 @@ class AudioCodingModuleTestOldApi : public ::testing::Test { // Check if the statistics are initialized correctly. Before any call to ACM // all fields have to be zero. -TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_InitializedToZero DISABLED_InitializedToZero +#else +#define MAYBE_InitializedToZero InitializedToZero +#endif +TEST_F(AudioCodingModuleTestOldApi, MAYBE_InitializedToZero) { RegisterCodec(); AudioDecodingCallStats stats; acm_->GetDecodingCallStatistics(&stats); @@ -253,7 +257,12 @@ TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) { // Insert some packets and pull audio. Check statistics are valid. Then, // simulate packet loss and check if PLC and PLC-to-CNG statistics are // correctly updated. -TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_NetEqCalls DISABLED_NetEqCalls +#else +#define MAYBE_NetEqCalls NetEqCalls +#endif +TEST_F(AudioCodingModuleTestOldApi, MAYBE_NetEqCalls) { RegisterCodec(); AudioDecodingCallStats stats; const int kNumNormalCalls = 10; @@ -320,15 +329,9 @@ TEST_F(AudioCodingModuleTestOldApi, TransportCallbackIsInvokedForEachPacket) { } #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) -#define IF_ISAC(x) x -#else -#define IF_ISAC(x) DISABLED_##x -#endif - // Verifies that the RTP timestamp series is not reset when the codec is // changed. -TEST_F(AudioCodingModuleTestOldApi, - IF_ISAC(TimestampSeriesContinuesWhenCodecChanges)) { +TEST_F(AudioCodingModuleTestOldApi, TimestampSeriesContinuesWhenCodecChanges) { RegisterCodec(); // This registers the default codec. uint32_t expected_ts = input_frame_.timestamp_; int blocks_per_packet = codec_.pacsize / (kSampleRateHz / 100); @@ -360,6 +363,7 @@ TEST_F(AudioCodingModuleTestOldApi, expected_ts += codec_.pacsize; } } +#endif // Introduce this class to set different expectations on the number of encoded // bytes. This class expects all encoded packets to be 9 bytes (matching one @@ -582,7 +586,12 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi { rtc::scoped_ptr fake_clock_; }; -TEST_F(AudioCodingModuleMtTestOldApi, DISABLED_ON_IOS(DoTest)) { +#if defined(WEBRTC_IOS) +#define MAYBE_DoTest DISABLED_DoTest +#else +#define MAYBE_DoTest DoTest +#endif +TEST_F(AudioCodingModuleMtTestOldApi, MAYBE_DoTest) { EXPECT_EQ(kEventSignaled, RunTest()); } @@ -686,9 +695,16 @@ class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi { test::AudioLoop audio_loop_; }; -TEST_F(AcmIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { +#if defined(WEBRTC_IOS) +#define MAYBE_DoTest DISABLED_DoTest +#else +#define MAYBE_DoTest DoTest +#endif +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +TEST_F(AcmIsacMtTestOldApi, MAYBE_DoTest) { EXPECT_EQ(kEventSignaled, RunTest()); } +#endif class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi { protected: @@ -838,9 +854,16 @@ class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi { test::AudioLoop audio_loop_; }; -TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { +#if defined(WEBRTC_IOS) +#define MAYBE_DoTest DISABLED_DoTest +#else +#define MAYBE_DoTest DoTest +#endif +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +TEST_F(AcmReRegisterIsacMtTestOldApi, MAYBE_DoTest) { EXPECT_EQ(kEventSignaled, RunTest()); } +#endif // Disabling all of these tests on iOS until file support has been added. // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details. @@ -919,12 +942,7 @@ class AcmReceiverBitExactnessOldApi : public ::testing::Test { #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) -#define IF_ALL_CODECS(x) x -#else -#define IF_ALL_CODECS(x) DISABLED_##x -#endif - -TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(8kHzOutput)) { +TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { Run(8000, PlatformChecksum("908002dc01fc4eb1d2be24eb1d3f354b", "dcee98c623b147ebe1b40dd30efa896e", "adc92e173f908f93b96ba5844209815a", @@ -932,7 +950,7 @@ TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(8kHzOutput)) { std::vector()); } -TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(16kHzOutput)) { +TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { Run(16000, PlatformChecksum("a909560b5ca49fa472b17b7b277195e9", "f790e7a8cce4e2c8b7bb5e0e4c5dac0d", "8cffa6abcb3e18e33b9d857666dff66a", @@ -940,7 +958,7 @@ TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(16kHzOutput)) { std::vector()); } -TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(32kHzOutput)) { +TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { Run(32000, PlatformChecksum("441aab4b347fb3db4e9244337aca8d8e", "306e0d990ee6e92de3fbecc0123ece37", "3e126fe894720c3f85edadcc91964ba5", @@ -948,7 +966,7 @@ TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(32kHzOutput)) { std::vector()); } -TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(48kHzOutput)) { +TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { Run(48000, PlatformChecksum("4ee2730fa1daae755e8a8fd3abd779ec", "aa7c232f63a67b2a72703593bdd172e0", "0155665e93067c4e89256b944dd11999", @@ -956,8 +974,7 @@ TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(48kHzOutput)) { std::vector()); } -TEST_F(AcmReceiverBitExactnessOldApi, - IF_ALL_CODECS(48kHzOutputExternalDecoder)) { +TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { // Class intended to forward a call from a mock DecodeInternal to Decode on // the real decoder's Decode. DecodeInternal for the real decoder isn't // public. @@ -1016,6 +1033,7 @@ TEST_F(AcmReceiverBitExactnessOldApi, EXPECT_CALL(mock_decoder, Die()); } +#endif // This test verifies bit exactness for the send-side of ACM. The test setup is // a chain of three different test classes: @@ -1194,7 +1212,8 @@ class AcmSenderBitExactnessOldApi : public ::testing::Test, rtc::Md5Digest payload_checksum_; }; -TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) { +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "0b58f9eeee43d5891f5f6c75e77984a3", @@ -1209,7 +1228,7 @@ TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) { 33, test::AcmReceiveTestOldApi::kMonoOutput); } -TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) { +TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "1ad29139a04782a33daad8c2b9b35875", @@ -1223,15 +1242,15 @@ TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) { "9e0a0ab743ad987b55b8e14802769c56"), 16, test::AcmReceiveTestOldApi::kMonoOutput); } - -#ifdef WEBRTC_CODEC_ISAC -#define IF_ISAC_FLOAT(x) x -#else -#define IF_ISAC_FLOAT(x) DISABLED_##x #endif -TEST_F(AcmSenderBitExactnessOldApi, - DISABLED_ON_ANDROID(IF_ISAC_FLOAT(IsacSwb30ms))) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_IsacSwb30ms DISABLED_IsacSwb30ms +#else +#define MAYBE_IsacSwb30ms IsacSwb30ms +#endif +#if defined(WEBRTC_CODEC_ISAC) +TEST_F(AcmSenderBitExactnessOldApi, MAYBE_IsacSwb30ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "5683b58da0fbf2063c7adc2e6bfb3fb8", @@ -1243,6 +1262,7 @@ TEST_F(AcmSenderBitExactnessOldApi, "android_arm64_payload"), 33, test::AcmReceiveTestOldApi::kMonoOutput); } +#endif TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80)); @@ -1324,13 +1344,13 @@ TEST_F(AcmSenderBitExactnessOldApi, Pcma_stereo_20ms) { test::AcmReceiveTestOldApi::kStereoOutput); } -#ifdef WEBRTC_CODEC_ILBC -#define IF_ILBC(x) x +#if defined(WEBRTC_ANDROID) +#define MAYBE_Ilbc_30ms DISABLED_Ilbc_30ms #else -#define IF_ILBC(x) DISABLED_##x +#define MAYBE_Ilbc_30ms Ilbc_30ms #endif - -TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) { +#if defined(WEBRTC_CODEC_ILBC) +TEST_F(AcmSenderBitExactnessOldApi, MAYBE_Ilbc_30ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "7b6ec10910debd9af08011d3ed5249f7", @@ -1342,14 +1362,15 @@ TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) { "android_arm64_payload"), 33, test::AcmReceiveTestOldApi::kMonoOutput); } - -#ifdef WEBRTC_CODEC_G722 -#define IF_G722(x) x -#else -#define IF_G722(x) DISABLED_##x #endif -TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_G722_20ms DISABLED_G722_20ms +#else +#define MAYBE_G722_20ms G722_20ms +#endif +#if defined(WEBRTC_CODEC_G722) +TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_20ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "7d759436f2533582950d148b5161a36c", @@ -1361,9 +1382,15 @@ TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) { "android_arm64_payload"), 50, test::AcmReceiveTestOldApi::kMonoOutput); } +#endif -TEST_F(AcmSenderBitExactnessOldApi, - DISABLED_ON_ANDROID(IF_G722(G722_stereo_20ms))) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_G722_stereo_20ms DISABLED_G722_stereo_20ms +#else +#define MAYBE_G722_stereo_20ms G722_stereo_20ms +#endif +#if defined(WEBRTC_CODEC_G722) +TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160)); Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( "7190ee718ab3d80eca181e5f7140c210", @@ -1375,6 +1402,7 @@ TEST_F(AcmSenderBitExactnessOldApi, "android_arm64_payload"), 50, test::AcmReceiveTestOldApi::kStereoOutput); } +#endif TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) { ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); @@ -1490,7 +1518,12 @@ TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_50kbps) { // The result on the Android platforms is inconsistent for this test case. // On android_rel the result is different from android and android arm64 rel. -TEST_F(AcmSetBitRateOldApi, DISABLED_ON_ANDROID(Opus_48khz_20ms_100kbps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_Opus_48khz_20ms_100kbps DISABLED_Opus_48khz_20ms_100kbps +#else +#define MAYBE_Opus_48khz_20ms_100kbps Opus_48khz_20ms_100kbps +#endif +TEST_F(AcmSetBitRateOldApi, MAYBE_Opus_48khz_20ms_100kbps) { ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); Run(100000, 100888); } diff --git a/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc b/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc index f41a17ae3a..85aaef1143 100644 --- a/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc @@ -19,7 +19,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { diff --git a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc index e02e92dd8f..1ddc7f2edf 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc @@ -21,7 +21,6 @@ #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h" #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -276,7 +275,12 @@ class NetEqStereoTestNoJitter : public NetEqStereoTest { } }; -TEST_P(NetEqStereoTestNoJitter, DISABLED_ON_ANDROID(RunTest)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_RunTest DISABLED_RunTest +#else +#define MAYBE_RunTest RunTest +#endif +TEST_P(NetEqStereoTestNoJitter, MAYBE_RunTest) { RunTest(8); } @@ -301,7 +305,7 @@ class NetEqStereoTestPositiveDrift : public NetEqStereoTest { double drift_factor; }; -TEST_P(NetEqStereoTestPositiveDrift, DISABLED_ON_ANDROID(RunTest)) { +TEST_P(NetEqStereoTestPositiveDrift, MAYBE_RunTest) { RunTest(100); } @@ -314,7 +318,7 @@ class NetEqStereoTestNegativeDrift : public NetEqStereoTestPositiveDrift { } }; -TEST_P(NetEqStereoTestNegativeDrift, DISABLED_ON_ANDROID(RunTest)) { +TEST_P(NetEqStereoTestNegativeDrift, MAYBE_RunTest) { RunTest(100); } @@ -342,7 +346,7 @@ class NetEqStereoTestDelays : public NetEqStereoTest { int frame_index_; }; -TEST_P(NetEqStereoTestDelays, DISABLED_ON_ANDROID(RunTest)) { +TEST_P(NetEqStereoTestDelays, MAYBE_RunTest) { RunTest(1000); } @@ -361,7 +365,10 @@ class NetEqStereoTestLosses : public NetEqStereoTest { int frame_index_; }; -TEST_P(NetEqStereoTestLosses, DISABLED_ON_ANDROID(RunTest)) { +// TODO(pbos): Enable on non-Android, this went failing while being accidentally +// disabled on all platforms and not just Android. +// https://bugs.chromium.org/p/webrtc/issues/detail?id=5387 +TEST_P(NetEqStereoTestLosses, DISABLED_RunTest) { RunTest(100); } diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc index b3d6d8c7a7..a6b9388f6c 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc @@ -30,7 +30,6 @@ #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/typedefs.h" #ifdef WEBRTC_NETEQ_UNITTEST_BITEXACT @@ -930,13 +929,13 @@ TEST_F(NetEqDecodingTest, UnknownPayloadType) { EXPECT_EQ(NetEq::kUnknownRtpPayloadType, neteq_->LastError()); } -#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) -#define IF_ISAC(x) x +#if defined(WEBRTC_ANDROID) +#define MAYBE_DecoderError DISABLED_DecoderError #else -#define IF_ISAC(x) DISABLED_##x +#define MAYBE_DecoderError DecoderError #endif - -TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(IF_ISAC(DecoderError))) { +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +TEST_F(NetEqDecodingTest, MAYBE_DecoderError) { const size_t kPayloadBytes = 100; uint8_t payload[kPayloadBytes] = {0}; WebRtcRTPHeader rtp_info; @@ -974,6 +973,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(IF_ISAC(DecoderError))) { EXPECT_EQ(1, out_data_[i]); } } +#endif TEST_F(NetEqDecodingTest, GetAudioBeforeInsertPacket) { NetEqOutputType type; @@ -1171,7 +1171,8 @@ TEST_F(NetEqBgnTestFade, RunTest) { CheckBgn(32000); } -TEST_F(NetEqDecodingTest, IF_ISAC(SyncPacketInsert)) { +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +TEST_F(NetEqDecodingTest, SyncPacketInsert) { WebRtcRTPHeader rtp_info; uint32_t receive_timestamp = 0; // For the readability use the following payloads instead of the defaults of @@ -1250,6 +1251,7 @@ TEST_F(NetEqDecodingTest, IF_ISAC(SyncPacketInsert)) { --rtp_info.header.ssrc; EXPECT_EQ(0, neteq_->InsertSyncPacket(rtp_info, receive_timestamp)); } +#endif // First insert several noise like packets, then sync-packets. Decoding all // packets should not produce error, statistics should not show any packet loss diff --git a/webrtc/modules/audio_coding/test/Tester.cc b/webrtc/modules/audio_coding/test/Tester.cc index 3ff3dd8cd4..a27f0bc58b 100644 --- a/webrtc/modules/audio_coding/test/Tester.cc +++ b/webrtc/modules/audio_coding/test/Tester.cc @@ -26,7 +26,6 @@ #include "webrtc/modules/audio_coding/test/TwoWayCommunication.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" using webrtc::Trace; @@ -42,7 +41,11 @@ TEST(AudioCodingModuleTest, TestAllCodecs) { Trace::ReturnTrace(); } -TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestEncodeDecode)) { +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TestEncodeDecode) { +#else +TEST(AudioCodingModuleTest, TestEncodeDecode) { +#endif Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_encodedecode_trace.txt").c_str()); @@ -50,51 +53,54 @@ TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestEncodeDecode)) { Trace::ReturnTrace(); } -#ifdef WEBRTC_CODEC_RED -#define IF_RED(x) x +#if defined(WEBRTC_CODEC_RED) +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TestRedFec) { #else -#define IF_RED(x) DISABLED_##x +TEST(AudioCodingModuleTest, TestRedFec) { #endif - -TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(IF_RED(TestRedFec))) { Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_fec_trace.txt").c_str()); webrtc::TestRedFec().Perform(); Trace::ReturnTrace(); } - -#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) -#define IF_ISAC(x) x -#else -#define IF_ISAC(x) DISABLED_##x #endif -TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(IF_ISAC(TestIsac))) { +#if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TestIsac) { +#else +TEST(AudioCodingModuleTest, TestIsac) { +#endif Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_isac_trace.txt").c_str()); webrtc::ISACTest(ACM_TEST_MODE).Perform(); Trace::ReturnTrace(); } +#endif #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) -#define IF_ALL_CODECS(x) x +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TwoWayCommunication) { #else -#define IF_ALL_CODECS(x) DISABLED_##x +TEST(AudioCodingModuleTest, TwoWayCommunication) { #endif - -TEST(AudioCodingModuleTest, - DISABLED_ON_ANDROID(IF_ALL_CODECS(TwoWayCommunication))) { Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_twowaycom_trace.txt").c_str()); webrtc::TwoWayCommunication(ACM_TEST_MODE).Perform(); Trace::ReturnTrace(); } +#endif -TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestStereo)) { +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TestStereo) { +#else +TEST(AudioCodingModuleTest, TestStereo) { +#endif Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_stereo_trace.txt").c_str()); @@ -102,7 +108,11 @@ TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestStereo)) { Trace::ReturnTrace(); } -TEST(AudioCodingModuleTest, DISABLED_ON_ANDROID(TestWebRtcVadDtx)) { +#if defined(WEBRTC_ANDROID) +TEST(AudioCodingModuleTest, DISABLED_TestWebRtcVadDtx) { +#else +TEST(AudioCodingModuleTest, TestWebRtcVadDtx) { +#endif Trace::CreateTrace(); Trace::SetTraceFile((webrtc::test::OutputPath() + "acm_vaddtx_trace.txt").c_str()); diff --git a/webrtc/modules/audio_coding/test/target_delay_unittest.cc b/webrtc/modules/audio_coding/test/target_delay_unittest.cc index d7c0411c92..97471bb566 100644 --- a/webrtc/modules/audio_coding/test/target_delay_unittest.cc +++ b/webrtc/modules/audio_coding/test/target_delay_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/modules/include/module_common_types.h" #include "webrtc/system_wrappers/include/sleep.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -199,23 +198,50 @@ class TargetDelayTest : public ::testing::Test { uint8_t payload_[kPayloadLenBytes]; }; -TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(OutOfRangeInput)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_OutOfRangeInput DISABLED_OutOfRangeInput +#else +#define MAYBE_OutOfRangeInput OutOfRangeInput +#endif +TEST_F(TargetDelayTest, MAYBE_OutOfRangeInput) { OutOfRangeInput(); } -TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(NoTargetDelayBufferSizeChanges)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_NoTargetDelayBufferSizeChanges \ + DISABLED_NoTargetDelayBufferSizeChanges +#else +#define MAYBE_NoTargetDelayBufferSizeChanges NoTargetDelayBufferSizeChanges +#endif +TEST_F(TargetDelayTest, MAYBE_NoTargetDelayBufferSizeChanges) { NoTargetDelayBufferSizeChanges(); } -TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(WithTargetDelayBufferNotChanging)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_WithTargetDelayBufferNotChanging \ + DISABLED_WithTargetDelayBufferNotChanging +#else +#define MAYBE_WithTargetDelayBufferNotChanging WithTargetDelayBufferNotChanging +#endif +TEST_F(TargetDelayTest, MAYBE_WithTargetDelayBufferNotChanging) { WithTargetDelayBufferNotChanging(); } -TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(RequiredDelayAtCorrectRange)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_RequiredDelayAtCorrectRange DISABLED_RequiredDelayAtCorrectRange +#else +#define MAYBE_RequiredDelayAtCorrectRange RequiredDelayAtCorrectRange +#endif +TEST_F(TargetDelayTest, MAYBE_RequiredDelayAtCorrectRange) { RequiredDelayAtCorrectRange(); } -TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(TargetDelayBufferMinMax)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax +#else +#define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax +#endif +TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { TargetDelayBufferMinMax(); } diff --git a/webrtc/modules/audio_processing/aec/system_delay_unittest.cc b/webrtc/modules/audio_processing/aec/system_delay_unittest.cc index 32f5a3e6e2..567118d828 100644 --- a/webrtc/modules/audio_processing/aec/system_delay_unittest.cc +++ b/webrtc/modules/audio_processing/aec/system_delay_unittest.cc @@ -14,7 +14,6 @@ extern "C" { } #include "webrtc/modules/audio_processing/aec/echo_cancellation_internal.h" #include "webrtc/modules/audio_processing/aec/echo_cancellation.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/typedefs.h" namespace { diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc b/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc index b2e11981fa..7f152bf942 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc +++ b/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc @@ -14,7 +14,6 @@ extern "C" { #include "webrtc/modules/audio_processing/aec/aec_core.h" } #include "webrtc/modules/audio_processing/include/audio_processing.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc index eff791d129..d4bb8aa513 100644 --- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc +++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc @@ -28,7 +28,6 @@ #include "webrtc/system_wrappers/include/event_wrapper.h" #include "webrtc/system_wrappers/include/trace.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" #ifdef WEBRTC_ANDROID_PLATFORM_BUILD #include "gtest/gtest.h" #include "external/webrtc/webrtc/modules/audio_processing/test/unittest.pb.h" diff --git a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc index 7a035d2b41..7fb7d2d6a9 100644 --- a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc +++ b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/base/scoped_ptr.h" #include "webrtc/system_wrappers/include/file_wrapper.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/typedefs.h" namespace webrtc { @@ -59,7 +58,12 @@ class TransientFileUtilsTest: public ::testing::Test { const std::string kTestFileNamef; }; -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertByteArrayToFloat)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ConvertByteArrayToFloat DISABLED_ConvertByteArrayToFloat +#else +#define MAYBE_ConvertByteArrayToFloat ConvertByteArrayToFloat +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ConvertByteArrayToFloat) { float value = 0.0; EXPECT_EQ(0, ConvertByteArrayToFloat(kPiBytesf, &value)); @@ -72,7 +76,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertByteArrayToFloat)) { EXPECT_FLOAT_EQ(kAvogadro, value); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertByteArrayToDouble)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ConvertByteArrayToDouble DISABLED_ConvertByteArrayToDouble +#else +#define MAYBE_ConvertByteArrayToDouble ConvertByteArrayToDouble +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ConvertByteArrayToDouble) { double value = 0.0; EXPECT_EQ(0, ConvertByteArrayToDouble(kPiBytes, &value)); @@ -85,7 +94,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertByteArrayToDouble)) { EXPECT_DOUBLE_EQ(kAvogadro, value); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertFloatToByteArray)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ConvertFloatToByteArray DISABLED_ConvertFloatToByteArray +#else +#define MAYBE_ConvertFloatToByteArray ConvertFloatToByteArray +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ConvertFloatToByteArray) { rtc::scoped_ptr bytes(new uint8_t[4]); EXPECT_EQ(0, ConvertFloatToByteArray(kPi, bytes.get())); @@ -98,7 +112,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertFloatToByteArray)) { EXPECT_EQ(0, memcmp(bytes.get(), kAvogadroBytesf, 4)); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertDoubleToByteArray)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ConvertDoubleToByteArray DISABLED_ConvertDoubleToByteArray +#else +#define MAYBE_ConvertDoubleToByteArray ConvertDoubleToByteArray +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ConvertDoubleToByteArray) { rtc::scoped_ptr bytes(new uint8_t[8]); EXPECT_EQ(0, ConvertDoubleToByteArray(kPi, bytes.get())); @@ -111,7 +130,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ConvertDoubleToByteArray)) { EXPECT_EQ(0, memcmp(bytes.get(), kAvogadroBytes, 8)); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadInt16BufferFromFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ReadInt16BufferFromFile DISABLED_ReadInt16BufferFromFile +#else +#define MAYBE_ReadInt16BufferFromFile ReadInt16BufferFromFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ReadInt16BufferFromFile) { std::string test_filename = kTestFileName; rtc::scoped_ptr file(FileWrapper::Create()); @@ -149,8 +173,13 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadInt16BufferFromFile)) { EXPECT_EQ(17631, buffer[kBufferLength - 1]); } -TEST_F(TransientFileUtilsTest, - DISABLED_ON_IOS(ReadInt16FromFileToFloatBuffer)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ReadInt16FromFileToFloatBuffer \ + DISABLED_ReadInt16FromFileToFloatBuffer +#else +#define MAYBE_ReadInt16FromFileToFloatBuffer ReadInt16FromFileToFloatBuffer +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ReadInt16FromFileToFloatBuffer) { std::string test_filename = kTestFileName; rtc::scoped_ptr file(FileWrapper::Create()); @@ -191,8 +220,13 @@ TEST_F(TransientFileUtilsTest, EXPECT_DOUBLE_EQ(17631, buffer[kBufferLength - 1]); } -TEST_F(TransientFileUtilsTest, - DISABLED_ON_IOS(ReadInt16FromFileToDoubleBuffer)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ReadInt16FromFileToDoubleBuffer \ + DISABLED_ReadInt16FromFileToDoubleBuffer +#else +#define MAYBE_ReadInt16FromFileToDoubleBuffer ReadInt16FromFileToDoubleBuffer +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ReadInt16FromFileToDoubleBuffer) { std::string test_filename = kTestFileName; rtc::scoped_ptr file(FileWrapper::Create()); @@ -232,7 +266,12 @@ TEST_F(TransientFileUtilsTest, EXPECT_DOUBLE_EQ(17631, buffer[kBufferLength - 1]); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadFloatBufferFromFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ReadFloatBufferFromFile DISABLED_ReadFloatBufferFromFile +#else +#define MAYBE_ReadFloatBufferFromFile ReadFloatBufferFromFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ReadFloatBufferFromFile) { std::string test_filename = kTestFileNamef; rtc::scoped_ptr file(FileWrapper::Create()); @@ -269,7 +308,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadFloatBufferFromFile)) { EXPECT_FLOAT_EQ(kAvogadro, buffer[2]); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadDoubleBufferFromFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ReadDoubleBufferFromFile DISABLED_ReadDoubleBufferFromFile +#else +#define MAYBE_ReadDoubleBufferFromFile ReadDoubleBufferFromFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ReadDoubleBufferFromFile) { std::string test_filename = kTestFileName; rtc::scoped_ptr file(FileWrapper::Create()); @@ -306,7 +350,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ReadDoubleBufferFromFile)) { EXPECT_DOUBLE_EQ(kAvogadro, buffer[2]); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteInt16BufferToFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_WriteInt16BufferToFile DISABLED_WriteInt16BufferToFile +#else +#define MAYBE_WriteInt16BufferToFile WriteInt16BufferToFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_WriteInt16BufferToFile) { rtc::scoped_ptr file(FileWrapper::Create()); std::string kOutFileName = test::TempFilename(test::OutputPath(), @@ -348,7 +397,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteInt16BufferToFile)) { kBufferLength * sizeof(written_buffer[0]))); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteFloatBufferToFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_WriteFloatBufferToFile DISABLED_WriteFloatBufferToFile +#else +#define MAYBE_WriteFloatBufferToFile WriteFloatBufferToFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_WriteFloatBufferToFile) { rtc::scoped_ptr file(FileWrapper::Create()); std::string kOutFileName = test::TempFilename(test::OutputPath(), @@ -390,7 +444,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteFloatBufferToFile)) { kBufferLength * sizeof(written_buffer[0]))); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteDoubleBufferToFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_WriteDoubleBufferToFile DISABLED_WriteDoubleBufferToFile +#else +#define MAYBE_WriteDoubleBufferToFile WriteDoubleBufferToFile +#endif +TEST_F(TransientFileUtilsTest, MAYBE_WriteDoubleBufferToFile) { rtc::scoped_ptr file(FileWrapper::Create()); std::string kOutFileName = test::TempFilename(test::OutputPath(), @@ -432,7 +491,12 @@ TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(WriteDoubleBufferToFile)) { kBufferLength * sizeof(written_buffer[0]))); } -TEST_F(TransientFileUtilsTest, DISABLED_ON_IOS(ExpectedErrorReturnValues)) { +#if defined(WEBRTC_IOS) +#define MAYBE_ExpectedErrorReturnValues DISABLED_ExpectedErrorReturnValues +#else +#define MAYBE_ExpectedErrorReturnValues ExpectedErrorReturnValues +#endif +TEST_F(TransientFileUtilsTest, MAYBE_ExpectedErrorReturnValues) { std::string test_filename = kTestFileName; double value; diff --git a/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc b/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc index 6a70a3f92c..b60077510b 100644 --- a/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc +++ b/webrtc/modules/audio_processing/transient/transient_detector_unittest.cc @@ -19,8 +19,7 @@ #include "webrtc/modules/audio_processing/transient/file_utils.h" #include "webrtc/system_wrappers/include/file_wrapper.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" - #include "webrtc/typedefs.h" +#include "webrtc/typedefs.h" namespace webrtc { @@ -37,7 +36,11 @@ static const size_t kNumberOfSampleRates = // The files contain all the results in double precision (Little endian). // The audio files used with different sample rates are stored in the same // directory. -TEST(TransientDetectorTest, DISABLED_ON_IOS(CorrectnessBasedOnFiles)) { +#if defined(WEBRTC_IOS) +TEST(TransientDetectorTest, DISABLED_CorrectnessBasedOnFiles) { +#else +TEST(TransientDetectorTest, CorrectnessBasedOnFiles) { +#endif for (size_t i = 0; i < kNumberOfSampleRates; ++i) { int sample_rate_hz = kSampleRatesHz[i]; diff --git a/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc b/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc index 7c99f4f161..e4e9048f88 100644 --- a/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc +++ b/webrtc/modules/audio_processing/transient/wpd_tree_unittest.cc @@ -19,7 +19,6 @@ #include "webrtc/modules/audio_processing/transient/file_utils.h" #include "webrtc/system_wrappers/include/file_wrapper.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -69,7 +68,11 @@ TEST(WPDTreeTest, Construction) { // It also writes the results in its own set of files in the out directory. // Matlab and output files contain all the results in double precision (Little // endian) appended. -TEST(WPDTreeTest, DISABLED_ON_IOS(CorrectnessBasedOnMatlabFiles)) { +#if defined(WEBRTC_IOS) +TEST(WPDTreeTest, DISABLED_CorrectnessBasedOnMatlabFiles) { +#else +TEST(WPDTreeTest, CorrectnessBasedOnMatlabFiles) { +#endif // 10 ms at 16000 Hz. const size_t kTestBufferSize = 160; const int kLevels = 3; diff --git a/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc b/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc index 5462d05d37..1d1dcc7066 100644 --- a/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc +++ b/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc @@ -16,7 +16,6 @@ #include "webrtc/base/scoped_ptr.h" #include "webrtc/modules/include/module_common_types.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -55,7 +54,11 @@ TEST(StandaloneVadTest, Api) { EXPECT_EQ(kMode, vad->mode()); } -TEST(StandaloneVadTest, DISABLED_ON_IOS(ActivityDetection)) { +#if defined(WEBRTC_IOS) +TEST(StandaloneVadTest, DISABLED_ActivityDetection) { +#else +TEST(StandaloneVadTest, ActivityDetection) { +#endif rtc::scoped_ptr vad(StandaloneVad::Create()); const size_t kDataLength = kLength10Ms; int16_t data[kDataLength] = {0}; diff --git a/webrtc/modules/media_file/media_file_unittest.cc b/webrtc/modules/media_file/media_file_unittest.cc index c12ea57ea2..6541a8fb7c 100644 --- a/webrtc/modules/media_file/media_file_unittest.cc +++ b/webrtc/modules/media_file/media_file_unittest.cc @@ -12,7 +12,6 @@ #include "webrtc/modules/media_file/media_file.h" #include "webrtc/system_wrappers/include/sleep.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" class MediaFileTest : public testing::Test { protected: @@ -28,8 +27,14 @@ class MediaFileTest : public testing::Test { webrtc::MediaFile* media_file_; }; -TEST_F(MediaFileTest, DISABLED_ON_IOS( - DISABLED_ON_ANDROID(StartPlayingAudioFileWithoutError))) { +#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) +#define MAYBE_StartPlayingAudioFileWithoutError \ + DISABLED_StartPlayingAudioFileWithoutError +#else +#define MAYBE_StartPlayingAudioFileWithoutError \ + StartPlayingAudioFileWithoutError +#endif +TEST_F(MediaFileTest, MAYBE_StartPlayingAudioFileWithoutError) { // TODO(leozwang): Use hard coded filename here, we want to // loop through all audio files in future const std::string audio_file = webrtc::test::ProjectRootPath() + @@ -47,7 +52,12 @@ TEST_F(MediaFileTest, DISABLED_ON_IOS( ASSERT_EQ(0, media_file_->StopPlaying()); } -TEST_F(MediaFileTest, DISABLED_ON_IOS(WriteWavFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_WriteWavFile DISABLED_WriteWavFile +#else +#define MAYBE_WriteWavFile WriteWavFile +#endif +TEST_F(MediaFileTest, MAYBE_WriteWavFile) { // Write file. static const size_t kHeaderSize = 44; static const size_t kPayloadSize = 320; diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc index f95067b074..50909ebd01 100644 --- a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc +++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc @@ -24,7 +24,6 @@ #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" #include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h" #include "webrtc/test/field_trial.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { namespace testing { @@ -318,8 +317,13 @@ TEST_F(OveruseDetectorTest, OveruseWithLowVariance2000Kbit30fps) { EXPECT_EQ(kBwOverusing, overuse_detector_->State()); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance30Kbit3fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance30Kbit3fps \ + DISABLED_LowGaussianVariance30Kbit3fps +#else +#define MAYBE_LowGaussianVariance30Kbit3fps LowGaussianVariance30Kbit3fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance30Kbit3fps) { size_t packet_size = 1200; int packets_per_frame = 1; int frame_duration_ms = 333; @@ -375,8 +379,13 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift30Kbit3fps) { EXPECT_EQ(4, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance100Kbit5fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance100Kbit5fps \ + DISABLED_LowGaussianVariance100Kbit5fps +#else +#define MAYBE_LowGaussianVariance100Kbit5fps LowGaussianVariance100Kbit5fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit5fps) { size_t packet_size = 1200; int packets_per_frame = 2; int frame_duration_ms = 200; @@ -390,8 +399,13 @@ TEST_F(OveruseDetectorTest, EXPECT_EQ(13, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(HighGaussianVariance100Kbit5fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_HighGaussianVariance100Kbit5fps \ + DISABLED_HighGaussianVariance100Kbit5fps +#else +#define MAYBE_HighGaussianVariance100Kbit5fps HighGaussianVariance100Kbit5fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit5fps) { size_t packet_size = 1200; int packets_per_frame = 2; int frame_duration_ms = 200; @@ -405,8 +419,13 @@ TEST_F(OveruseDetectorTest, EXPECT_EQ(32, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance100Kbit10fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance100Kbit10fps \ + DISABLED_LowGaussianVariance100Kbit10fps +#else +#define MAYBE_LowGaussianVariance100Kbit10fps LowGaussianVariance100Kbit10fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit10fps) { size_t packet_size = 1200; int packets_per_frame = 1; int frame_duration_ms = 100; @@ -420,8 +439,13 @@ TEST_F(OveruseDetectorTest, EXPECT_EQ(13, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(HighGaussianVariance100Kbit10fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_HighGaussianVariance100Kbit10fps \ + DISABLED_HighGaussianVariance100Kbit10fps +#else +#define MAYBE_HighGaussianVariance100Kbit10fps HighGaussianVariance100Kbit10fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit10fps) { size_t packet_size = 1200; int packets_per_frame = 1; int frame_duration_ms = 100; @@ -435,8 +459,13 @@ TEST_F(OveruseDetectorTest, EXPECT_EQ(32, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance300Kbit30fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance300Kbit30fps \ + DISABLED_LowGaussianVariance300Kbit30fps +#else +#define MAYBE_LowGaussianVariance300Kbit30fps LowGaussianVariance300Kbit30fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance300Kbit30fps) { size_t packet_size = 1200; int packets_per_frame = 1; int frame_duration_ms = 33; @@ -492,8 +521,13 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift300Kbit30fps) { EXPECT_EQ(10, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance1000Kbit30fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance1000Kbit30fps \ + DISABLED_LowGaussianVariance1000Kbit30fps +#else +#define MAYBE_LowGaussianVariance1000Kbit30fps LowGaussianVariance1000Kbit30fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance1000Kbit30fps) { size_t packet_size = 1200; int packets_per_frame = 3; int frame_duration_ms = 33; @@ -549,8 +583,13 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift1000Kbit30fps) { EXPECT_EQ(10, frames_until_overuse); } -TEST_F(OveruseDetectorTest, - DISABLED_ON_ANDROID(LowGaussianVariance2000Kbit30fps)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_LowGaussianVariance2000Kbit30fps \ + DISABLED_LowGaussianVariance2000Kbit30fps +#else +#define MAYBE_LowGaussianVariance2000Kbit30fps LowGaussianVariance2000Kbit30fps +#endif +TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance2000Kbit30fps) { size_t packet_size = 1200; int packets_per_frame = 6; int frame_duration_ms = 33; diff --git a/webrtc/modules/utility/source/file_player_unittests.cc b/webrtc/modules/utility/source/file_player_unittests.cc index 754e1242d3..58471e5e8d 100644 --- a/webrtc/modules/utility/source/file_player_unittests.cc +++ b/webrtc/modules/utility/source/file_player_unittests.cc @@ -20,7 +20,6 @@ #include "webrtc/base/md5digest.h" #include "webrtc/base/stringencode.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" DEFINE_bool(file_player_output, false, "Generate reference files."); @@ -82,7 +81,12 @@ class FilePlayerTest : public ::testing::Test { FILE* output_file_; }; -TEST_F(FilePlayerTest, DISABLED_ON_IOS(PlayWavPcmuFile)) { +#if defined(WEBRTC_IOS) +#define MAYBE_PlayWavPcmuFile DISABLED_PlayWavPcmuFile +#else +#define MAYBE_PlayWavPcmuFile PlayWavPcmuFile +#endif +TEST_F(FilePlayerTest, MAYBE_PlayWavPcmuFile) { const std::string kFileName = test::ResourcePath("utility/encapsulated_pcmu_8khz", "wav"); // The file is longer than this, but keeping the output shorter limits the @@ -93,7 +97,12 @@ TEST_F(FilePlayerTest, DISABLED_ON_IOS(PlayWavPcmuFile)) { PlayFileAndCheck(kFileName, kRefChecksum, kOutputLengthMs); } -TEST_F(FilePlayerTest, DISABLED_ON_IOS(PlayWavPcm16File)) { +#if defined(WEBRTC_IOS) +#define MAYBE_PlayWavPcm16File DISABLED_PlayWavPcm16File +#else +#define MAYBE_PlayWavPcm16File PlayWavPcm16File +#endif +TEST_F(FilePlayerTest, MAYBE_PlayWavPcm16File) { const std::string kFileName = test::ResourcePath("utility/encapsulated_pcm16b_8khz", "wav"); // The file is longer than this, but keeping the output shorter limits the diff --git a/webrtc/modules/video_capture/test/video_capture_unittest.cc b/webrtc/modules/video_capture/test/video_capture_unittest.cc index 1bd0684d80..7623131226 100644 --- a/webrtc/modules/video_capture/test/video_capture_unittest.cc +++ b/webrtc/modules/video_capture/test/video_capture_unittest.cc @@ -23,7 +23,6 @@ #include "webrtc/system_wrappers/include/critical_section_wrapper.h" #include "webrtc/system_wrappers/include/sleep.h" #include "webrtc/system_wrappers/include/tick_util.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/video_frame.h" using rtc::scoped_ptr; @@ -479,7 +478,12 @@ TEST_F(VideoCaptureExternalTest, TestExternalCapture) { // Test frame rate and no picture alarm. // Flaky on Win32, see webrtc:3270. -TEST_F(VideoCaptureExternalTest, DISABLED_ON_WIN(FrameRate)) { +#if defined(WEBRTC_WIN) +#define MAYBE_FrameRate DISABLED_FrameRate +#else +#define MAYBE_FrameRate FrameRate +#endif +TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { int64_t testTime = 3; TickTime startTime = TickTime::Now(); diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc index d4e1e6e3a0..20715df074 100644 --- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc +++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc @@ -22,7 +22,6 @@ #include "webrtc/test/testsupport/fileutils.h" #include "webrtc/test/testsupport/frame_reader.h" #include "webrtc/test/testsupport/frame_writer.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/test/testsupport/metrics/video_metrics.h" #include "webrtc/test/testsupport/packet_reader.h" #include "webrtc/typedefs.h" @@ -814,8 +813,13 @@ TEST_F(VideoProcessorIntegrationTest, Process10PercentPacketLoss) { // low to high to medium. Check that quality and encoder response to the new // target rate/per-frame bandwidth (for each rate update) is within limits. // One key frame (first frame only) in sequence. -TEST_F(VideoProcessorIntegrationTest, - DISABLED_ON_ANDROID(ProcessNoLossChangeBitRateVP8)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_ProcessNoLossChangeBitRateVP8 \ + DISABLED_ProcessNoLossChangeBitRateVP8 +#else +#define MAYBE_ProcessNoLossChangeBitRateVP8 ProcessNoLossChangeBitRateVP8 +#endif +TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossChangeBitRateVP8) { // Bitrate and frame rate profile. RateProfile rate_profile; SetRateProfilePars(&rate_profile, 0, 200, 30, 0); @@ -846,8 +850,15 @@ TEST_F(VideoProcessorIntegrationTest, // for the rate control metrics can be lower. One key frame (first frame only). // Note: quality after update should be higher but we currently compute quality // metrics averaged over whole sequence run. +#if defined(WEBRTC_ANDROID) +#define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8 \ + DISABLED_ProcessNoLossChangeFrameRateFrameDropVP8 +#else +#define MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8 \ + ProcessNoLossChangeFrameRateFrameDropVP8 +#endif TEST_F(VideoProcessorIntegrationTest, - DISABLED_ON_ANDROID(ProcessNoLossChangeFrameRateFrameDropVP8)) { + MAYBE_ProcessNoLossChangeFrameRateFrameDropVP8) { config_.networking_config.packet_loss_probability = 0; // Bitrate and frame rate profile. RateProfile rate_profile; @@ -874,8 +885,15 @@ TEST_F(VideoProcessorIntegrationTest, // Run with no packet loss, at low bitrate. During this time we should've // resized once. Expect 2 key frames generated (first and one for resize). +#if defined(WEBRTC_ANDROID) +#define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \ + DISABLED_ProcessNoLossSpatialResizeFrameDropVP8 +#else +#define MAYBE_ProcessNoLossSpatialResizeFrameDropVP8 \ + ProcessNoLossSpatialResizeFrameDropVP8 +#endif TEST_F(VideoProcessorIntegrationTest, - DISABLED_ON_ANDROID(ProcessNoLossSpatialResizeFrameDropVP8)) { + MAYBE_ProcessNoLossSpatialResizeFrameDropVP8) { config_.networking_config.packet_loss_probability = 0; // Bitrate and frame rate profile. RateProfile rate_profile; @@ -901,8 +919,13 @@ TEST_F(VideoProcessorIntegrationTest, // encoding rate mismatch are applied to each layer. // No dropped frames in this test, and internal spatial resizer is off. // One key frame (first frame only) in sequence, so no spatial resizing. -TEST_F(VideoProcessorIntegrationTest, - DISABLED_ON_ANDROID(ProcessNoLossTemporalLayersVP8)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_ProcessNoLossTemporalLayersVP8 \ + DISABLED_ProcessNoLossTemporalLayersVP8 +#else +#define MAYBE_ProcessNoLossTemporalLayersVP8 ProcessNoLossTemporalLayersVP8 +#endif +TEST_F(VideoProcessorIntegrationTest, MAYBE_ProcessNoLossTemporalLayersVP8) { config_.networking_config.packet_loss_probability = 0; // Bitrate and frame rate profile. RateProfile rate_profile; diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc index 7650a250ce..c3d77da063 100644 --- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc +++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" #include "webrtc/system_wrappers/include/tick_util.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -221,7 +220,12 @@ TEST_F(TestVp8Impl, EncoderParameterTest) { EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->InitDecode(&codec_inst_, 1)); } -TEST_F(TestVp8Impl, DISABLED_ON_ANDROID(AlignedStrideEncodeDecode)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_AlignedStrideEncodeDecode DISABLED_AlignedStrideEncodeDecode +#else +#define MAYBE_AlignedStrideEncodeDecode AlignedStrideEncodeDecode +#endif +TEST_F(TestVp8Impl, MAYBE_AlignedStrideEncodeDecode) { SetUpEncodeDecode(); encoder_->Encode(input_frame_, NULL, NULL); EXPECT_GT(WaitForEncodedFrame(), 0u); @@ -237,7 +241,12 @@ TEST_F(TestVp8Impl, DISABLED_ON_ANDROID(AlignedStrideEncodeDecode)) { EXPECT_EQ(kTestNtpTimeMs, decoded_frame_.ntp_time_ms()); } -TEST_F(TestVp8Impl, DISABLED_ON_ANDROID(DecodeWithACompleteKeyFrame)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_DecodeWithACompleteKeyFrame DISABLED_DecodeWithACompleteKeyFrame +#else +#define MAYBE_DecodeWithACompleteKeyFrame DecodeWithACompleteKeyFrame +#endif +TEST_F(TestVp8Impl, MAYBE_DecodeWithACompleteKeyFrame) { SetUpEncodeDecode(); encoder_->Encode(input_frame_, NULL, NULL); EXPECT_GT(WaitForEncodedFrame(), 0u); diff --git a/webrtc/modules/video_coding/video_sender_unittest.cc b/webrtc/modules/video_coding/video_sender_unittest.cc index 2daa9d7b2d..9a438ff2b7 100644 --- a/webrtc/modules/video_coding/video_sender_unittest.cc +++ b/webrtc/modules/video_coding/video_sender_unittest.cc @@ -24,7 +24,6 @@ #include "webrtc/system_wrappers/include/clock.h" #include "webrtc/test/frame_generator.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" using ::testing::_; using ::testing::AllOf; @@ -424,8 +423,12 @@ class TestVideoSenderWithVp8 : public TestVideoSender { int available_bitrate_kbps_; }; -TEST_F(TestVideoSenderWithVp8, - DISABLED_ON_IOS(DISABLED_ON_ANDROID(FixedTemporalLayersStrategy))) { +#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) +#define MAYBE_FixedTemporalLayersStrategy DISABLED_FixedTemporalLayersStrategy +#else +#define MAYBE_FixedTemporalLayersStrategy FixedTemporalLayersStrategy +#endif +TEST_F(TestVideoSenderWithVp8, MAYBE_FixedTemporalLayersStrategy) { const int low_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][0]; const int mid_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][1]; const int high_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][2]; @@ -439,8 +442,13 @@ TEST_F(TestVideoSenderWithVp8, } } -TEST_F(TestVideoSenderWithVp8, - DISABLED_ON_IOS(DISABLED_ON_ANDROID(RealTimeTemporalLayersStrategy))) { +#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) +#define MAYBE_RealTimeTemporalLayersStrategy \ + DISABLED_RealTimeTemporalLayersStrategy +#else +#define MAYBE_RealTimeTemporalLayersStrategy RealTimeTemporalLayersStrategy +#endif +TEST_F(TestVideoSenderWithVp8, MAYBE_RealTimeTemporalLayersStrategy) { Config extra_options; extra_options.Set( new RealTimeTemporalLayersFactory()); diff --git a/webrtc/modules/video_processing/test/brightness_detection_test.cc b/webrtc/modules/video_processing/test/brightness_detection_test.cc index 041a6e090f..669bb183e5 100644 --- a/webrtc/modules/video_processing/test/brightness_detection_test.cc +++ b/webrtc/modules/video_processing/test/brightness_detection_test.cc @@ -11,11 +11,15 @@ #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/test/video_processing_unittest.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(BrightnessDetection)) { +#if defined(WEBRTC_IOS) +#define MAYBE_BrightnessDetection DISABLED_BrightnessDetection +#else +#define MAYBE_BrightnessDetection BrightnessDetection +#endif +TEST_F(VideoProcessingTest, MAYBE_BrightnessDetection) { uint32_t frameNum = 0; int32_t brightnessWarning = 0; uint32_t warningCount = 0; diff --git a/webrtc/modules/video_processing/test/content_metrics_test.cc b/webrtc/modules/video_processing/test/content_metrics_test.cc index a676982584..782f9cff59 100644 --- a/webrtc/modules/video_processing/test/content_metrics_test.cc +++ b/webrtc/modules/video_processing/test/content_metrics_test.cc @@ -12,11 +12,14 @@ #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/content_analysis.h" #include "webrtc/modules/video_processing/test/video_processing_unittest.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(ContentAnalysis)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_ContentAnalysis) { +#else +TEST_F(VideoProcessingTest, ContentAnalysis) { +#endif VPMContentAnalysis ca__c(false); VPMContentAnalysis ca__sse(true); VideoContentMetrics* _cM_c; diff --git a/webrtc/modules/video_processing/test/deflickering_test.cc b/webrtc/modules/video_processing/test/deflickering_test.cc index 5bd8d4e003..5410015b06 100644 --- a/webrtc/modules/video_processing/test/deflickering_test.cc +++ b/webrtc/modules/video_processing/test/deflickering_test.cc @@ -16,11 +16,14 @@ #include "webrtc/modules/video_processing/test/video_processing_unittest.h" #include "webrtc/system_wrappers/include/tick_util.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(Deflickering)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_Deflickering) { +#else +TEST_F(VideoProcessingTest, Deflickering) { +#endif enum { NumRuns = 30 }; uint32_t frameNum = 0; const uint32_t frame_rate = 15; diff --git a/webrtc/modules/video_processing/test/video_processing_unittest.cc b/webrtc/modules/video_processing/test/video_processing_unittest.cc index bf4d37619c..2fd8fb6673 100644 --- a/webrtc/modules/video_processing/test/video_processing_unittest.cc +++ b/webrtc/modules/video_processing/test/video_processing_unittest.cc @@ -17,7 +17,6 @@ #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/system_wrappers/include/tick_util.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { @@ -92,7 +91,11 @@ void VideoProcessingTest::TearDown() { vp_ = NULL; } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(HandleNullBuffer)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_HandleNullBuffer) { +#else +TEST_F(VideoProcessingTest, HandleNullBuffer) { +#endif // TODO(mikhal/stefan): Do we need this one? VideoProcessing::FrameStats stats; // Video frame with unallocated buffer. @@ -106,7 +109,11 @@ TEST_F(VideoProcessingTest, DISABLED_ON_IOS(HandleNullBuffer)) { EXPECT_EQ(-3, vp_->BrightnessDetection(videoFrame, stats)); } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(HandleBadStats)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_HandleBadStats) { +#else +TEST_F(VideoProcessingTest, HandleBadStats) { +#endif VideoProcessing::FrameStats stats; vp_->ClearFrameStats(&stats); rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); @@ -120,7 +127,11 @@ TEST_F(VideoProcessingTest, DISABLED_ON_IOS(HandleBadStats)) { EXPECT_EQ(-3, vp_->BrightnessDetection(video_frame_, stats)); } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(IdenticalResultsAfterReset)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_IdenticalResultsAfterReset) { +#else +TEST_F(VideoProcessingTest, IdenticalResultsAfterReset) { +#endif VideoFrame video_frame2; VideoProcessing::FrameStats stats; // Only testing non-static functions here. @@ -153,7 +164,11 @@ TEST_F(VideoProcessingTest, DISABLED_ON_IOS(IdenticalResultsAfterReset)) { EXPECT_TRUE(CompareFrames(video_frame_, video_frame2)); } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(FrameStats)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_FrameStats) { +#else +TEST_F(VideoProcessingTest, FrameStats) { +#endif VideoProcessing::FrameStats stats; vp_->ClearFrameStats(&stats); rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); @@ -178,7 +193,11 @@ TEST_F(VideoProcessingTest, DISABLED_ON_IOS(FrameStats)) { EXPECT_FALSE(vp_->ValidFrameStats(stats)); } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(PreprocessorLogic)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_PreprocessorLogic) { +#else +TEST_F(VideoProcessingTest, PreprocessorLogic) { +#endif // Disable temporal sampling (frame dropping). vp_->EnableTemporalDecimation(false); int resolution = 100; @@ -197,7 +216,11 @@ TEST_F(VideoProcessingTest, DISABLED_ON_IOS(PreprocessorLogic)) { EXPECT_TRUE(vp_->PreprocessFrame(video_frame_) != nullptr); } -TEST_F(VideoProcessingTest, DISABLED_ON_IOS(Resampler)) { +#if defined(WEBRTC_IOS) +TEST_F(VideoProcessingTest, DISABLED_Resampler) { +#else +TEST_F(VideoProcessingTest, Resampler) { +#endif enum { NumRuns = 1 }; int64_t min_runtime = 0; diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 2fbd6df58a..b4dba1e37f 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -58,7 +58,6 @@ source_set("test_support") { "testsupport/frame_reader.h", "testsupport/frame_writer.cc", "testsupport/frame_writer.h", - "testsupport/gtest_disable.h", "testsupport/mock/mock_frame_reader.h", "testsupport/mock/mock_frame_writer.h", "testsupport/packet_reader.cc", diff --git a/webrtc/test/test.gyp b/webrtc/test/test.gyp index 82c8c25f98..8f04ce8fde 100644 --- a/webrtc/test/test.gyp +++ b/webrtc/test/test.gyp @@ -142,7 +142,6 @@ 'testsupport/frame_reader.h', 'testsupport/frame_writer.cc', 'testsupport/frame_writer.h', - 'testsupport/gtest_disable.h', 'testsupport/iosfileutils.mm', 'testsupport/mock/mock_frame_reader.h', 'testsupport/mock/mock_frame_writer.h', diff --git a/webrtc/test/testsupport/fileutils_unittest.cc b/webrtc/test/testsupport/fileutils_unittest.cc index dff7f2249b..e205db3ecf 100644 --- a/webrtc/test/testsupport/fileutils_unittest.cc +++ b/webrtc/test/testsupport/fileutils_unittest.cc @@ -16,7 +16,6 @@ #include #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/test/testsupport/gtest_disable.h" #ifdef WIN32 #define chdir _chdir @@ -66,7 +65,14 @@ TEST_F(FileUtilsTest, ProjectRootPath) { } // Similar to the above test, but for the output dir -TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(OutputPathFromUnchangedWorkingDir)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_OutputPathFromUnchangedWorkingDir \ + DISABLED_OutputPathFromUnchangedWorkingDir +#else +#define MAYBE_OutputPathFromUnchangedWorkingDir \ + OutputPathFromUnchangedWorkingDir +#endif +TEST_F(FileUtilsTest, MAYBE_OutputPathFromUnchangedWorkingDir) { std::string path = webrtc::test::OutputPath(); std::string expected_end = "out"; expected_end = kPathDelimiter + expected_end + kPathDelimiter; @@ -75,7 +81,12 @@ TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(OutputPathFromUnchangedWorkingDir)) { // Tests with current working directory set to a directory higher up in the // directory tree than the project root dir. -TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(OutputPathFromRootWorkingDir)) { +#if defined(WEBRTC_ANDROID) +#define MAYBE_OutputPathFromRootWorkingDir DISABLED_OutputPathFromRootWorkingDir +#else +#define MAYBE_OutputPathFromRootWorkingDir OutputPathFromRootWorkingDir +#endif +TEST_F(FileUtilsTest, MAYBE_OutputPathFromRootWorkingDir) { ASSERT_EQ(0, chdir(kPathDelimiter)); ASSERT_EQ("./", webrtc::test::OutputPath()); } diff --git a/webrtc/test/testsupport/gtest_disable.h b/webrtc/test/testsupport/gtest_disable.h deleted file mode 100644 index fdc56acc05..0000000000 --- a/webrtc/test/testsupport/gtest_disable.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ -#define TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ - -// Helper macros for platform disables. These can be chained. Example use: -// TEST_F(ViEStandardIntegrationTest, -// DISABLED_ON_LINUX(RunsBaseTestWithoutErrors)) { // ... -// -// Or, you can disable a whole test class by wrapping all mentions of the test -// class name inside one of these macros. -// -// The platform #defines we are looking at here are set by the build system. -#ifdef WEBRTC_LINUX -#define DISABLED_ON_LINUX(test) DISABLED_##test -#else -#define DISABLED_ON_LINUX(test) test -#endif - -#ifdef WEBRTC_MAC -#define DISABLED_ON_MAC(test) DISABLED_##test -#else -#define DISABLED_ON_MAC(test) test -#endif - -#ifdef _WIN32 -#define DISABLED_ON_WIN(test) DISABLED_##test -#else -#define DISABLED_ON_WIN(test) test -#endif - -// Using some extra magic here to be able to chain Android and iOS macros. -// http://stackoverflow.com/questions/8231966/why-do-i-need-double-layer-of-indirection-for-macros -#ifdef WEBRTC_ANDROID -#define DISABLED_ON_ANDROID_HIDDEN(test) DISABLED_##test -#define DISABLED_ON_ANDROID(test) DISABLED_ON_ANDROID_HIDDEN(test) -#else -#define DISABLED_ON_ANDROID_HIDDEN(test) test -#define DISABLED_ON_ANDROID(test) DISABLED_ON_ANDROID_HIDDEN(test) -#endif - -#ifdef WEBRTC_IOS -#define DISABLED_ON_IOS_HIDDEN(test) DISABLED_##test -#define DISABLED_ON_IOS(test) DISABLED_ON_IOS_HIDDEN(test) -#else -#define DISABLED_ON_IOS_HIDDEN(test) test -#define DISABLED_ON_IOS(test) DISABLED_ON_IOS_HIDDEN(test) -#endif - -#endif // TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_ diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc index 659af2f137..f654dbb32a 100644 --- a/webrtc/video/end_to_end_tests.cc +++ b/webrtc/video/end_to_end_tests.cc @@ -41,7 +41,6 @@ #include "webrtc/test/rtcp_packet_parser.h" #include "webrtc/test/rtp_rtcp_observer.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/test/testsupport/perf_test.h" #include "webrtc/video_encoder.h" diff --git a/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h b/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h index 7a3fad8399..51db985b4a 100644 --- a/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h +++ b/webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h @@ -16,7 +16,6 @@ #include "webrtc/common.h" #include "webrtc/common_types.h" #include "webrtc/engine_configurations.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/voice_engine/include/voe_audio_processing.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/include/voe_codec.h" diff --git a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc index 14dca27d1c..6efa55d516 100644 --- a/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc +++ b/webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc @@ -101,8 +101,7 @@ TEST_F(RtpRtcpTest, RemoteRtcpCnameHasPropagatedToRemoteSide) { EXPECT_STREQ(RTCP_CNAME, char_buffer); } -// Flakily hangs on Linux. code.google.com/p/webrtc/issues/detail?id=2178. -TEST_F(RtpRtcpTest, DISABLED_ON_LINUX(SSRCPropagatesCorrectly)) { +TEST_F(RtpRtcpTest, SSRCPropagatesCorrectly) { unsigned int local_ssrc = 1234; EXPECT_EQ(0, voe_base_->StopSend(channel_)); EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, local_ssrc)); diff --git a/webrtc/voice_engine/voe_codec_unittest.cc b/webrtc/voice_engine/voe_codec_unittest.cc index 52aa537544..f09e19e685 100644 --- a/webrtc/voice_engine/voe_codec_unittest.cc +++ b/webrtc/voice_engine/voe_codec_unittest.cc @@ -13,7 +13,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "webrtc/base/scoped_ptr.h" #include "webrtc/modules/audio_device/include/fake_audio_device.h" -#include "webrtc/test/testsupport/gtest_disable.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/include/voe_hardware.h" #include "webrtc/voice_engine/voice_engine_defines.h"