add LockTraits
[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         range_test \
14         bits_test \
15         bit_iterator_test
16
17 check_LTLIBRARIES = libfollytestmain.la libgtest.la
18 check_PROGRAMS =
19 noinst_LTLIBRARIES = lib_thread_local_test.la
20
21 libgtest_la_CPPFLAGS = -Igtest-1.7.0 -Igtest-1.7.0/src
22 libgtest_la_SOURCES = gtest-1.7.0/src/gtest-all.cc
23
24 if FOLLY_TESTMAIN
25 libfollytestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
26 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) common/TestMain.cpp
27 libfollytestmain_la_LIBADD = $(top_builddir)/init/libfollyinit.la $(top_builddir)/libfolly.la
28 else
29 libfollytestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
30 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest-1.7.0/src/gtest_main.cc
31 libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
32 endif
33
34 lib_thread_local_test_la_CPPFLAGS = $(AM_CPPFLAGS)
35 lib_thread_local_test_la_SOURCES = ThreadLocalTestLib.cpp
36 lib_thread_local_test_la_LDFLAGS = -rpath /force_shared
37 lib_thread_local_test_la_LIBADD = $(top_builddir)/libfolly.la
38
39 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
40         FBVectorTestBenchmarks.cpp.h
41
42 spin_lock_test_SOURCES = SpinLockTest.cpp
43 spin_lock_test_LDADD = libfollytestmain.la
44 TESTS += spin_lock_test
45
46 array_test_SOURCES = ArrayTest.cpp
47 array_test_LDADD = libfollytestmain.la
48 TESTS += array_test
49
50 if RUN_ARCH_SPECIFIC_TESTS
51 small_locks_test_SOURCES = SmallLocksTest.cpp
52 small_locks_test_LDADD = libfollytestmain.la
53 TESTS += small_locks_test
54
55 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
56 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
57 packed_sync_ptr_test_LDADD = libfollytestmain.la
58 TESTS += packed_sync_ptr_test
59
60 small_vector_test_SOURCES = small_vector_test.cpp
61 small_vector_test_LDADD = libfollytestmain.la
62 TESTS += small_vector_test
63
64 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
65 discriminated_ptr_test_LDADD = libfollytestmain.la
66 TESTS += discriminated_ptr_test
67
68 if !HAVE_PPC64
69 cpuid_test_SOURCES = CpuIdTest.cpp
70 cpuid_test_LDADD = libfollytestmain.la
71 TESTS += cpuid_test
72 endif
73 endif
74
75 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
76 sorted_vector_types_test_LDADD = libfollytestmain.la
77
78
79 foreach_test_SOURCES = ForeachTest.cpp
80 foreach_test_LDADD = libfollytestmain.la
81
82 foreach_benchmark_SOURCES = ForeachBenchmark.cpp
83 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
84 check_PROGRAMS += foreach_benchmark
85
86 hash_test_SOURCES = HashTest.cpp
87 hash_test_LDADD = libfollytestmain.la
88
89
90 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
91 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
92 TESTS += fbstring_test_using_jemalloc
93
94 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
95 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
96
97 thread_local_test_SOURCES = ThreadLocalTest.cpp
98 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
99 thread_local_test_LDFLAGS = -ldl
100 TESTS += thread_cached_int_test thread_local_test
101
102 fbvector_test_SOURCES = FBVectorTest.cpp
103 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
104 TESTS += fbvector_test
105
106 # fails due to cout
107 dynamic_test_SOURCES = DynamicTest.cpp
108 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
109 TESTS += dynamic_test
110
111 # fails due to cout
112 json_test_SOURCES = JsonTest.cpp
113 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
114 TESTS += json_test
115
116 benchmark_test_SOURCES = BenchmarkTest.cpp
117 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
118 check_PROGRAMS += benchmark_test
119
120 # fails due to destructor
121 scope_guard_test_SOURCES = ScopeGuardTest.cpp
122 scope_guard_test_LDADD = libfollytestmain.la
123 TESTS += scope_guard_test
124
125 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
126 timeout_queue_test_LDADD = libfollytestmain.la
127
128 conv_test_SOURCES = ConvTest.cpp
129 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
130
131 range_test_SOURCES = RangeTest.cpp
132 range_test_LDADD = libfollytestmain.la
133
134 bits_test_SOURCES = BitsTest.cpp
135 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
136
137 bit_iterator_test_SOURCES = BitIteratorTest.cpp
138 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
139
140 endian_test_SOURCES = EndianTest.cpp
141 endian_test_LDADD = libfollytestmain.la
142 TESTS += endian_test
143
144 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
145 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
146 TESTS += rw_spinlock_test
147
148 synchronized_test_SOURCES = SynchronizedTest.cpp
149 synchronized_test_LDADD = libfollytestmain.la
150 TESTS += synchronized_test
151
152 lock_traits_test_SOURCES = LockTraitsTest.cpp
153 lock_traits_test_LDADD = libfollytestmain.la
154 TESTS += lock_traits_test
155
156 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
157 concurrent_skiplist_test_LDADD = libfollytestmain.la
158 TESTS += concurrent_skiplist_test
159
160 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
161 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
162 check_PROGRAMS += concurrent_skiplist_benchmark
163
164 conv_benchmark_SOURCES = ConvBenchmark.cpp
165 conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
166 check_PROGRAMS += conv_benchmark
167
168 histogram_test_SOURCES = HistogramTest.cpp
169 histogram_test_LDADD = libfollytestmain.la
170 TESTS += histogram_test
171
172 group_varint_test_SOURCES = GroupVarintTest.cpp
173 group_varint_test_LDADD = libfollytestmain.la
174 TESTS += group_varint_test
175
176 map_util_test_SOURCES = MapUtilTest.cpp
177 map_util_test_LDADD = libfollytestmain.la
178 TESTS += map_util_test
179
180 string_test_SOURCES = StringTest.cpp
181 string_test_LDADD = libfollytestmain.la
182 TESTS += string_test
183
184 conditionally_existent_test_SOURCES = ConditionallyExistentTest.cpp
185 conditionally_existent_test_LDADD = libfollytestmain.la
186 TESTS += conditionally_existent_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 try_test_SOURCES = TryTest.cpp
233 try_test_LDADD = libfollytestmain.la
234 TESTS += try_test
235
236 unit_test_SOURCES = UnitTest.cpp
237 unit_test_LDADD = libfollytestmain.la
238 TESTS += unit_test
239
240 futures_test_SOURCES = \
241     ../futures/test/CollectTest.cpp \
242     ../futures/test/ContextTest.cpp \
243     ../futures/test/ConversionTest.cpp \
244     ../futures/test/CoreTest.cpp \
245     ../futures/test/EnsureTest.cpp \
246     ../futures/test/ExecutorTest.cpp \
247     ../futures/test/FSMTest.cpp \
248     ../futures/test/FilterTest.cpp \
249     ../futures/test/FutureTest.cpp \
250     ../futures/test/HeaderCompileTest.cpp \
251     ../futures/test/InterruptTest.cpp \
252     ../futures/test/MapTest.cpp \
253     ../futures/test/NonCopyableLambdaTest.cpp \
254     ../futures/test/PollTest.cpp \
255     ../futures/test/PromiseTest.cpp \
256     ../futures/test/ReduceTest.cpp \
257     ../futures/test/RetryingTest.cpp \
258     ../futures/test/SelfDestructTest.cpp \
259     ../futures/test/SharedPromiseTest.cpp \
260     ../futures/test/ThenCompileTest.cpp \
261     ../futures/test/ThenTest.cpp \
262     ../futures/test/TimekeeperTest.cpp \
263     ../futures/test/TimesTest.cpp \
264     ../futures/test/UnwrapTest.cpp \
265     ../futures/test/ViaTest.cpp \
266     ../futures/test/WaitTest.cpp \
267     ../futures/test/WillEqualTest.cpp \
268     ../futures/test/WindowTest.cpp \
269     ../futures/test/WhenTest.cpp \
270     ../futures/test/WhileDoTest.cpp
271
272 futures_test_LDADD = libfollytestmain.la
273 TESTS += futures_test
274
275 function_test_SOURCES = FunctionTest.cpp
276 function_test_LDADD = libfollytestmain.la
277 TESTS += function_test
278
279 ssl_test_SOURCES = \
280                 ../ssl/test/OpenSSLHashTest.cpp
281 ssl_test_LDADD = libfollytestmain.la -lcrypto
282 TESTS += ssl_test
283
284 check_PROGRAMS += $(TESTS)