Remove DISABLED_ON_ macros.
Macro incorrectly displays DISABLED_ON_ANDROID in test names for
parameterized tests under --gtest_list_tests, causing tests to be
disabled on all platforms since they contain the DISABLED_ prefix rather
than their expanded variants.
This expands the macro variants to inline if they're disabled or not,
and removes building some tests under configurations where they should
fail, instead of building them but disabling them by default.
The change also removes gtest_disable.h as an unused include from many
other files.
BUG=webrtc:5387, webrtc:5400
R=kjellander@webrtc.org, phoglund@webrtc.org
TBR=henrik.lundin@webrtc.org
Review URL: https://codereview.webrtc.org/1547343002 .
Cr-Commit-Position: refs/heads/master@{#11150}
diff --git a/webrtc/test/testsupport/fileutils_unittest.cc b/webrtc/test/testsupport/fileutils_unittest.cc
index dff7f22..e205db3 100644
--- a/webrtc/test/testsupport/fileutils_unittest.cc
+++ b/webrtc/test/testsupport/fileutils_unittest.cc
@@ -16,7 +16,6 @@
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/test/testsupport/gtest_disable.h"
#ifdef WIN32
#define chdir _chdir
@@ -66,7 +65,14 @@
}
// 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 @@
// 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());
}