Reorganize the stats directory
[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 if RUN_ARCH_SPECIFIC_TESTS
53 small_locks_test_SOURCES = SmallLocksTest.cpp
54 small_locks_test_LDADD = libfollytestmain.la
55 TESTS += small_locks_test
56
57 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
58 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
59 packed_sync_ptr_test_LDADD = libfollytestmain.la
60 TESTS += packed_sync_ptr_test
61
62 small_vector_test_SOURCES = small_vector_test.cpp
63 small_vector_test_LDADD = libfollytestmain.la
64 TESTS += small_vector_test
65
66 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
67 discriminated_ptr_test_LDADD = libfollytestmain.la
68 TESTS += discriminated_ptr_test
69
70 if !HAVE_PPC64
71 cpuid_test_SOURCES = CpuIdTest.cpp
72 cpuid_test_LDADD = libfollytestmain.la
73 TESTS += cpuid_test
74 endif
75 endif
76
77 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
78 sorted_vector_types_test_LDADD = libfollytestmain.la
79
80
81 foreach_test_SOURCES = ForeachTest.cpp
82 foreach_test_LDADD = libfollytestmain.la
83
84 foreach_benchmark_SOURCES = ForeachBenchmark.cpp
85 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
86 check_PROGRAMS += foreach_benchmark
87
88 hash_test_SOURCES = HashTest.cpp
89 hash_test_LDADD = libfollytestmain.la
90
91
92 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
93 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
94 TESTS += fbstring_test_using_jemalloc
95
96 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
97 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
98
99 thread_id_test_SOURCES = ThreadIdTest.cpp
100 thread_id_test_LDADD = libfollytestmain.la
101
102 thread_local_test_SOURCES = ThreadLocalTest.cpp
103 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
104 thread_local_test_LDFLAGS = -ldl
105 TESTS += thread_cached_int_test thread_local_test
106
107 fbvector_test_SOURCES = FBVectorTest.cpp
108 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
109 TESTS += fbvector_test
110
111 # fails due to cout
112 dynamic_test_SOURCES = DynamicTest.cpp
113 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
114 TESTS += dynamic_test
115
116 # fails due to cout
117 json_test_SOURCES = JsonTest.cpp
118 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
119 TESTS += json_test
120
121 benchmark_test_SOURCES = BenchmarkTest.cpp
122 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
123 check_PROGRAMS += benchmark_test
124
125 # fails due to destructor
126 scope_guard_test_SOURCES = ScopeGuardTest.cpp
127 scope_guard_test_LDADD = libfollytestmain.la
128 TESTS += scope_guard_test
129
130 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
131 timeout_queue_test_LDADD = libfollytestmain.la
132
133 conv_test_SOURCES = ConvTest.cpp
134 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
135
136 expected_test_SOURCES = ExpectedTest.cpp
137 expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
138
139 range_test_SOURCES = RangeTest.cpp
140 range_test_LDADD = libfollytestmain.la
141
142 math_test_SOURCES = MathTest.cpp
143 math_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
144
145 bits_test_SOURCES = BitsTest.cpp
146 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
147
148 bit_iterator_test_SOURCES = BitIteratorTest.cpp
149 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
150
151 endian_test_SOURCES = EndianTest.cpp
152 endian_test_LDADD = libfollytestmain.la
153 TESTS += endian_test
154
155 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
156 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
157 TESTS += rw_spinlock_test
158
159 synchronized_test_SOURCES = SynchronizedTest.cpp
160 synchronized_test_LDADD = libfollytestmain.la
161 TESTS += synchronized_test
162
163 lock_traits_test_SOURCES = LockTraitsTest.cpp
164 lock_traits_test_LDADD = libfollytestmain.la
165 TESTS += lock_traits_test
166
167 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
168 concurrent_skiplist_test_LDADD = libfollytestmain.la
169 TESTS += concurrent_skiplist_test
170
171 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
172 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
173 check_PROGRAMS += concurrent_skiplist_benchmark
174
175 conv_benchmark_SOURCES = ConvBenchmark.cpp
176 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
177 check_PROGRAMS += conv_benchmark
178
179 group_varint_test_SOURCES = GroupVarintTest.cpp
180 group_varint_test_LDADD = libfollytestmain.la
181 TESTS += group_varint_test
182
183 map_util_test_SOURCES = MapUtilTest.cpp
184 map_util_test_LDADD = libfollytestmain.la
185 TESTS += map_util_test
186
187 string_test_SOURCES = StringTest.cpp
188 string_test_LDADD = libfollytestmain.la
189 TESTS += string_test
190
191 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
192 producer_consumer_queue_test_LDADD = libfollytestmain.la
193 TESTS += producer_consumer_queue_test
194
195 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
196 atomic_hash_array_test_LDADD = libfollytestmain.la
197 TESTS += atomic_hash_array_test
198
199 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
200 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
201 TESTS += atomic_hash_map_test
202
203 chrono_test_SOURCES = ChronoTest.cpp
204 chrono_test_LDADD = libfollytestmain.la
205 TESTS += chrono_test
206
207 format_test_SOURCES = FormatTest.cpp
208 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
209 TESTS += format_test
210
211 fingerprint_test_SOURCES = FingerprintTest.cpp
212 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
213 TESTS += fingerprint_test
214
215 portability_test_SOURCES = PortabilityTest.cpp
216 portability_test_LDADD = libfollytestmain.la
217 TESTS += portability_test
218
219 spooky_hash_v1_test_SOURCES = SpookyHashV1Test.cpp
220 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
221 TESTS += spooky_hash_v1_test
222
223 spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
224 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
225 TESTS += spooky_hash_v2_test
226
227 token_bucket_test_SOURCES = TokenBucketTest.cpp
228 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
229 TESTS += token_bucket_test
230
231 thread_name_test_SOURCES = ThreadNameTest.cpp
232 thread_name_test_LDADD = libfollytestmain.la
233 TESTS += thread_name_test
234
235 indestructible_test_SOURCES = IndestructibleTest.cpp
236 indestructible_test_LDADD = libfollytestmain.la
237 TESTS += indestructible_test
238
239 portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
240 portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
241 TESTS += portability_clock_gettime_wrappers_test
242
243 portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
244 portability_time_test_LDADD = libfollytestmain.la
245 TESTS += portability_time_test
246
247 portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
248 portability_constexpr_test_LDADD = libfollytestmain.la
249 TESTS += portability_constexpr_test
250
251 try_test_SOURCES = TryTest.cpp
252 try_test_LDADD = libfollytestmain.la
253 TESTS += try_test
254
255 uncaught_exceptions_test_SOURCES = UncaughtExceptionsTest.cpp
256 uncaught_exceptions_test_LDADD = libfollytestmain.la
257 TESTS += uncaught_exceptions_test
258
259 unit_test_SOURCES = UnitTest.cpp
260 unit_test_LDADD = libfollytestmain.la
261 TESTS += unit_test
262
263 futures_test_SOURCES = \
264     ../futures/test/CallbackLifetimeTest.cpp \
265     ../futures/test/CollectTest.cpp \
266     ../futures/test/ContextTest.cpp \
267     ../futures/test/CoreTest.cpp \
268     ../futures/test/EnsureTest.cpp \
269     ../futures/test/ExecutorTest.cpp \
270     ../futures/test/FSMTest.cpp \
271     ../futures/test/FilterTest.cpp \
272     ../futures/test/FutureTest.cpp \
273     ../futures/test/HeaderCompileTest.cpp \
274     ../futures/test/InterruptTest.cpp \
275     ../futures/test/MapTest.cpp \
276     ../futures/test/NonCopyableLambdaTest.cpp \
277     ../futures/test/PollTest.cpp \
278     ../futures/test/PromiseTest.cpp \
279     ../futures/test/ReduceTest.cpp \
280     ../futures/test/RetryingTest.cpp \
281     ../futures/test/SelfDestructTest.cpp \
282     ../futures/test/SharedPromiseTest.cpp \
283     ../futures/test/TestExecutorTest.cpp \
284     ../futures/test/ThenCompileTest.cpp \
285     ../futures/test/ThenTest.cpp \
286     ../futures/test/TimekeeperTest.cpp \
287     ../futures/test/TimesTest.cpp \
288     ../futures/test/UnwrapTest.cpp \
289     ../futures/test/ViaTest.cpp \
290     ../futures/test/WaitTest.cpp \
291     ../futures/test/WillEqualTest.cpp \
292     ../futures/test/WindowTest.cpp \
293     ../futures/test/WhenTest.cpp \
294     ../futures/test/WhileDoTest.cpp
295
296 futures_test_LDADD = libfollytestmain.la
297 TESTS += futures_test
298
299 function_test_SOURCES = \
300                 FunctionRefTest.cpp \
301                 FunctionTest.cpp
302 function_test_LDADD = libfollytestmain.la
303 TESTS += function_test
304
305 functional_test_SOURCES = \
306                 FunctionalTest.cpp
307 functional_test_LDADD = libfollytestmain.la
308 TESTS += functional_test
309
310 ssl_test_SOURCES = \
311                 ../ssl/test/OpenSSLHashTest.cpp
312 ssl_test_LDADD = libfollytestmain.la -lcrypto
313 TESTS += ssl_test
314
315 mallctl_helper_test_SOURCES = MallctlHelperTest.cpp
316 mallctl_helper_test_LDADD = libfollytestmain.la
317 TESTS += mallctl_helper_test
318
319 apply_tuple_test_SOURCES = ApplyTupleTest.cpp
320 apply_tuple_test_LDADD = libfollytestmain.la
321 TESTS += apply_tuple_test
322
323 partial_test_SOURCES = PartialTest.cpp
324 partial_test_LDADD = libfollytestmain.la
325 TESTS += partial_test
326
327 singleton_thread_local_test_SOURCES = SingletonThreadLocalTest.cpp
328 singleton_thread_local_test_LDADD = libfollytestmain.la
329 TESTS += singleton_thread_local_test
330
331 utility_test_SOURCES = UtilityTest.cpp
332 utility_test_LDADD = libfollytestmain.la
333 TESTS += utility_test
334
335 iterator_test_SOURCES = IteratorTest.cpp
336 iterator_test_LDADD = libfollytestmain.la
337 TESTS += iterator_test
338
339 check_PROGRAMS += $(TESTS)