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