Index: webrtc/base/filerotatingstream_unittest.cc |
diff --git a/webrtc/base/filerotatingstream_unittest.cc b/webrtc/base/filerotatingstream_unittest.cc |
index bac2a3a3e326c506094eeb190d9302a0a8d8e637..a3e9bf40d044c8bc10ea1f6988405e1539994d4c 100644 |
--- a/webrtc/base/filerotatingstream_unittest.cc |
+++ b/webrtc/base/filerotatingstream_unittest.cc |
@@ -19,7 +19,14 @@ |
namespace rtc { |
-class FileRotatingStreamTest : public ::testing::Test { |
+#if defined (WEBRTC_ANDROID) |
+// Fails on Android: https://bugs.chromium.org/p/webrtc/issues/detail?id=4364. |
+#define MAYBE_FileRotatingStreamTest DISABLED_FileRotatingStreamTest |
+#else |
+#define MAYBE_FileRotatingStreamTest FileRotatingStreamTest |
+#endif |
+ |
+class MAYBE_FileRotatingStreamTest : public ::testing::Test { |
pbos-webrtc
2016/07/14 12:02:18
You should disable the test and not the class of t
phoglund
2016/07/14 15:16:27
Mnyeh, all of them are broken anyway and it's quit
phoglund
2016/07/14 15:33:06
I should add: the two ways of doing it has the sam
|
protected: |
static const char* kFilePrefix; |
static const size_t kMaxFileSize; |
@@ -94,11 +101,12 @@ class FileRotatingStreamTest : public ::testing::Test { |
std::string dir_path_; |
}; |
-const char* FileRotatingStreamTest::kFilePrefix = "FileRotatingStreamTest"; |
-const size_t FileRotatingStreamTest::kMaxFileSize = 2; |
+const char* MAYBE_FileRotatingStreamTest::kFilePrefix = |
+ "FileRotatingStreamTest"; |
+const size_t MAYBE_FileRotatingStreamTest::kMaxFileSize = 2; |
// Tests that stream state is correct before and after Open / Close. |
-TEST_F(FileRotatingStreamTest, State) { |
+TEST_F(MAYBE_FileRotatingStreamTest, State) { |
Init("FileRotatingStreamTestState", kFilePrefix, kMaxFileSize, 3); |
EXPECT_EQ(SS_CLOSED, stream_->GetState()); |
@@ -109,7 +117,7 @@ TEST_F(FileRotatingStreamTest, State) { |
} |
// Tests that nothing is written to file when data of length zero is written. |
-TEST_F(FileRotatingStreamTest, EmptyWrite) { |
+TEST_F(MAYBE_FileRotatingStreamTest, EmptyWrite) { |
Init("FileRotatingStreamTestEmptyWrite", kFilePrefix, kMaxFileSize, 3); |
ASSERT_TRUE(stream_->Open()); |
@@ -124,7 +132,7 @@ TEST_F(FileRotatingStreamTest, EmptyWrite) { |
// Tests that a write operation followed by a read returns the expected data |
// and writes to the expected files. |
-TEST_F(FileRotatingStreamTest, WriteAndRead) { |
+TEST_F(MAYBE_FileRotatingStreamTest, WriteAndRead) { |
Init("FileRotatingStreamTestWriteAndRead", kFilePrefix, kMaxFileSize, 3); |
ASSERT_TRUE(stream_->Open()); |
@@ -158,7 +166,7 @@ TEST_F(FileRotatingStreamTest, WriteAndRead) { |
// Tests that writing data greater than the total capacity of the files |
// overwrites the files correctly and is read correctly after. |
-TEST_F(FileRotatingStreamTest, WriteOverflowAndRead) { |
+TEST_F(MAYBE_FileRotatingStreamTest, WriteOverflowAndRead) { |
Init("FileRotatingStreamTestWriteOverflowAndRead", kFilePrefix, kMaxFileSize, |
3); |
ASSERT_TRUE(stream_->Open()); |
@@ -175,7 +183,7 @@ TEST_F(FileRotatingStreamTest, WriteOverflowAndRead) { |
} |
// Tests that the returned file paths have the right folder and prefix. |
-TEST_F(FileRotatingStreamTest, GetFilePath) { |
+TEST_F(MAYBE_FileRotatingStreamTest, GetFilePath) { |
Init("FileRotatingStreamTestGetFilePath", kFilePrefix, kMaxFileSize, 20); |
for (auto i = 0; i < 20; ++i) { |
Pathname path(stream_->GetFilePath(i)); |
@@ -184,7 +192,16 @@ TEST_F(FileRotatingStreamTest, GetFilePath) { |
} |
} |
-class CallSessionFileRotatingStreamTest : public ::testing::Test { |
+#if defined (WEBRTC_ANDROID) |
+// Fails on Android: https://bugs.chromium.org/p/webrtc/issues/detail?id=4364. |
+#define MAYBE_CallSessionFileRotatingStreamTest \ |
+ DISABLED_CallSessionFileRotatingStreamTest |
+#else |
+#define MAYBE_CallSessionFileRotatingStreamTest \ |
+ CallSessionFileRotatingStreamTest |
+#endif |
+ |
+class MAYBE_CallSessionFileRotatingStreamTest : public ::testing::Test { |
protected: |
void Init(const std::string& dir_name, size_t max_total_log_size) { |
Pathname test_path; |
@@ -237,7 +254,7 @@ class CallSessionFileRotatingStreamTest : public ::testing::Test { |
// Tests that writing and reading to a stream with the smallest possible |
// capacity works. |
-TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadSmallest) { |
+TEST_F(DISABLED_CallSessionFileRotatingStreamTest, WriteAndReadSmallest) { |
Init("CallSessionFileRotatingStreamTestWriteAndReadSmallest", 4); |
ASSERT_TRUE(stream_->Open()); |
@@ -250,7 +267,7 @@ TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadSmallest) { |
// Tests that writing and reading to a stream with capacity lesser than 4MB |
// behaves correctly. |
-TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadSmall) { |
+TEST_F(DISABLED_CallSessionFileRotatingStreamTest, WriteAndReadSmall) { |
tommi
2016/07/14 12:14:13
Disabled for all?
phoglund
2016/07/14 15:16:27
Done.
|
Init("CallSessionFileRotatingStreamTestWriteAndReadSmall", 8); |
ASSERT_TRUE(stream_->Open()); |
@@ -263,7 +280,7 @@ TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadSmall) { |
// Tests that writing and reading to a stream with capacity greater than 4MB |
// behaves correctly. |
-TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadLarge) { |
+TEST_F(DISABLED_CallSessionFileRotatingStreamTest, WriteAndReadLarge) { |
tommi
2016/07/14 12:14:13
too?
phoglund
2016/07/14 15:16:27
Done.
|
Init("CallSessionFileRotatingStreamTestWriteAndReadLarge", 6 * 1024 * 1024); |
ASSERT_TRUE(stream_->Open()); |
@@ -290,7 +307,7 @@ TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadLarge) { |
// Tests that writing and reading to a stream where only the first file is |
// written to behaves correctly. |
-TEST_F(CallSessionFileRotatingStreamTest, WriteAndReadFirstHalf) { |
+TEST_F(DISABLED_CallSessionFileRotatingStreamTest, WriteAndReadFirstHalf) { |
tommi
2016/07/14 12:14:13
ditto
phoglund
2016/07/14 15:16:27
Done.
|
Init("CallSessionFileRotatingStreamTestWriteAndReadFirstHalf", |
6 * 1024 * 1024); |
ASSERT_TRUE(stream_->Open()); |