Introducing folly::partial
[folly.git] / folly / test / Makefile.am
1 SUBDIRS = . function_benchmark
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 CPPFLAGS += -Igtest-1.7.0/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         bits_test \
16         bit_iterator_test
17
18 check_LTLIBRARIES = libfollytestmain.la libgtest.la
19 check_PROGRAMS =
20 noinst_LTLIBRARIES = lib_thread_local_test.la
21
22 libgtest_la_CPPFLAGS = -Igtest-1.7.0 -Igtest-1.7.0/src
23 libgtest_la_SOURCES = gtest-1.7.0/src/gtest-all.cc
24
25 if FOLLY_TESTMAIN
26 libfollytestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
27 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) common/TestMain.cpp
28 libfollytestmain_la_LIBADD = $(top_builddir)/init/libfollyinit.la $(top_builddir)/libfolly.la
29 else
30 libfollytestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
31 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest-1.7.0/src/gtest_main.cc
32 libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
33 endif
34
35 lib_thread_local_test_la_CPPFLAGS = $(AM_CPPFLAGS)
36 lib_thread_local_test_la_SOURCES = ThreadLocalTestLib.cpp
37 lib_thread_local_test_la_LDFLAGS = -rpath /force_shared
38 lib_thread_local_test_la_LIBADD = $(top_builddir)/libfolly.la
39
40 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
41         FBVectorTestBenchmarks.cpp.h
42
43 spin_lock_test_SOURCES = SpinLockTest.cpp
44 spin_lock_test_LDADD = libfollytestmain.la
45 TESTS += spin_lock_test
46
47 array_test_SOURCES = ArrayTest.cpp
48 array_test_LDADD = libfollytestmain.la
49 TESTS += array_test
50
51 if RUN_ARCH_SPECIFIC_TESTS
52 small_locks_test_SOURCES = SmallLocksTest.cpp
53 small_locks_test_LDADD = libfollytestmain.la
54 TESTS += small_locks_test
55
56 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
57 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
58 packed_sync_ptr_test_LDADD = libfollytestmain.la
59 TESTS += packed_sync_ptr_test
60
61 small_vector_test_SOURCES = small_vector_test.cpp
62 small_vector_test_LDADD = libfollytestmain.la
63 TESTS += small_vector_test
64
65 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
66 discriminated_ptr_test_LDADD = libfollytestmain.la
67 TESTS += discriminated_ptr_test
68
69 if !HAVE_PPC64
70 cpuid_test_SOURCES = CpuIdTest.cpp
71 cpuid_test_LDADD = libfollytestmain.la
72 TESTS += cpuid_test
73 endif
74 endif
75
76 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
77 sorted_vector_types_test_LDADD = libfollytestmain.la
78
79
80 foreach_test_SOURCES = ForeachTest.cpp
81 foreach_test_LDADD = libfollytestmain.la
82
83 foreach_benchmark_SOURCES = ForeachBenchmark.cpp
84 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
85 check_PROGRAMS += foreach_benchmark
86
87 hash_test_SOURCES = HashTest.cpp
88 hash_test_LDADD = libfollytestmain.la
89
90
91 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
92 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
93 TESTS += fbstring_test_using_jemalloc
94
95 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
96 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
97
98 thread_local_test_SOURCES = ThreadLocalTest.cpp
99 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
100 thread_local_test_LDFLAGS = -ldl
101 TESTS += thread_cached_int_test thread_local_test
102
103 fbvector_test_SOURCES = FBVectorTest.cpp
104 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
105 TESTS += fbvector_test
106
107 # fails due to cout
108 dynamic_test_SOURCES = DynamicTest.cpp
109 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
110 TESTS += dynamic_test
111
112 # fails due to cout
113 json_test_SOURCES = JsonTest.cpp
114 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
115 TESTS += json_test
116
117 benchmark_test_SOURCES = BenchmarkTest.cpp
118 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
119 check_PROGRAMS += benchmark_test
120
121 # fails due to destructor
122 scope_guard_test_SOURCES = ScopeGuardTest.cpp
123 scope_guard_test_LDADD = libfollytestmain.la
124 TESTS += scope_guard_test
125
126 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
127 timeout_queue_test_LDADD = libfollytestmain.la
128
129 conv_test_SOURCES = ConvTest.cpp
130 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
131
132 expected_test_SOURCES = ExpectedTest.cpp
133 expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
134
135 range_test_SOURCES = RangeTest.cpp
136 range_test_LDADD = libfollytestmain.la
137
138 bits_test_SOURCES = BitsTest.cpp
139 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
140
141 bit_iterator_test_SOURCES = BitIteratorTest.cpp
142 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
143
144 endian_test_SOURCES = EndianTest.cpp
145 endian_test_LDADD = libfollytestmain.la
146 TESTS += endian_test
147
148 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
149 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
150 TESTS += rw_spinlock_test
151
152 synchronized_test_SOURCES = SynchronizedTest.cpp
153 synchronized_test_LDADD = libfollytestmain.la
154 TESTS += synchronized_test
155
156 lock_traits_test_SOURCES = LockTraitsTest.cpp
157 lock_traits_test_LDADD = libfollytestmain.la
158 TESTS += lock_traits_test
159
160 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
161 concurrent_skiplist_test_LDADD = libfollytestmain.la
162 TESTS += concurrent_skiplist_test
163
164 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
165 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
166 check_PROGRAMS += concurrent_skiplist_benchmark
167
168 conv_benchmark_SOURCES = ConvBenchmark.cpp
169 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
170 check_PROGRAMS += conv_benchmark
171
172 histogram_test_SOURCES = HistogramTest.cpp
173 histogram_test_LDADD = libfollytestmain.la
174 TESTS += histogram_test
175
176 group_varint_test_SOURCES = GroupVarintTest.cpp
177 group_varint_test_LDADD = libfollytestmain.la
178 TESTS += group_varint_test
179
180 map_util_test_SOURCES = MapUtilTest.cpp
181 map_util_test_LDADD = libfollytestmain.la
182 TESTS += map_util_test
183
184 string_test_SOURCES = StringTest.cpp
185 string_test_LDADD = libfollytestmain.la
186 TESTS += string_test
187
188 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
189 producer_consumer_queue_test_LDADD = libfollytestmain.la
190 TESTS += producer_consumer_queue_test
191
192 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
193 atomic_hash_array_test_LDADD = libfollytestmain.la
194 TESTS += atomic_hash_array_test
195
196 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
197 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
198 TESTS += atomic_hash_map_test
199
200 format_test_SOURCES = FormatTest.cpp
201 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
202 TESTS += format_test
203
204 fingerprint_test_SOURCES = FingerprintTest.cpp
205 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
206 TESTS += fingerprint_test
207
208 portability_test_SOURCES = PortabilityTest.cpp
209 portability_test_LDADD = libfollytestmain.la
210 TESTS += portability_test
211
212 spooky_hash_v1_test_SOURCES = SpookyHashV1Test.cpp
213 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
214 TESTS += spooky_hash_v1_test
215
216 spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
217 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
218 TESTS += spooky_hash_v2_test
219
220 token_bucket_test_SOURCES = TokenBucketTest.cpp
221 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
222 TESTS += token_bucket_test
223
224 thread_name_test_SOURCES = ThreadNameTest.cpp
225 thread_name_test_LDADD = libfollytestmain.la
226 TESTS += thread_name_test
227
228 indestructible_test_SOURCES = IndestructibleTest.cpp
229 indestructible_test_LDADD = libfollytestmain.la
230 TESTS += indestructible_test
231
232 portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
233 portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
234 TESTS += portability_clock_gettime_wrappers_test
235
236 portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
237 portability_time_test_LDADD = libfollytestmain.la
238 TESTS += portability_time_test
239
240 portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
241 portability_constexpr_test_LDADD = libfollytestmain.la
242 TESTS += portability_constexpr_test
243
244 try_test_SOURCES = TryTest.cpp
245 try_test_LDADD = libfollytestmain.la
246 TESTS += try_test
247
248 unit_test_SOURCES = UnitTest.cpp
249 unit_test_LDADD = libfollytestmain.la
250 TESTS += unit_test
251
252 futures_test_SOURCES = \
253     ../futures/test/CollectTest.cpp \
254     ../futures/test/ContextTest.cpp \
255     ../futures/test/ConversionTest.cpp \
256     ../futures/test/CoreTest.cpp \
257     ../futures/test/EnsureTest.cpp \
258     ../futures/test/ExecutorTest.cpp \
259     ../futures/test/FSMTest.cpp \
260     ../futures/test/FilterTest.cpp \
261     ../futures/test/FutureTest.cpp \
262     ../futures/test/HeaderCompileTest.cpp \
263     ../futures/test/InterruptTest.cpp \
264     ../futures/test/MapTest.cpp \
265     ../futures/test/NonCopyableLambdaTest.cpp \
266     ../futures/test/PollTest.cpp \
267     ../futures/test/PromiseTest.cpp \
268     ../futures/test/ReduceTest.cpp \
269     ../futures/test/RetryingTest.cpp \
270     ../futures/test/SelfDestructTest.cpp \
271     ../futures/test/SharedPromiseTest.cpp \
272     ../futures/test/ThenCompileTest.cpp \
273     ../futures/test/ThenTest.cpp \
274     ../futures/test/TimekeeperTest.cpp \
275     ../futures/test/TimesTest.cpp \
276     ../futures/test/UnwrapTest.cpp \
277     ../futures/test/ViaTest.cpp \
278     ../futures/test/WaitTest.cpp \
279     ../futures/test/WillEqualTest.cpp \
280     ../futures/test/WindowTest.cpp \
281     ../futures/test/WhenTest.cpp \
282     ../futures/test/WhileDoTest.cpp
283
284 futures_test_LDADD = libfollytestmain.la
285 TESTS += futures_test
286
287 function_test_SOURCES = FunctionTest.cpp
288 function_test_LDADD = libfollytestmain.la
289 TESTS += function_test
290
291 ssl_test_SOURCES = \
292                 ../ssl/test/OpenSSLHashTest.cpp
293 ssl_test_LDADD = libfollytestmain.la -lcrypto
294 TESTS += ssl_test
295
296 mallctl_helper_test_SOURCES = MallctlHelperTest.cpp
297 mallctl_helper_test_LDADD = libfollytestmain.la
298 TESTS += mallctl_helper_test
299
300 apply_tuple_test_SOURCES = ApplyTupleTest.cpp
301 apply_tuple_test_LDADD = libfollytestmain.la
302 TESTS += apply_tuple_test
303
304 partial_test_SOURCES = PartialTest.cpp
305 partial_test_LDADD = libfollytestmain.la
306 TESTS += partial_test
307
308 check_PROGRAMS += $(TESTS)