From: Peter Griess Date: Thu, 26 Sep 2013 14:53:39 +0000 (-0500) Subject: Disable timed sychronization tests on Apple platforms. X-Git-Tag: v0.22.0~843 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b97d804d4b52130e5150e572bf9947402de3fee2;p=folly.git 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 --- 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(); }