Disables unit tests that don't work on Android for Android.
BUG=N/A R=andrew@webrtc.org, kjellander@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1747004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4306 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq4/mock/mock_audio_decoder.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@@ -66,7 +68,7 @@ TEST(DecoderDatabase, GetRtpPayloadType) {
|
||||
db.GetRtpPayloadType(kDecoderISAC)); // iSAC is not registered.
|
||||
}
|
||||
|
||||
TEST(DecoderDatabase, GetDecoder) {
|
||||
TEST(DecoderDatabase, DISABLED_ON_ANDROID(GetDecoder)) {
|
||||
DecoderDatabase db;
|
||||
const uint8_t kPayloadType = 0;
|
||||
EXPECT_EQ(DecoderDatabase::kOK,
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include "webrtc/modules/audio_coding/neteq4/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@@ -201,7 +202,7 @@ class NetEqExternalDecoderTest : public ::testing::Test {
|
||||
scoped_ptr<test::InputAudioFile> input_file_;
|
||||
};
|
||||
|
||||
TEST_F(NetEqExternalDecoderTest, RunTest) {
|
||||
TEST_F(NetEqExternalDecoderTest, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(100); // Run 100 laps @ 10 ms each in the test loop.
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include "webrtc/modules/audio_coding/neteq4/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@@ -270,7 +271,7 @@ class NetEqStereoTestNoJitter : public NetEqStereoTest {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(NetEqStereoTestNoJitter, RunTest) {
|
||||
TEST_P(NetEqStereoTestNoJitter, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(8);
|
||||
}
|
||||
|
||||
@@ -295,7 +296,7 @@ class NetEqStereoTestPositiveDrift : public NetEqStereoTest {
|
||||
double drift_factor;
|
||||
};
|
||||
|
||||
TEST_P(NetEqStereoTestPositiveDrift, RunTest) {
|
||||
TEST_P(NetEqStereoTestPositiveDrift, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(100);
|
||||
}
|
||||
|
||||
@@ -308,7 +309,7 @@ class NetEqStereoTestNegativeDrift : public NetEqStereoTestPositiveDrift {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(NetEqStereoTestNegativeDrift, RunTest) {
|
||||
TEST_P(NetEqStereoTestNegativeDrift, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(100);
|
||||
}
|
||||
|
||||
@@ -336,7 +337,7 @@ class NetEqStereoTestDelays : public NetEqStereoTest {
|
||||
int frame_index_;
|
||||
};
|
||||
|
||||
TEST_P(NetEqStereoTestDelays, RunTest) {
|
||||
TEST_P(NetEqStereoTestDelays, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(1000);
|
||||
}
|
||||
|
||||
@@ -355,7 +356,7 @@ class NetEqStereoTestLosses : public NetEqStereoTest {
|
||||
int frame_index_;
|
||||
};
|
||||
|
||||
TEST_P(NetEqStereoTestLosses, RunTest) {
|
||||
TEST_P(NetEqStereoTestLosses, DISABLED_ON_ANDROID(RunTest)) {
|
||||
RunTest(100);
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/test/NETEQTEST_RTPpacket.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@@ -229,8 +230,10 @@ void NetEqDecodingTest::LoadDecoders() {
|
||||
ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderPCMu, 0));
|
||||
// Load PCMa.
|
||||
ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderPCMa, 8));
|
||||
#ifndef WEBRTC_ANDROID
|
||||
// Load iLBC.
|
||||
ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderILBC, 102));
|
||||
#endif // WEBRTC_ANDROID
|
||||
// Load iSAC.
|
||||
ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderISAC, 103));
|
||||
// Load iSAC SWB.
|
||||
@@ -379,7 +382,7 @@ void NetEqDecodingTest::PopulateCng(int frame_index,
|
||||
#define MAYBE_TestBitExactness TestBitExactness
|
||||
#endif
|
||||
|
||||
TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(MAYBE_TestBitExactness)) {
|
||||
const std::string kInputRtpFile = webrtc::test::ProjectRootPath() +
|
||||
"resources/audio_coding/neteq_universal_new.rtp";
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1700)
|
||||
@@ -394,7 +397,7 @@ TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
|
||||
DecodeAndCompare(kInputRtpFile, kInputRefFile);
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, TestNetworkStatistics) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestNetworkStatistics)) {
|
||||
const std::string kInputRtpFile = webrtc::test::ProjectRootPath() +
|
||||
"resources/audio_coding/neteq_universal_new.rtp";
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1700)
|
||||
@@ -412,7 +415,7 @@ TEST_F(NetEqDecodingTest, TestNetworkStatistics) {
|
||||
}
|
||||
|
||||
// TODO(hlundin): Re-enable test once the statistics interface is up and again.
|
||||
TEST_F(NetEqDecodingTest, TestFrameWaitingTimeStatistics) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestFrameWaitingTimeStatistics)) {
|
||||
// Use fax mode to avoid time-scaling. This is to simplify the testing of
|
||||
// packet waiting times in the packet buffer.
|
||||
neteq_->SetPlayoutMode(kPlayoutFax);
|
||||
@@ -487,7 +490,8 @@ TEST_F(NetEqDecodingTest, TestFrameWaitingTimeStatistics) {
|
||||
EXPECT_EQ(100u, waiting_times.size());
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimeNegative) {
|
||||
TEST_F(NetEqDecodingTest,
|
||||
DISABLED_ON_ANDROID(TestAverageInterArrivalTimeNegative)) {
|
||||
const int kNumFrames = 3000; // Needed for convergence.
|
||||
int frame_index = 0;
|
||||
const int kSamples = 10 * 16;
|
||||
@@ -518,7 +522,8 @@ TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimeNegative) {
|
||||
EXPECT_EQ(-103196, network_stats.clockdrift_ppm);
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimePositive) {
|
||||
TEST_F(NetEqDecodingTest,
|
||||
DISABLED_ON_ANDROID(TestAverageInterArrivalTimePositive)) {
|
||||
const int kNumFrames = 5000; // Needed for convergence.
|
||||
int frame_index = 0;
|
||||
const int kSamples = 10 * 16;
|
||||
@@ -549,7 +554,7 @@ TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimePositive) {
|
||||
EXPECT_EQ(110946, network_stats.clockdrift_ppm);
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, LongCngWithClockDrift) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithClockDrift)) {
|
||||
uint16_t seq_no = 0;
|
||||
uint32_t timestamp = 0;
|
||||
const int kFrameSizeMs = 30;
|
||||
@@ -642,7 +647,7 @@ TEST_F(NetEqDecodingTest, LongCngWithClockDrift) {
|
||||
EXPECT_GE(delay_after, delay_before - 20 * 16);
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, UnknownPayloadType) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(UnknownPayloadType)) {
|
||||
const int kPayloadBytes = 100;
|
||||
uint8_t payload[kPayloadBytes] = {0};
|
||||
WebRtcRTPHeader rtp_info;
|
||||
@@ -653,7 +658,7 @@ TEST_F(NetEqDecodingTest, UnknownPayloadType) {
|
||||
EXPECT_EQ(NetEq::kUnknownRtpPayloadType, neteq_->LastError());
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, DecoderError) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(DecoderError)) {
|
||||
const int kPayloadBytes = 100;
|
||||
uint8_t payload[kPayloadBytes] = {0};
|
||||
WebRtcRTPHeader rtp_info;
|
||||
@@ -692,7 +697,7 @@ TEST_F(NetEqDecodingTest, DecoderError) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(NetEqDecodingTest, GetAudioBeforeInsertPacket) {
|
||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(GetAudioBeforeInsertPacket)) {
|
||||
NetEqOutputType type;
|
||||
// Set all of |out_data_| to 1, and verify that it was set to 0 by the call
|
||||
// to GetAudio.
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
|
||||
#include "webrtc/system_wrappers/interface/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"
|
||||
@@ -1402,7 +1403,7 @@ TEST_F(ApmTest, DebugDump) {
|
||||
// TODO(andrew): Make this test more robust such that it can be run on multiple
|
||||
// platforms. It currently requires bit-exactness.
|
||||
#ifdef WEBRTC_AUDIOPROC_BIT_EXACT
|
||||
TEST_F(ApmTest, Process) {
|
||||
TEST_F(ApmTest, DISABLED_ON_ANDROID(Process)) {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
webrtc::audioproc::OutputData ref_data;
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include "webrtc/modules/media_file/interface/media_file.h"
|
||||
#include "webrtc/system_wrappers/interface/sleep.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
class MediaFileTest : public testing::Test {
|
||||
protected:
|
||||
@@ -27,7 +28,7 @@ class MediaFileTest : public testing::Test {
|
||||
webrtc::MediaFile* media_file_;
|
||||
};
|
||||
|
||||
TEST_F(MediaFileTest, StartPlayingAudioFileWithoutError) {
|
||||
TEST_F(MediaFileTest, DISABLED_ON_ANDROID(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() +
|
||||
|
@@ -215,4 +215,3 @@ TEST(TemporalLayersTest, KeyFrame) {
|
||||
EXPECT_EQ(true, vp8_info.layerSync);
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
|
@@ -16,10 +16,11 @@
|
||||
#include "webrtc/modules/video_processing/main/test/unit_test/video_processing_unittest.h"
|
||||
#include "webrtc/system_wrappers/interface/tick_util.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
TEST_F(VideoProcessingModuleTest, Denoising)
|
||||
TEST_F(VideoProcessingModuleTest, DISABLED_ON_ANDROID(Denoising))
|
||||
{
|
||||
enum { NumRuns = 10 };
|
||||
uint32_t frameNum = 0;
|
||||
|
@@ -36,4 +36,10 @@
|
||||
#define DISABLED_ON_WIN(test) test
|
||||
#endif
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
#define DISABLED_ON_ANDROID(test) DISABLED_##test
|
||||
#else
|
||||
#define DISABLED_ON_ANDROID(test) test
|
||||
#endif
|
||||
|
||||
#endif // TEST_TESTSUPPORT_INCLUDE_GTEST_DISABLE_H_
|
||||
|
Reference in New Issue
Block a user