1 SUBDIRS = . function_benchmark
3 ACLOCAL_AMFLAGS = -I m4
5 CPPFLAGS += -isystem gtest/googletest/include -isystem gtest/googlemock/include
8 sorted_vector_types_test \
19 check_LTLIBRARIES = libfollytestmain.la libgtest.la
21 noinst_LTLIBRARIES = thread_local_test_lib.la
23 libgtest_la_CPPFLAGS = -isystem gtest/googletest
24 libgtest_la_SOURCES = gtest/googletest/src/gtest-all.cc
27 libfollytestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
28 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) common/TestMain.cpp
29 libfollytestmain_la_LIBADD = $(top_builddir)/init/libfollyinit.la $(top_builddir)/libfolly.la
31 libfollytestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
32 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest/googletest/src/gtest_main.cc
33 libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
36 thread_local_test_lib_la_CPPFLAGS = $(AM_CPPFLAGS)
37 thread_local_test_lib_la_SOURCES = ThreadLocalTestLib.cpp
38 thread_local_test_lib_la_LDFLAGS = -module -rpath /force_shared
39 thread_local_test_lib_la_LIBADD = $(top_builddir)/libfolly.la
41 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
42 FBVectorTestBenchmarks.cpp.h
44 spin_lock_test_SOURCES = SpinLockTest.cpp
45 spin_lock_test_LDADD = libfollytestmain.la
46 TESTS += spin_lock_test
48 array_test_SOURCES = ../container/test/ArrayTest.cpp
49 array_test_LDADD = libfollytestmain.la
52 constexpr_math_test_SOURCES = ConstexprMathTest.cpp
53 constexpr_math_test_LDADD = libfollytestmain.la
54 TESTS += constexpr_math_test
56 if RUN_ARCH_SPECIFIC_TESTS
57 small_locks_test_SOURCES = SmallLocksTest.cpp
58 small_locks_test_LDADD = libfollytestmain.la
59 TESTS += small_locks_test
61 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
62 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
63 packed_sync_ptr_test_LDADD = libfollytestmain.la
64 TESTS += packed_sync_ptr_test
66 small_vector_test_SOURCES = small_vector_test.cpp
67 small_vector_test_LDADD = libfollytestmain.la
68 TESTS += small_vector_test
70 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
71 discriminated_ptr_test_LDADD = libfollytestmain.la
72 TESTS += discriminated_ptr_test
75 cpuid_test_SOURCES = CpuIdTest.cpp
76 cpuid_test_LDADD = libfollytestmain.la
81 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
82 sorted_vector_types_test_LDADD = libfollytestmain.la
83 TESTS += sorted_vector_types_test
85 container_access_test_SOURCES = ../container/test/AccessTest.cpp
86 container_access_test_LDADD = libfollytestmain.la
87 TESTS += container_access_test
89 foreach_test_SOURCES = ../container/test/ForeachTest.cpp
90 foreach_test_LDADD = libfollytestmain.la
93 foreach_benchmark_SOURCES = ../container/test/ForeachBenchmark.cpp
94 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
95 check_PROGRAMS += foreach_benchmark
97 hash_test_SOURCES = ../hash/test/HashTest.cpp
98 hash_test_LDADD = libfollytestmain.la
101 invoke_test_SOURCES = ../functional/test/InvokeTest.cpp
102 invoke_test_LDADD = libfollytestmain.la
105 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
106 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
107 TESTS += fbstring_test_using_jemalloc
109 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
110 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
111 TESTS += thread_cached_int_test
113 thread_id_test_SOURCES = ../system/test/ThreadIdTest.cpp
114 thread_id_test_LDADD = libfollytestmain.la
115 TESTS += thread_id_test
117 thread_local_test_SOURCES = ThreadLocalTest.cpp
118 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
119 thread_local_test_LDFLAGS = -ldl
120 TESTS += thread_cached_int_test thread_local_test
122 fbvector_test_SOURCES = FBVectorTest.cpp
123 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
124 TESTS += fbvector_test
127 dynamic_test_SOURCES = DynamicTest.cpp
128 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
129 TESTS += dynamic_test
132 json_test_SOURCES = JsonTest.cpp
133 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
136 benchmark_test_SOURCES = BenchmarkTest.cpp
137 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
138 check_PROGRAMS += benchmark_test
140 # fails due to destructor
141 scope_guard_test_SOURCES = ScopeGuardTest.cpp
142 scope_guard_test_LDADD = libfollytestmain.la
143 TESTS += scope_guard_test
145 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
146 timeout_queue_test_LDADD = libfollytestmain.la
147 TESTS += timeout_queue_test
149 cold_class_test_SOURCES = ../lang/test/ColdClassTest.cpp
150 cold_class_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
151 TESTS += cold_class_test
153 conv_test_SOURCES = ConvTest.cpp
154 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
157 expected_test_SOURCES = ExpectedTest.cpp
158 expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
159 TESTS += expected_test
161 range_test_SOURCES = RangeTest.cpp
162 range_test_LDADD = libfollytestmain.la
165 math_test_SOURCES = MathTest.cpp
166 math_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
169 bits_test_SOURCES = ../lang/test/BitsTest.cpp
170 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
173 bit_iterator_test_SOURCES = ../container/test/BitIteratorTest.cpp
174 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
175 TESTS += bit_iterator_test
177 endian_test_SOURCES = EndianTest.cpp
178 endian_test_LDADD = libfollytestmain.la
181 rw_spinlock_test_SOURCES = ../synchronization/test/RWSpinLockTest.cpp
182 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
183 TESTS += rw_spinlock_test
185 synchronized_test_SOURCES = SynchronizedTest.cpp
186 synchronized_test_LDADD = libfollytestmain.la
187 TESTS += synchronized_test
189 synchronized_ptr_test_SOURCES = SynchronizedPtrTest.cpp
190 synchronized_ptr_test_LDADD = libfollytestmain.la
191 TESTS += synchronized_ptr_test
193 lock_traits_test_SOURCES = LockTraitsTest.cpp
194 lock_traits_test_LDADD = libfollytestmain.la
195 TESTS += lock_traits_test
197 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
198 concurrent_skiplist_test_LDADD = libfollytestmain.la
199 TESTS += concurrent_skiplist_test
201 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
202 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
203 check_PROGRAMS += concurrent_skiplist_benchmark
205 conv_benchmark_SOURCES = ConvBenchmark.cpp
206 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
207 check_PROGRAMS += conv_benchmark
209 group_varint_test_SOURCES = GroupVarintTest.cpp
210 group_varint_test_LDADD = libfollytestmain.la
211 TESTS += group_varint_test
213 map_util_test_SOURCES = MapUtilTest.cpp
214 map_util_test_LDADD = libfollytestmain.la
215 TESTS += map_util_test
217 string_test_SOURCES = StringTest.cpp
218 string_test_LDADD = libfollytestmain.la
221 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
222 producer_consumer_queue_test_LDADD = libfollytestmain.la
223 TESTS += producer_consumer_queue_test
225 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
226 atomic_hash_array_test_LDADD = libfollytestmain.la
227 TESTS += atomic_hash_array_test
229 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
230 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
231 TESTS += atomic_hash_map_test
233 chrono_test_SOURCES = ChronoTest.cpp
234 chrono_test_LDADD = libfollytestmain.la
237 format_test_SOURCES = FormatTest.cpp
238 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
241 fingerprint_test_SOURCES = FingerprintTest.cpp
242 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
243 TESTS += fingerprint_test
245 if HAVE_VARIABLE_TEMPLATES
246 poly_test_SOURCES = PolyTest.cpp
247 poly_test_LDADD = libfollytestmain.la
251 portability_test_SOURCES = PortabilityTest.cpp
252 portability_test_LDADD = libfollytestmain.la
253 TESTS += portability_test
255 spooky_hash_v1_test_SOURCES = ../hash/test/SpookyHashV1Test.cpp
256 spooky_hash_v1_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
257 TESTS += spooky_hash_v1_test
259 spooky_hash_v2_test_SOURCES = ../hash/test/SpookyHashV2Test.cpp
260 spooky_hash_v2_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
261 TESTS += spooky_hash_v2_test
263 token_bucket_test_SOURCES = TokenBucketTest.cpp
264 token_bucket_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
265 TESTS += token_bucket_test
267 thread_name_test_SOURCES = ../system/test/ThreadNameTest.cpp
268 thread_name_test_LDADD = libfollytestmain.la
269 TESTS += thread_name_test
271 indestructible_test_SOURCES = IndestructibleTest.cpp
272 indestructible_test_LDADD = libfollytestmain.la
273 TESTS += indestructible_test
275 portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
276 portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
277 TESTS += portability_clock_gettime_wrappers_test
279 portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
280 portability_time_test_LDADD = libfollytestmain.la
281 TESTS += portability_time_test
283 portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
284 portability_constexpr_test_LDADD = libfollytestmain.la
285 TESTS += portability_constexpr_test
287 portability_openssl_test_SOURCES = ../portability/test/OpenSSLPortabilityTest.cpp
288 portability_openssl_test_LDADD = libfollytestmain.la
289 TESTS += portability_openssl_test
292 try_test_SOURCES = TryTest.cpp
293 try_test_LDADD = libfollytestmain.la
296 typelist_test_SOURCES = TypeListTest.cpp
297 typelist_test_LDADD = libfollytestmain.la
298 TESTS += typelist_test
300 uncaught_exceptions_test_SOURCES = UncaughtExceptionsTest.cpp
301 uncaught_exceptions_test_LDADD = libfollytestmain.la
302 TESTS += uncaught_exceptions_test
304 unit_test_SOURCES = UnitTest.cpp
305 unit_test_LDADD = libfollytestmain.la
308 futures_test_SOURCES = \
309 ../futures/test/CallbackLifetimeTest.cpp \
310 ../futures/test/CollectTest.cpp \
311 ../futures/test/ContextTest.cpp \
312 ../futures/test/ConversionOperatorTest.cpp \
313 ../futures/test/CoreTest.cpp \
314 ../futures/test/EnsureTest.cpp \
315 ../futures/test/FSMTest.cpp \
316 ../futures/test/FilterTest.cpp \
317 ../futures/test/FutureTest.cpp \
318 ../futures/test/HeaderCompileTest.cpp \
319 ../futures/test/InterruptTest.cpp \
320 ../futures/test/MapTest.cpp \
321 ../futures/test/NonCopyableLambdaTest.cpp \
322 ../futures/test/PollTest.cpp \
323 ../futures/test/PromiseTest.cpp \
324 ../futures/test/ReduceTest.cpp \
325 ../futures/test/RetryingTest.cpp \
326 ../futures/test/SelfDestructTest.cpp \
327 ../futures/test/SharedPromiseTest.cpp \
328 ../futures/test/TestExecutorTest.cpp \
329 ../futures/test/ThenCompileTest.cpp \
330 ../futures/test/ThenTest.cpp \
331 ../futures/test/TimekeeperTest.cpp \
332 ../futures/test/TimesTest.cpp \
333 ../futures/test/UnwrapTest.cpp \
334 ../futures/test/ViaTest.cpp \
335 ../futures/test/WaitTest.cpp \
336 ../futures/test/WillEqualTest.cpp \
337 ../futures/test/WindowTest.cpp \
338 ../futures/test/WhenTest.cpp \
339 ../futures/test/WhileDoTest.cpp
341 futures_test_LDADD = libfollytestmain.la
342 TESTS += futures_test
344 function_test_SOURCES = \
345 FunctionRefTest.cpp \
347 function_test_LDADD = libfollytestmain.la
348 TESTS += function_test
350 rvalue_reference_wrapper_test_SOURCES = \
351 ../lang/test/RValueReferenceWrapperTest.cpp
352 rvalue_reference_wrapper_test_LDADD = libfollytestmain.la
353 TESTS += rvalue_reference_wrapper_test
356 ../ssl/test/OpenSSLHashTest.cpp
357 ssl_test_LDADD = libfollytestmain.la -lcrypto
360 mallctl_helper_test_SOURCES = ../memory/test/MallctlHelperTest.cpp
361 mallctl_helper_test_LDADD = libfollytestmain.la
362 TESTS += mallctl_helper_test
364 apply_tuple_test_SOURCES = ../functional/test/ApplyTupleTest.cpp
365 apply_tuple_test_LDADD = libfollytestmain.la
366 TESTS += apply_tuple_test
368 partial_test_SOURCES = ../functional/test/PartialTest.cpp
369 partial_test_LDADD = libfollytestmain.la
370 TESTS += partial_test
372 singleton_thread_local_test_SOURCES = SingletonThreadLocalTest.cpp
373 singleton_thread_local_test_LDADD = libfollytestmain.la
374 TESTS += singleton_thread_local_test
376 utility_test_SOURCES = UtilityTest.cpp
377 utility_test_LDADD = libfollytestmain.la
378 TESTS += utility_test
380 iterator_test_SOURCES = ../container/test/IteratorTest.cpp
381 iterator_test_LDADD = libfollytestmain.la
382 TESTS += iterator_test
384 check_PROGRAMS += $(TESTS)