Commit c7c75855 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Guard the PThread thread name test with FOLLY_HAVE_PTHREAD

Summary: Not all platforms have pthread.

Reviewed By: yfeldblum

Differential Revision: D9565232

fbshipit-source-id: fced220115315f976dbea8c037869cb6aef461fd
parent 78b850be
...@@ -42,6 +42,7 @@ TEST(ThreadName, getCurrentThreadName) { ...@@ -42,6 +42,7 @@ TEST(ThreadName, getCurrentThreadName) {
SCOPE_EXIT { th.join(); }; SCOPE_EXIT { th.join(); };
} }
#if FOLLY_HAVE_PTHREAD
TEST(ThreadName, setThreadName_other_pthread) { TEST(ThreadName, setThreadName_other_pthread) {
Baton<> handle_set; Baton<> handle_set;
Baton<> let_thread_end; Baton<> let_thread_end;
...@@ -57,6 +58,7 @@ TEST(ThreadName, setThreadName_other_pthread) { ...@@ -57,6 +58,7 @@ TEST(ThreadName, setThreadName_other_pthread) {
EXPECT_EQ( EXPECT_EQ(
expectedSetOtherThreadNameResult, setThreadName(handle, kThreadName)); expectedSetOtherThreadNameResult, setThreadName(handle, kThreadName));
} }
#endif
TEST(ThreadName, setThreadName_other_id) { TEST(ThreadName, setThreadName_other_id) {
Baton<> let_thread_end; Baton<> let_thread_end;
......
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