From: Michael Lee Date: Tue, 15 Mar 2016 01:54:37 +0000 (-0700) Subject: Missing guards for FOLLY_TLS in test X-Git-Tag: 2016.07.26~442 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f4a80a41dfe13820e810d539b5c97d0360680f40;p=folly.git Missing guards for FOLLY_TLS in test Summary:defined(FOLLY_TLS) is guarded once in the test, so we should guard for it throughout. Also a missing header for some platforms. Reviewed By: yfeldblum Differential Revision: D3049797 fb-gh-sync-id: 5d66c71dda94c57a2e50aee96d55be1c574bf921 shipit-source-id: 5d66c71dda94c57a2e50aee96d55be1c574bf921 --- diff --git a/folly/test/ApplyTupleTest.cpp b/folly/test/ApplyTupleTest.cpp index 395cdfed..aad25c11 100644 --- a/folly/test/ApplyTupleTest.cpp +++ b/folly/test/ApplyTupleTest.cpp @@ -19,6 +19,7 @@ #include #include +#include #include // this placates visual studio stupidity - see diff --git a/folly/test/CacheLocalityTest.cpp b/folly/test/CacheLocalityTest.cpp index eb600fe6..9c326fde 100644 --- a/folly/test/CacheLocalityTest.cpp +++ b/folly/test/CacheLocalityTest.cpp @@ -387,6 +387,7 @@ TEST(ThreadId, SimplePthread) { EXPECT_EQ(cpu, again); } +#ifdef FOLLY_TLS static FOLLY_TLS unsigned testingCpu = 0; static int testingGetcpu(unsigned* cpu, unsigned* node, void* /* unused */) { @@ -398,6 +399,7 @@ static int testingGetcpu(unsigned* cpu, unsigned* node, void* /* unused */) { } return 0; } +#endif TEST(AccessSpreader, Simple) { for (size_t s = 1; s < 200; ++s) { @@ -405,6 +407,7 @@ TEST(AccessSpreader, Simple) { } } +#ifdef FOLLY_TLS #define DECLARE_SPREADER_TAG(tag, locality, func) \ namespace { \ template \ @@ -442,3 +445,4 @@ TEST(AccessSpreader, Wrapping) { } } } +#endif