folly/futures: use folly::Function to store callback
[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
20 libgtest_la_CPPFLAGS = -Igtest-1.7.0 -Igtest-1.7.0/src
21 libgtest_la_SOURCES = gtest-1.7.0/src/gtest-all.cc
22
23 if FOLLY_TESTMAIN
24 libfollytestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
25 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) common/TestMain.cpp
26 libfollytestmain_la_LIBADD = $(top_builddir)/init/libfollyinit.la $(top_builddir)/libfolly.la
27 else
28 libfollytestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
29 libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest-1.7.0/src/gtest_main.cc
30 libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
31 endif
32
33 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
34         FBVectorTestBenchmarks.cpp.h
35
36 spin_lock_test_SOURCES = SpinLockTest.cpp
37 spin_lock_test_LDADD = libfollytestmain.la
38 TESTS += spin_lock_test
39
40 if RUN_ARCH_SPECIFIC_TESTS
41 small_locks_test_SOURCES = SmallLocksTest.cpp
42 small_locks_test_LDADD = libfollytestmain.la
43 TESTS += small_locks_test
44
45 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
46 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
47 packed_sync_ptr_test_LDADD = libfollytestmain.la
48 TESTS += packed_sync_ptr_test
49
50 small_vector_test_SOURCES = small_vector_test.cpp
51 small_vector_test_LDADD = libfollytestmain.la
52 TESTS += small_vector_test
53
54 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
55 discriminated_ptr_test_LDADD = libfollytestmain.la
56 TESTS += discriminated_ptr_test
57
58 if !HAVE_PPC64
59 cpuid_test_SOURCES = CpuIdTest.cpp
60 cpuid_test_LDADD = libfollytestmain.la
61 TESTS += cpuid_test
62 endif
63 endif
64
65 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
66 sorted_vector_types_test_LDADD = libfollytestmain.la
67
68
69 foreach_test_SOURCES = ForeachTest.cpp
70 foreach_test_LDADD = libfollytestmain.la
71
72 foreach_benchmark_SOURCES = ForeachBenchmark.cpp
73 foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
74 check_PROGRAMS += foreach_benchmark
75
76 hash_test_SOURCES = HashTest.cpp
77 hash_test_LDADD = libfollytestmain.la
78
79
80 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
81 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
82 TESTS += fbstring_test_using_jemalloc
83
84 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
85 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
86
87 thread_local_test_SOURCES = ThreadLocalTest.cpp
88 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
89 thread_local_test_LDFLAGS = -ldl
90 TESTS += thread_cached_int_test thread_local_test
91
92 fbvector_test_SOURCES = FBVectorTest.cpp
93 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
94 TESTS += fbvector_test
95
96 # fails due to cout
97 dynamic_test_SOURCES = DynamicTest.cpp
98 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
99 TESTS += dynamic_test
100
101 # fails due to cout
102 json_test_SOURCES = JsonTest.cpp
103 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
104 TESTS += json_test
105
106 benchmark_test_SOURCES = BenchmarkTest.cpp
107 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
108 check_PROGRAMS += benchmark_test
109
110 # fails due to destructor
111 scope_guard_test_SOURCES = ScopeGuardTest.cpp
112 scope_guard_test_LDADD = libfollytestmain.la
113 TESTS += scope_guard_test
114
115 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
116 timeout_queue_test_LDADD = libfollytestmain.la
117
118 conv_test_SOURCES = ConvTest.cpp
119 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
120
121 range_test_SOURCES = RangeTest.cpp
122 range_test_LDADD = libfollytestmain.la
123
124 bits_test_SOURCES = BitsTest.cpp
125 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
126
127 bit_iterator_test_SOURCES = BitIteratorTest.cpp
128 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
129
130 endian_test_SOURCES = EndianTest.cpp
131 endian_test_LDADD = libfollytestmain.la
132 TESTS += endian_test
133
134 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
135 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
136 TESTS += rw_spinlock_test
137
138 synchronized_test_SOURCES = SynchronizedTest.cpp
139 synchronized_test_LDADD = libfollytestmain.la
140 TESTS += synchronized_test
141
142 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
143 concurrent_skiplist_test_LDADD = libfollytestmain.la
144 TESTS += concurrent_skiplist_test
145
146 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
147 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
148 check_PROGRAMS += concurrent_skiplist_benchmark
149
150 histogram_test_SOURCES = HistogramTest.cpp
151 histogram_test_LDADD = libfollytestmain.la
152 TESTS += histogram_test
153
154 group_varint_test_SOURCES = GroupVarintTest.cpp
155 group_varint_test_LDADD = libfollytestmain.la
156 TESTS += group_varint_test
157
158 map_util_test_SOURCES = MapUtilTest.cpp
159 map_util_test_LDADD = libfollytestmain.la
160 TESTS += map_util_test
161
162 string_test_SOURCES = StringTest.cpp
163 string_test_LDADD = libfollytestmain.la
164 TESTS += string_test
165
166 conditionally_existent_test_SOURCES = ConditionallyExistentTest.cpp
167 conditionally_existent_test_LDADD = libfollytestmain.la
168 TESTS += conditionally_existent_test
169
170 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
171 producer_consumer_queue_test_LDADD = libfollytestmain.la
172 TESTS += producer_consumer_queue_test
173
174 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
175 atomic_hash_array_test_LDADD = libfollytestmain.la
176 TESTS += atomic_hash_array_test
177
178 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
179 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
180 TESTS += atomic_hash_map_test
181
182 format_test_SOURCES = FormatTest.cpp
183 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
184 TESTS += format_test
185
186 fingerprint_test_SOURCES = FingerprintTest.cpp
187 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
188 TESTS += fingerprint_test
189
190 portability_test_SOURCES = PortabilityTest.cpp
191 portability_test_LDADD = libfollytestmain.la
192 TESTS += portability_test
193
194 spooky_hash_v1_test_SOURCES = SpookyHashV1Test.cpp
195 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
196 TESTS += spooky_hash_v1_test
197
198 spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
199 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
200 TESTS += spooky_hash_v2_test
201
202 token_bucket_test_SOURCES = TokenBucketTest.cpp
203 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
204 TESTS += token_bucket_test
205
206 thread_name_test_SOURCES = ThreadNameTest.cpp
207 thread_name_test_LDADD = libfollytestmain.la
208 TESTS += thread_name_test
209
210 indestructible_test_SOURCES = IndestructibleTest.cpp
211 indestructible_test_LDADD = libfollytestmain.la
212 TESTS += indestructible_test
213
214
215 futures_test_SOURCES = \
216     ../futures/test/CollectTest.cpp \
217     ../futures/test/ContextTest.cpp \
218     ../futures/test/ConversionTest.cpp \
219     ../futures/test/CoreTest.cpp \
220     ../futures/test/ThreadedExecutorTest.cpp \
221     ../futures/test/EnsureTest.cpp \
222     ../futures/test/ExecutorTest.cpp \
223     ../futures/test/FSMTest.cpp \
224     ../futures/test/FilterTest.cpp \
225     ../futures/test/FutureTest.cpp \
226     ../futures/test/HeaderCompileTest.cpp \
227     ../futures/test/InterruptTest.cpp \
228     ../futures/test/MapTest.cpp \
229     ../futures/test/NonCopyableLambdaTest.cpp \
230     ../futures/test/PollTest.cpp \
231     ../futures/test/PromiseTest.cpp \
232     ../futures/test/ReduceTest.cpp \
233     ../futures/test/RetryingTest.cpp \
234     ../futures/test/SelfDestructTest.cpp \
235     ../futures/test/SharedPromiseTest.cpp \
236     ../futures/test/ThenCompileTest.cpp \
237     ../futures/test/ThenTest.cpp \
238     ../futures/test/TimekeeperTest.cpp \
239     ../futures/test/TimesTest.cpp \
240     ../futures/test/TryTest.cpp \
241     ../futures/test/UnitTest.cpp \
242     ../futures/test/UnwrapTest.cpp \
243     ../futures/test/ViaTest.cpp \
244     ../futures/test/WaitTest.cpp \
245     ../futures/test/WillEqualTest.cpp \
246     ../futures/test/WindowTest.cpp \
247     ../futures/test/WhenTest.cpp \
248     ../futures/test/WhileDoTest.cpp
249
250 futures_test_LDADD = libfollytestmain.la
251 TESTS += futures_test
252
253 function_test_SOURCES = FunctionTest.cpp
254 function_test_LDADD = libfollytestmain.la
255 TESTS += function_test
256
257 check_PROGRAMS += $(TESTS)