From 16fcb247b24a924c5cad05ed320957cd8cb145c4 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Wed, 30 May 2012 17:26:32 +0000 Subject: [PATCH] Disable flaky VolumeTests only on Linux. BUG=issue367 TEST=voe_auto_test Review URL: https://webrtc-codereview.appspot.com/611005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2328 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../test/auto_test/standard/volume_test.cc | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/voice_engine/main/test/auto_test/standard/volume_test.cc b/src/voice_engine/main/test/auto_test/standard/volume_test.cc index e296babef..d9302816a 100644 --- a/src/voice_engine/main/test/auto_test/standard/volume_test.cc +++ b/src/voice_engine/main/test/auto_test/standard/volume_test.cc @@ -10,10 +10,20 @@ #include "after_streaming_fixture.h" +#ifdef WEBRTC_LINUX +#define DISABLED_ON_LINUX(test) DISABLED_##test +#else +#define DISABLED_ON_LINUX(test) test +#endif + class VolumeTest : public AfterStreamingFixture { }; -TEST_F(VolumeTest, DISABLED_DefaultSpeakerVolumeIsAtMost255) { +// TODO(phoglund): a number of tests are disabled here on Linux, all pending +// investigation in +// http://code.google.com/p/webrtc/issues/detail?id=367 + +TEST_F(VolumeTest, DefaultSpeakerVolumeIsAtMost255) { unsigned int volume = 1000; EXPECT_EQ(0, voe_volume_control_->GetSpeakerVolume(volume)); EXPECT_LE(volume, 255u); @@ -79,18 +89,14 @@ TEST_F(VolumeTest, ManualSetVolumeWorks) { #if !defined(MAC_IPHONE) -// TODO(phoglund): pending investigation in -// http://code.google.com/p/webrtc/issues/detail?id=367 -TEST_F(VolumeTest, DISABLED_DefaultMicrophoneVolumeIsAtMost255) { +TEST_F(VolumeTest, DISABLED_ON_LINUX(DefaultMicrophoneVolumeIsAtMost255)) { unsigned int volume = 1000; EXPECT_EQ(0, voe_volume_control_->GetMicVolume(volume)); EXPECT_LE(volume, 255u); } -// TODO(phoglund): pending investigation in -// http://code.google.com/p/webrtc/issues/detail?id=367 -TEST_F(VolumeTest, - DISABLED_ManualRequiresMicrophoneCanSetMicrophoneVolumeWithAcgOff) { +TEST_F(VolumeTest, DISABLED_ON_LINUX( + ManualRequiresMicrophoneCanSetMicrophoneVolumeWithAcgOff)) { SwitchToManualMicrophone(); EXPECT_EQ(0, voe_apm_->SetAgcStatus(false)); @@ -140,9 +146,7 @@ TEST_F(VolumeTest, InputMutingIsNotEnabledByDefault) { EXPECT_FALSE(is_muted); } -// TODO(phoglund): pending investigation in -// http://code.google.com/p/webrtc/issues/detail?id=367 -TEST_F(VolumeTest, DISABLED_ManualInputMutingMutesMicrophone) { +TEST_F(VolumeTest, DISABLED_ON_LINUX(ManualInputMutingMutesMicrophone)) { SwitchToManualMicrophone(); // Enable muting. @@ -163,17 +167,13 @@ TEST_F(VolumeTest, DISABLED_ManualInputMutingMutesMicrophone) { Sleep(2000); } -// TODO(phoglund): pending investigation in -// http://code.google.com/p/webrtc/issues/detail?id=367 -TEST_F(VolumeTest, DISABLED_SystemInputMutingIsNotEnabledByDefault) { +TEST_F(VolumeTest, DISABLED_ON_LINUX(SystemInputMutingIsNotEnabledByDefault)) { bool is_muted = true; EXPECT_EQ(0, voe_volume_control_->GetSystemInputMute(is_muted)); EXPECT_FALSE(is_muted); } -// TODO(phoglund): pending investigation in -// http://code.google.com/p/webrtc/issues/detail?id=367 -TEST_F(VolumeTest, DISABLED_ManualSystemInputMutingMutesMicrophone) { +TEST_F(VolumeTest, DISABLED_ON_LINUX(ManualSystemInputMutingMutesMicrophone)) { SwitchToManualMicrophone(); // Enable system input muting.