Disable the DoubleRegistrationLogging singleton test under MSVC
authorChristopher Dykes <cdykes@fb.com>
Mon, 21 Nov 2016 23:39:27 +0000 (15:39 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Mon, 21 Nov 2016 23:53:32 +0000 (15:53 -0800)
Summary: It's the only test in the file that is dependent on Subprocess, which is currently unsupported under MSVC.

Reviewed By: yfeldblum

Differential Revision: D4214812

fbshipit-source-id: 9dcd9763b51d037e0c452f79f134df286a11e718

folly/test/SingletonTest.cpp

index fe579484b7380f5099bbd91fe97b98fd39908aba..36eb9f6b018351137149e483d62565f26a46bace 100644 (file)
 #include <thread>
 
 #include <folly/Singleton.h>
-#include <folly/Subprocess.h>
 #include <folly/experimental/io/FsUtil.h>
 #include <folly/io/async/EventBase.h>
 #include <folly/portability/GMock.h>
 #include <folly/portability/GTest.h>
 #include <folly/test/SingletonTestStructs.h>
 
+#ifndef _MSC_VER
+#include <folly/Subprocess.h>
+#endif
+
 #include <glog/logging.h>
 #include <boost/thread/barrier.hpp>
 
@@ -594,6 +597,8 @@ TEST(Singleton, MockTest) {
   vault.destroyInstances();
 }
 
+#ifndef _MSC_VER
+// Subprocess isn't currently supported under MSVC.
 TEST(Singleton, DoubleRegistrationLogging) {
   const auto basename = "singleton_double_registration";
   const auto sub = fs::executable_path().remove_filename() / basename;
@@ -610,6 +615,7 @@ TEST(Singleton, DoubleRegistrationLogging) {
   EXPECT_EQ(SIGABRT, res.killSignal());
   EXPECT_THAT(err, testing::StartsWith("Double registration of singletons"));
 }
+#endif
 
 // Singleton using a non default constructor test/example:
 struct X {