From b97d804d4b52130e5150e572bf9947402de3fee2 Mon Sep 17 00:00:00 2001 From: Peter Griess Date: Thu, 26 Sep 2013 09:53:39 -0500 Subject: [PATCH] Disable timed sychronization tests on Apple platforms. Summary: - Apple doesn't provide timed sychronization primitives. We already handle this in Sychronization.h, but our unit tests were being run for all platforms. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D998581 --- folly/test/SynchronizedTest.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/folly/test/SynchronizedTest.cpp b/folly/test/SynchronizedTest.cpp index 197f8736..37296adb 100644 --- a/folly/test/SynchronizedTest.cpp +++ b/folly/test/SynchronizedTest.cpp @@ -27,66 +27,91 @@ TEST(Synchronized, Basic) { testBasic(); testBasic(); +#ifndef __APPLE__ testBasic(); testBasic(); +#endif +#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_ testBasic(); +#endif testBasic(); testBasic(); testBasic(); +#ifndef __APPLE__ testBasic(); testBasic(); +#endif } TEST(Synchronized, Concurrency) { testConcurrency(); testConcurrency(); +#ifndef __APPLE__ testConcurrency(); testConcurrency(); +#endif +#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_ testConcurrency(); +#endif testConcurrency(); testConcurrency(); testConcurrency(); +#ifndef __APPLE__ testConcurrency(); testConcurrency(); +#endif } TEST(Synchronized, DualLocking) { testDualLocking(); testDualLocking(); +#ifndef __APPLE__ testDualLocking(); testDualLocking(); +#endif +#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_ testDualLocking(); +#endif testDualLocking(); testDualLocking(); testDualLocking(); +#ifndef __APPLE__ testDualLocking(); testDualLocking(); +#endif } TEST(Synchronized, DualLockingWithConst) { testDualLockingWithConst(); testDualLockingWithConst(); +#ifndef __APPLE__ testDualLockingWithConst(); testDualLockingWithConst(); +#endif +#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_ testDualLockingWithConst(); +#endif testDualLockingWithConst(); testDualLockingWithConst(); testDualLockingWithConst(); +#ifndef __APPLE__ testDualLockingWithConst(); testDualLockingWithConst(); +#endif } +#ifndef __APPLE__ TEST(Synchronized, TimedSynchronized) { testTimedSynchronized(); testTimedSynchronized(); @@ -95,12 +120,15 @@ TEST(Synchronized, TimedSynchronized) { testTimedSynchronized(); testTimedSynchronized(); } +#endif TEST(Synchronized, ConstCopy) { +#ifndef __APPLE__ testConstCopy(); testConstCopy(); testConstCopy(); testConstCopy(); +#endif testConstCopy(); } -- 2.34.1