Added test filters to libprocess tests. This commit builds upon the introduction of test filters to stout tests by using the same set of filters in libprocess tests.
Review: https://reviews.apache.org/r/57971/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9bf251bf Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9bf251bf Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9bf251bf Branch: refs/heads/master Commit: 9bf251bf6f67c4420ef2359b90706aeb1b32b524 Parents: 113da43 Author: John Kordich <[email protected]> Authored: Tue Apr 11 12:12:22 2017 -0700 Committer: Joseph Wu <[email protected]> Committed: Tue Apr 11 14:32:02 2017 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/tests/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/9bf251bf/3rdparty/libprocess/src/tests/main.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/main.cpp b/3rdparty/libprocess/src/tests/main.cpp index cda7d61..6ae7724 100644 --- a/3rdparty/libprocess/src/tests/main.cpp +++ b/3rdparty/libprocess/src/tests/main.cpp @@ -27,6 +27,11 @@ #include <stout/os/signals.hpp> #endif // __WINDOWS__ +#include <stout/tests/environment.hpp> + +using stout::internal::tests::Environment; +using stout::internal::tests::TestFilter; + // NOTE: We use RAW_LOG instead of LOG because RAW_LOG doesn't // allocate any memory or grab locks. And according to @@ -61,6 +66,10 @@ int main(int argc, char** argv) os::signals::reset(SIGTERM); #endif // __WINDOWS__ + vector<std::shared_ptr<TestFilter>> filters; + Environment* environment = new Environment(filters); + testing::AddGlobalTestEnvironment(environment); + // Add the libprocess test event listeners. ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners();
