Fix wrong source name in tests Makefile
[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 = ../container/test/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 TESTS += sorted_vector_types_test
84
85 container_access_test_SOURCES = ../container/test/AccessTest.cpp
86 container_access_test_LDADD = libfollytestmain.la
87 TESTS += container_access_test
88
89 foreach_test_SOURCES = ../container/test/ForeachTest.cpp
90 foreach_test_LDADD = libfollytestmain.la
91 TESTS += foreach_test
92
93 foreach_benchmark_SOURCES = ../container/test/ForeachBenchmark.cpp
94 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
95 check_PROGRAMS += foreach_benchmark
96
97 hash_test_SOURCES = ../hash/test/HashTest.cpp
98 hash_test_LDADD = libfollytestmain.la
99 TESTS += hash_test
100
101 invoke_test_SOURCES = ../functional/test/InvokeTest.cpp
102 invoke_test_LDADD = libfollytestmain.la
103 TESTS += invoke_test
104
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
108
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
112
113 thread_id_test_SOURCES = ../system/test/ThreadIdTest.cpp
114 thread_id_test_LDADD = libfollytestmain.la
115 TESTS += thread_id_test
116
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
121
122 fbvector_test_SOURCES = FBVectorTest.cpp
123 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
124 TESTS += fbvector_test
125
126 # fails due to cout
127 dynamic_test_SOURCES = DynamicTest.cpp
128 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
129 TESTS += dynamic_test
130
131 # fails due to cout
132 json_test_SOURCES = JsonTest.cpp
133 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
134 TESTS += json_test
135
136 benchmark_test_SOURCES = BenchmarkTest.cpp
137 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
138 check_PROGRAMS += benchmark_test
139
140 # fails due to destructor
141 scope_guard_test_SOURCES = ScopeGuardTest.cpp
142 scope_guard_test_LDADD = libfollytestmain.la
143 TESTS += scope_guard_test
144
145 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
146 timeout_queue_test_LDADD = libfollytestmain.la
147 TESTS += timeout_queue_test
148
149 conv_test_SOURCES = ConvTest.cpp
150 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
151 TESTS += conv_test
152
153 expected_test_SOURCES = ExpectedTest.cpp
154 expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
155 TESTS += expected_test
156
157 range_test_SOURCES = RangeTest.cpp
158 range_test_LDADD = libfollytestmain.la
159 TESTS += range_test
160
161 math_test_SOURCES = MathTest.cpp
162 math_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
163 TESTS += math_test
164
165 bits_test_SOURCES = BitsTest.cpp
166 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
167 TESTS += bits_test
168
169 bit_iterator_test_SOURCES = BitIteratorTest.cpp
170 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
171 TESTS += bit_iterator_test
172
173 endian_test_SOURCES = EndianTest.cpp
174 endian_test_LDADD = libfollytestmain.la
175 TESTS += endian_test
176
177 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
178 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
179 TESTS += rw_spinlock_test
180
181 synchronized_test_SOURCES = SynchronizedTest.cpp
182 synchronized_test_LDADD = libfollytestmain.la
183 TESTS += synchronized_test
184
185 synchronized_ptr_test_SOURCES = SynchronizedPtrTest.cpp
186 synchronized_ptr_test_LDADD = libfollytestmain.la
187 TESTS += synchronized_ptr_test
188
189 lock_traits_test_SOURCES = LockTraitsTest.cpp
190 lock_traits_test_LDADD = libfollytestmain.la
191 TESTS += lock_traits_test
192
193 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
194 concurrent_skiplist_test_LDADD = libfollytestmain.la
195 TESTS += concurrent_skiplist_test
196
197 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
198 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
199 check_PROGRAMS += concurrent_skiplist_benchmark
200
201 conv_benchmark_SOURCES = ConvBenchmark.cpp
202 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
203 check_PROGRAMS += conv_benchmark
204
205 group_varint_test_SOURCES = GroupVarintTest.cpp
206 group_varint_test_LDADD = libfollytestmain.la
207 TESTS += group_varint_test
208
209 map_util_test_SOURCES = MapUtilTest.cpp
210 map_util_test_LDADD = libfollytestmain.la
211 TESTS += map_util_test
212
213 string_test_SOURCES = StringTest.cpp
214 string_test_LDADD = libfollytestmain.la
215 TESTS += string_test
216
217 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
218 producer_consumer_queue_test_LDADD = libfollytestmain.la
219 TESTS += producer_consumer_queue_test
220
221 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
222 atomic_hash_array_test_LDADD = libfollytestmain.la
223 TESTS += atomic_hash_array_test
224
225 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
226 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
227 TESTS += atomic_hash_map_test
228
229 chrono_test_SOURCES = ChronoTest.cpp
230 chrono_test_LDADD = libfollytestmain.la
231 TESTS += chrono_test
232
233 format_test_SOURCES = FormatTest.cpp
234 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
235 TESTS += format_test
236
237 fingerprint_test_SOURCES = FingerprintTest.cpp
238 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
239 TESTS += fingerprint_test
240
241 if HAVE_VARIABLE_TEMPLATES
242 poly_test_SOURCES = PolyTest.cpp
243 poly_test_LDADD = libfollytestmain.la
244 TESTS += poly_test
245 endif
246
247 portability_test_SOURCES = PortabilityTest.cpp
248 portability_test_LDADD = libfollytestmain.la
249 TESTS += portability_test
250
251 spooky_hash_v1_test_SOURCES = ../hash/test/SpookyHashV1Test.cpp
252 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
253 TESTS += spooky_hash_v1_test
254
255 spooky_hash_v2_test_SOURCES = ../hash/test/SpookyHashV2Test.cpp
256 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
257 TESTS += spooky_hash_v2_test
258
259 token_bucket_test_SOURCES = TokenBucketTest.cpp
260 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
261 TESTS += token_bucket_test
262
263 thread_name_test_SOURCES = ../system/test/ThreadNameTest.cpp
264 thread_name_test_LDADD = libfollytestmain.la
265 TESTS += thread_name_test
266
267 indestructible_test_SOURCES = IndestructibleTest.cpp
268 indestructible_test_LDADD = libfollytestmain.la
269 TESTS += indestructible_test
270
271 portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
272 portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
273 TESTS += portability_clock_gettime_wrappers_test
274
275 portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
276 portability_time_test_LDADD = libfollytestmain.la
277 TESTS += portability_time_test
278
279 portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
280 portability_constexpr_test_LDADD = libfollytestmain.la
281 TESTS += portability_constexpr_test
282
283 portability_openssl_test_SOURCES = ../portability/test/OpenSSLPortabilityTest.cpp
284 portability_openssl_test_LDADD = libfollytestmain.la
285 TESTS += portability_openssl_test
286
287
288 try_test_SOURCES = TryTest.cpp
289 try_test_LDADD = libfollytestmain.la
290 TESTS += try_test
291
292 typelist_test_SOURCES = TypeListTest.cpp
293 typelist_test_LDADD = libfollytestmain.la
294 TESTS += typelist_test
295
296 uncaught_exceptions_test_SOURCES = UncaughtExceptionsTest.cpp
297 uncaught_exceptions_test_LDADD = libfollytestmain.la
298 TESTS += uncaught_exceptions_test
299
300 unit_test_SOURCES = UnitTest.cpp
301 unit_test_LDADD = libfollytestmain.la
302 TESTS += unit_test
303
304 futures_test_SOURCES = \
305     ../futures/test/CallbackLifetimeTest.cpp \
306     ../futures/test/CollectTest.cpp \
307     ../futures/test/ContextTest.cpp \
308     ../futures/test/ConversionOperatorTest.cpp \
309     ../futures/test/CoreTest.cpp \
310     ../futures/test/EnsureTest.cpp \
311     ../futures/test/FSMTest.cpp \
312     ../futures/test/FilterTest.cpp \
313     ../futures/test/FutureTest.cpp \
314     ../futures/test/HeaderCompileTest.cpp \
315     ../futures/test/InterruptTest.cpp \
316     ../futures/test/MapTest.cpp \
317     ../futures/test/NonCopyableLambdaTest.cpp \
318     ../futures/test/PollTest.cpp \
319     ../futures/test/PromiseTest.cpp \
320     ../futures/test/ReduceTest.cpp \
321     ../futures/test/RetryingTest.cpp \
322     ../futures/test/SelfDestructTest.cpp \
323     ../futures/test/SharedPromiseTest.cpp \
324     ../futures/test/TestExecutorTest.cpp \
325     ../futures/test/ThenCompileTest.cpp \
326     ../futures/test/ThenTest.cpp \
327     ../futures/test/TimekeeperTest.cpp \
328     ../futures/test/TimesTest.cpp \
329     ../futures/test/UnwrapTest.cpp \
330     ../futures/test/ViaTest.cpp \
331     ../futures/test/WaitTest.cpp \
332     ../futures/test/WillEqualTest.cpp \
333     ../futures/test/WindowTest.cpp \
334     ../futures/test/WhenTest.cpp \
335     ../futures/test/WhileDoTest.cpp
336
337 futures_test_LDADD = libfollytestmain.la
338 TESTS += futures_test
339
340 function_test_SOURCES = \
341                 FunctionRefTest.cpp \
342                 FunctionTest.cpp
343 function_test_LDADD = libfollytestmain.la
344 TESTS += function_test
345
346 rvalue_reference_wrapper_test_SOURCES = \
347                 ../lang/test/RValueReferenceWrapperTest.cpp
348 rvalue_reference_wrapper_test_LDADD = libfollytestmain.la
349 TESTS += rvalue_reference_wrapper_test
350
351 ssl_test_SOURCES = \
352                 ../ssl/test/OpenSSLHashTest.cpp
353 ssl_test_LDADD = libfollytestmain.la -lcrypto
354 TESTS += ssl_test
355
356 mallctl_helper_test_SOURCES = ../memory/test/MallctlHelperTest.cpp
357 mallctl_helper_test_LDADD = libfollytestmain.la
358 TESTS += mallctl_helper_test
359
360 apply_tuple_test_SOURCES = ../functional/test/ApplyTupleTest.cpp
361 apply_tuple_test_LDADD = libfollytestmain.la
362 TESTS += apply_tuple_test
363
364 partial_test_SOURCES = ../functional/test/PartialTest.cpp
365 partial_test_LDADD = libfollytestmain.la
366 TESTS += partial_test
367
368 singleton_thread_local_test_SOURCES = SingletonThreadLocalTest.cpp
369 singleton_thread_local_test_LDADD = libfollytestmain.la
370 TESTS += singleton_thread_local_test
371
372 utility_test_SOURCES = UtilityTest.cpp
373 utility_test_LDADD = libfollytestmain.la
374 TESTS += utility_test
375
376 iterator_test_SOURCES = ../container/test/IteratorTest.cpp
377 iterator_test_LDADD = libfollytestmain.la
378 TESTS += iterator_test
379
380 check_PROGRAMS += $(TESTS)