Added `TYPED_TEST_TEMP_DISABLED_ON_WINDOWS` macro.

This lets us temporarily disable `TYPED_TEST` unit tests on Windows.

Review: https://reviews.apache.org/r/65406


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b7cfcd7a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b7cfcd7a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b7cfcd7a

Branch: refs/heads/master
Commit: b7cfcd7a71652858ba005171e242b679b26dc4ee
Parents: 32c300e
Author: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Authored: Mon Jan 29 11:10:00 2018 -0800
Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Committed: Fri Feb 9 12:06:43 2018 -0800

----------------------------------------------------------------------
 3rdparty/stout/include/stout/gtest.hpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b7cfcd7a/3rdparty/stout/include/stout/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/gtest.hpp 
b/3rdparty/stout/include/stout/gtest.hpp
index a8ae3d9..ce6e4de 100644
--- a/3rdparty/stout/include/stout/gtest.hpp
+++ b/3rdparty/stout/include/stout/gtest.hpp
@@ -217,6 +217,18 @@ template <typename T1, typename T2>
 #endif // __WINDOWS__
 
 
+// Creates a gtest `TYPED_TEST` that is disabled on Windows.
+// TODO(andschwa): Remove after temporarily-disabled tests are fixed on
+// Windows. See MESOS-6392.
+#ifndef __WINDOWS__
+#define TYPED_TEST_TEMP_DISABLED_ON_WINDOWS(test_case_name, test_name)  \
+  TYPED_TEST(test_case_name, test_name)
+#else
+#define TYPED_TEST_TEMP_DISABLED_ON_WINDOWS(test_case_name, test_name)  \
+  TYPED_TEST(test_case_name, DISABLED_##test_name)
+#endif // __WINDOWS__
+
+
 // NOTE: On Windows, the closest equivalent to `sleep` is `timeout`.
 // Unfortunately, `timeout` requires an interactive terminal, otherwise
 // it errors out immediately. Instead, we use `ping` against localhost

Reply via email to