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