Commit 45c9e441 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Disable the DoubleRegistrationLogging singleton test under MSVC

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
parent efd4e281
...@@ -17,13 +17,16 @@ ...@@ -17,13 +17,16 @@
#include <thread> #include <thread>
#include <folly/Singleton.h> #include <folly/Singleton.h>
#include <folly/Subprocess.h>
#include <folly/experimental/io/FsUtil.h> #include <folly/experimental/io/FsUtil.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/portability/GMock.h> #include <folly/portability/GMock.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/test/SingletonTestStructs.h> #include <folly/test/SingletonTestStructs.h>
#ifndef _MSC_VER
#include <folly/Subprocess.h>
#endif
#include <glog/logging.h> #include <glog/logging.h>
#include <boost/thread/barrier.hpp> #include <boost/thread/barrier.hpp>
...@@ -594,6 +597,8 @@ TEST(Singleton, MockTest) { ...@@ -594,6 +597,8 @@ TEST(Singleton, MockTest) {
vault.destroyInstances(); vault.destroyInstances();
} }
#ifndef _MSC_VER
// Subprocess isn't currently supported under MSVC.
TEST(Singleton, DoubleRegistrationLogging) { TEST(Singleton, DoubleRegistrationLogging) {
const auto basename = "singleton_double_registration"; const auto basename = "singleton_double_registration";
const auto sub = fs::executable_path().remove_filename() / basename; const auto sub = fs::executable_path().remove_filename() / basename;
...@@ -610,6 +615,7 @@ TEST(Singleton, DoubleRegistrationLogging) { ...@@ -610,6 +615,7 @@ TEST(Singleton, DoubleRegistrationLogging) {
EXPECT_EQ(SIGABRT, res.killSignal()); EXPECT_EQ(SIGABRT, res.killSignal());
EXPECT_THAT(err, testing::StartsWith("Double registration of singletons")); EXPECT_THAT(err, testing::StartsWith("Double registration of singletons"));
} }
#endif
// Singleton using a non default constructor test/example: // Singleton using a non default constructor test/example:
struct X { struct X {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment