Lift the invoke helper in Function.h
[folly.git] / folly / test / Makefile.am
1 SUBDIRS = . function_benchmark
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 CPPFLAGS += -isystem gtest/googletest/include -isystem gtest/googlemock/include
6
7 TESTS= \
8         sorted_vector_types_test \
9         foreach_test \
10         hash_test \
11         timeout_queue_test \
12         conv_test \
13         expected_test \
14         range_test \
15         math_test \
16         bits_test \
17         bit_iterator_test
18
19 check_LTLIBRARIES = libfollytestmain.la libgtest.la
20 check_PROGRAMS =
21 noinst_LTLIBRARIES = thread_local_test_lib.la
22
23 libgtest_la_CPPFLAGS = -isystem gtest/googletest
24 libgtest_la_SOURCES = gtest/googletest/src/gtest-all.cc
25
26 if FOLLY_TESTMAIN
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
30 else
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
34 endif
35
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
40
41 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
42         FBVectorTestBenchmarks.cpp.h
43
44 spin_lock_test_SOURCES = SpinLockTest.cpp
45 spin_lock_test_LDADD = libfollytestmain.la
46 TESTS += spin_lock_test
47
48 array_test_SOURCES = ArrayTest.cpp
49 array_test_LDADD = libfollytestmain.la
50 TESTS += array_test
51
52 constexpr_math_test_SOURCES = ConstexprMathTest.cpp
53 constexpr_math_test_LDADD = libfollytestmain.la
54 TESTS += constexpr_math_test
55
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
60
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
65
66 small_vector_test_SOURCES = small_vector_test.cpp
67 small_vector_test_LDADD = libfollytestmain.la
68 TESTS += small_vector_test
69
70 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
71 discriminated_ptr_test_LDADD = libfollytestmain.la
72 TESTS += discriminated_ptr_test
73
74 if !HAVE_PPC64
75 cpuid_test_SOURCES = CpuIdTest.cpp
76 cpuid_test_LDADD = libfollytestmain.la
77 TESTS += cpuid_test
78 endif
79 endif
80
81 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
82 sorted_vector_types_test_LDADD = libfollytestmain.la
83
84
85 foreach_test_SOURCES = ForeachTest.cpp
86 foreach_test_LDADD = libfollytestmain.la
87
88 foreach_benchmark_SOURCES = ForeachBenchmark.cpp
89 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
90 check_PROGRAMS += foreach_benchmark
91
92 hash_test_SOURCES = HashTest.cpp
93 hash_test_LDADD = libfollytestmain.la
94
95 invoke_test_SOURCES = ../functional/test/InvokeTest.cpp
96 invoke_test_LDADD = libfollytestmain.la
97
98 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
99 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
100 TESTS += fbstring_test_using_jemalloc
101
102 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
103 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
104
105 thread_id_test_SOURCES = ThreadIdTest.cpp
106 thread_id_test_LDADD = libfollytestmain.la
107 TESTS += thread_id_test
108
109 thread_local_test_SOURCES = ThreadLocalTest.cpp
110 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
111 thread_local_test_LDFLAGS = -ldl
112 TESTS += thread_cached_int_test thread_local_test
113
114 fbvector_test_SOURCES = FBVectorTest.cpp
115 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
116 TESTS += fbvector_test
117
118 # fails due to cout
119 dynamic_test_SOURCES = DynamicTest.cpp
120 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
121 TESTS += dynamic_test
122
123 # fails due to cout
124 json_test_SOURCES = JsonTest.cpp
125 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
126 TESTS += json_test
127
128 benchmark_test_SOURCES = BenchmarkTest.cpp
129 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
130 check_PROGRAMS += benchmark_test
131
132 # fails due to destructor
133 scope_guard_test_SOURCES = ScopeGuardTest.cpp
134 scope_guard_test_LDADD = libfollytestmain.la
135 TESTS += scope_guard_test
136
137 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
138 timeout_queue_test_LDADD = libfollytestmain.la
139
140 conv_test_SOURCES = ConvTest.cpp
141 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
142
143 expected_test_SOURCES = ExpectedTest.cpp
144 expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
145
146 range_test_SOURCES = RangeTest.cpp
147 range_test_LDADD = libfollytestmain.la
148
149 math_test_SOURCES = MathTest.cpp
150 math_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
151
152 bits_test_SOURCES = BitsTest.cpp
153 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
154
155 bit_iterator_test_SOURCES = BitIteratorTest.cpp
156 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
157
158 endian_test_SOURCES = EndianTest.cpp
159 endian_test_LDADD = libfollytestmain.la
160 TESTS += endian_test
161
162 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
163 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
164 TESTS += rw_spinlock_test
165
166 synchronized_test_SOURCES = SynchronizedTest.cpp
167 synchronized_test_LDADD = libfollytestmain.la
168 TESTS += synchronized_test
169
170 synchronized_ptr_test_SOURCES = SynchronizedPtrTest.cpp
171 synchronized_ptr_test_LDADD = libfollytestmain.la
172 TESTS += synchronized_ptr_test
173
174 lock_traits_test_SOURCES = LockTraitsTest.cpp
175 lock_traits_test_LDADD = libfollytestmain.la
176 TESTS += lock_traits_test
177
178 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
179 concurrent_skiplist_test_LDADD = libfollytestmain.la
180 TESTS += concurrent_skiplist_test
181
182 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
183 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
184 check_PROGRAMS += concurrent_skiplist_benchmark
185
186 conv_benchmark_SOURCES = ConvBenchmark.cpp
187 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
188 check_PROGRAMS += conv_benchmark
189
190 group_varint_test_SOURCES = GroupVarintTest.cpp
191 group_varint_test_LDADD = libfollytestmain.la
192 TESTS += group_varint_test
193
194 map_util_test_SOURCES = MapUtilTest.cpp
195 map_util_test_LDADD = libfollytestmain.la
196 TESTS += map_util_test
197
198 string_test_SOURCES = StringTest.cpp
199 string_test_LDADD = libfollytestmain.la
200 TESTS += string_test
201
202 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
203 producer_consumer_queue_test_LDADD = libfollytestmain.la
204 TESTS += producer_consumer_queue_test
205
206 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
207 atomic_hash_array_test_LDADD = libfollytestmain.la
208 TESTS += atomic_hash_array_test
209
210 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
211 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
212 TESTS += atomic_hash_map_test
213
214 chrono_test_SOURCES = ChronoTest.cpp
215 chrono_test_LDADD = libfollytestmain.la
216 TESTS += chrono_test
217
218 format_test_SOURCES = FormatTest.cpp
219 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
220 TESTS += format_test
221
222 fingerprint_test_SOURCES = FingerprintTest.cpp
223 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
224 TESTS += fingerprint_test
225
226 portability_test_SOURCES = PortabilityTest.cpp
227 portability_test_LDADD = libfollytestmain.la
228 TESTS += portability_test
229
230 spooky_hash_v1_test_SOURCES = ../hash/test/SpookyHashV1Test.cpp
231 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
232 TESTS += spooky_hash_v1_test
233
234 spooky_hash_v2_test_SOURCES = ../hash/test/SpookyHashV2Test.cpp
235 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
236 TESTS += spooky_hash_v2_test
237
238 token_bucket_test_SOURCES = TokenBucketTest.cpp
239 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
240 TESTS += token_bucket_test
241
242 thread_name_test_SOURCES = ThreadNameTest.cpp
243 thread_name_test_LDADD = libfollytestmain.la
244 TESTS += thread_name_test
245
246 indestructible_test_SOURCES = IndestructibleTest.cpp
247 indestructible_test_LDADD = libfollytestmain.la
248 TESTS += indestructible_test
249
250 portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
251 portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
252 TESTS += portability_clock_gettime_wrappers_test
253
254 portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
255 portability_time_test_LDADD = libfollytestmain.la
256 TESTS += portability_time_test
257
258 portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
259 portability_constexpr_test_LDADD = libfollytestmain.la
260 TESTS += portability_constexpr_test
261
262 portability_openssl_test_SOURCES = ../portability/test/OpenSSLPortabilityTest.cpp
263 portability_openssl_test_LDADD = libfollytestmain.la
264 TESTS += portability_openssl_test
265
266
267 try_test_SOURCES = TryTest.cpp
268 try_test_LDADD = libfollytestmain.la
269 TESTS += try_test
270
271 uncaught_exceptions_test_SOURCES = UncaughtExceptionsTest.cpp
272 uncaught_exceptions_test_LDADD = libfollytestmain.la
273 TESTS += uncaught_exceptions_test
274
275 unit_test_SOURCES = UnitTest.cpp
276 unit_test_LDADD = libfollytestmain.la
277 TESTS += unit_test
278
279 futures_test_SOURCES = \
280     ../futures/test/CallbackLifetimeTest.cpp \
281     ../futures/test/CollectTest.cpp \
282     ../futures/test/ContextTest.cpp \
283     ../futures/test/ConversionOperatorTest.cpp \
284     ../futures/test/CoreTest.cpp \
285     ../futures/test/EnsureTest.cpp \
286     ../futures/test/ExecutorTest.cpp \
287     ../futures/test/FSMTest.cpp \
288     ../futures/test/FilterTest.cpp \
289     ../futures/test/FutureTest.cpp \
290     ../futures/test/HeaderCompileTest.cpp \
291     ../futures/test/InterruptTest.cpp \
292     ../futures/test/MapTest.cpp \
293     ../futures/test/NonCopyableLambdaTest.cpp \
294     ../futures/test/PollTest.cpp \
295     ../futures/test/PromiseTest.cpp \
296     ../futures/test/ReduceTest.cpp \
297     ../futures/test/RetryingTest.cpp \
298     ../futures/test/SelfDestructTest.cpp \
299     ../futures/test/SharedPromiseTest.cpp \
300     ../futures/test/TestExecutorTest.cpp \
301     ../futures/test/ThenCompileTest.cpp \
302     ../futures/test/ThenTest.cpp \
303     ../futures/test/TimekeeperTest.cpp \
304     ../futures/test/TimesTest.cpp \
305     ../futures/test/UnwrapTest.cpp \
306     ../futures/test/ViaTest.cpp \
307     ../futures/test/WaitTest.cpp \
308     ../futures/test/WillEqualTest.cpp \
309     ../futures/test/WindowTest.cpp \
310     ../futures/test/WhenTest.cpp \
311     ../futures/test/WhileDoTest.cpp
312
313 futures_test_LDADD = libfollytestmain.la
314 TESTS += futures_test
315
316 function_test_SOURCES = \
317                 FunctionRefTest.cpp \
318                 FunctionTest.cpp
319 function_test_LDADD = libfollytestmain.la
320 TESTS += function_test
321
322 functional_test_SOURCES = \
323                 FunctionalTest.cpp
324 functional_test_LDADD = libfollytestmain.la
325 TESTS += functional_test
326
327 ssl_test_SOURCES = \
328                 ../ssl/test/OpenSSLHashTest.cpp
329 ssl_test_LDADD = libfollytestmain.la -lcrypto
330 TESTS += ssl_test
331
332 mallctl_helper_test_SOURCES = MallctlHelperTest.cpp
333 mallctl_helper_test_LDADD = libfollytestmain.la
334 TESTS += mallctl_helper_test
335
336 apply_tuple_test_SOURCES = ApplyTupleTest.cpp
337 apply_tuple_test_LDADD = libfollytestmain.la
338 TESTS += apply_tuple_test
339
340 partial_test_SOURCES = PartialTest.cpp
341 partial_test_LDADD = libfollytestmain.la
342 TESTS += partial_test
343
344 singleton_thread_local_test_SOURCES = SingletonThreadLocalTest.cpp
345 singleton_thread_local_test_LDADD = libfollytestmain.la
346 TESTS += singleton_thread_local_test
347
348 utility_test_SOURCES = UtilityTest.cpp
349 utility_test_LDADD = libfollytestmain.la
350 TESTS += utility_test
351
352 iterator_test_SOURCES = IteratorTest.cpp
353 iterator_test_LDADD = libfollytestmain.la
354 TESTS += iterator_test
355
356 check_PROGRAMS += $(TESTS)