Commit 6bd3f255 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

enable logging to stderr by default in test binaries

Summary:
Update folly's TestMain program to enable glog logging to stderr by default.

Some of the tests in folly/experimental/test/TestUtilTest.cpp require that this
is enabled, and fail if log messages are not logged to stderr.

Reviewed By: yfeldblum

Differential Revision: D6817543

fbshipit-source-id: 87724c52124e72ad19f65524bcbd6536680f02ec
parent 8a278994
......@@ -16,6 +16,8 @@
#include <folly/init/Init.h>
#include <folly/Portability.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
/*
......@@ -26,7 +28,14 @@
int main(int argc, char** argv) __attribute__((__weak__));
int main(int argc, char** argv) {
#if FOLLY_HAVE_LIBGFLAGS
// Enable glog logging to stderr by default.
gflags::SetCommandLineOptionWithMode(
"logtostderr", "1", gflags::SET_FLAGS_DEFAULT);
#endif
::testing::InitGoogleTest(&argc, argv);
folly::Init init(&argc, &argv);
return RUN_ALL_TESTS();
}
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