From 26c4e8d2c5797fa25a3ea03104bef207f13e1cd6 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum <yfeldblum@fb.com> Date: Thu, 24 Nov 2016 14:56:49 -0800 Subject: [PATCH] Suppress deprecation warnings in related tests Summary: [Folly] Suppress deprecation warnings in related tests. When a test specifically exercises a marked-deprecated library or a marked-deprecated part of a library, we do not need to see the deprecation warnings - they are noise. Specifically, `Singleton` and `Subprocess` have tested but marked-deprecated APIs, so we suppress deprecation warnings in those specific test suites. Reviewed By: andrewjcg Differential Revision: D4230826 fbshipit-source-id: 937b078029cde492906088caa3a9e5eee449bc12 --- folly/test/SingletonBenchmark.cpp | 2 ++ folly/test/SingletonTest.cpp | 2 ++ folly/test/SubprocessTest.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/folly/test/SingletonBenchmark.cpp b/folly/test/SingletonBenchmark.cpp index 5fa38e4b..06147e5a 100644 --- a/folly/test/SingletonBenchmark.cpp +++ b/folly/test/SingletonBenchmark.cpp @@ -24,6 +24,8 @@ #include <folly/Memory.h> #include <folly/portability/GFlags.h> +FOLLY_GCC_DISABLE_WARNING(deprecated-declarations) + using namespace folly; // Benchmarking a normal singleton vs a Meyers singleton vs a Folly diff --git a/folly/test/SingletonTest.cpp b/folly/test/SingletonTest.cpp index 36eb9f6b..aa068911 100644 --- a/folly/test/SingletonTest.cpp +++ b/folly/test/SingletonTest.cpp @@ -30,6 +30,8 @@ #include <glog/logging.h> #include <boost/thread/barrier.hpp> +FOLLY_GCC_DISABLE_WARNING(deprecated-declarations) + using namespace folly; TEST(Singleton, MissingSingleton) { diff --git a/folly/test/SubprocessTest.cpp b/folly/test/SubprocessTest.cpp index 66b18319..3d29c972 100644 --- a/folly/test/SubprocessTest.cpp +++ b/folly/test/SubprocessTest.cpp @@ -33,6 +33,8 @@ #include <folly/portability/GTest.h> #include <folly/portability/Unistd.h> +FOLLY_GCC_DISABLE_WARNING(deprecated-declarations) + using namespace folly; TEST(SimpleSubprocessTest, ExitsSuccessfully) { -- 2.34.1