ConditionallyExistent<typename>
[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 $(top_builddir)/libfollybenchmark.la
71
72 hash_test_SOURCES = HashTest.cpp
73 hash_test_LDADD = libfollytestmain.la
74
75
76 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
77 fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
78 TESTS += fbstring_test_using_jemalloc
79
80 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
81 thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
82
83 thread_local_test_SOURCES = ThreadLocalTest.cpp
84 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
85 thread_local_test_LDFLAGS = -ldl
86 TESTS += thread_cached_int_test thread_local_test
87
88 fbvector_test_SOURCES = FBVectorTest.cpp
89 fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
90 TESTS += fbvector_test
91
92 # fails due to cout
93 dynamic_test_SOURCES = DynamicTest.cpp
94 dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
95 TESTS += dynamic_test
96
97 # fails due to cout
98 json_test_SOURCES = JsonTest.cpp
99 json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
100 TESTS += json_test
101
102 benchmark_test_SOURCES = BenchmarkTest.cpp
103 benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
104 check_PROGRAMS += benchmark_test
105
106 # fails due to destructor
107 scope_guard_test_SOURCES = ScopeGuardTest.cpp
108 scope_guard_test_LDADD = libfollytestmain.la
109 TESTS += scope_guard_test
110
111 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
112 timeout_queue_test_LDADD = libfollytestmain.la
113
114 conv_test_SOURCES = ConvTest.cpp
115 conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
116
117 range_test_SOURCES = RangeTest.cpp
118 range_test_LDADD = libfollytestmain.la
119
120 bits_test_SOURCES = BitsTest.cpp
121 bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
122
123 bit_iterator_test_SOURCES = BitIteratorTest.cpp
124 bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
125
126 endian_test_SOURCES = EndianTest.cpp
127 endian_test_LDADD = libfollytestmain.la
128 TESTS += endian_test
129
130 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
131 rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
132 TESTS += rw_spinlock_test
133
134 synchronized_test_SOURCES = SynchronizedTest.cpp
135 synchronized_test_LDADD = libfollytestmain.la
136 TESTS += synchronized_test
137
138 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
139 concurrent_skiplist_test_LDADD = libfollytestmain.la
140 TESTS += concurrent_skiplist_test
141
142 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
143 concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
144 check_PROGRAMS += concurrent_skiplist_benchmark
145
146 histogram_test_SOURCES = HistogramTest.cpp
147 histogram_test_LDADD = libfollytestmain.la
148 TESTS += histogram_test
149
150 group_varint_test_SOURCES = GroupVarintTest.cpp
151 group_varint_test_LDADD = libfollytestmain.la
152 TESTS += group_varint_test
153
154 map_util_test_SOURCES = MapUtilTest.cpp
155 map_util_test_LDADD = libfollytestmain.la
156 TESTS += map_util_test
157
158 string_test_SOURCES = StringTest.cpp
159 string_test_LDADD = libfollytestmain.la
160 TESTS += string_test
161
162 conditionally_existent_test_SOURCES = ConditionallyExistent.cpp
163 conditionally_existent_test_LDADD = libfollytestmain.la
164 TESTS += conditionally_existent_test
165
166 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
167 producer_consumer_queue_test_LDADD = libfollytestmain.la
168 TESTS += producer_consumer_queue_test
169
170 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
171 atomic_hash_array_test_LDADD = libfollytestmain.la
172 TESTS += atomic_hash_array_test
173
174 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
175 atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
176 TESTS += atomic_hash_map_test
177
178 format_test_SOURCES = FormatTest.cpp
179 format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
180 TESTS += format_test
181
182 fingerprint_test_SOURCES = FingerprintTest.cpp
183 fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
184 TESTS += fingerprint_test
185
186 portability_test_SOURCES = PortabilityTest.cpp
187 portability_test_LDADD = libfollytestmain.la
188 TESTS += portability_test
189
190 spooky_hash_v1_test_SOURCES = SpookyHashV1Test.cpp
191 spooky_hash_v1_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
192 TESTS += spooky_hash_v1_test
193
194 spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
195 spooky_hash_v2_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
196 TESTS += spooky_hash_v2_test
197
198 token_bucket_test_SOURCES = TokenBucketTest.cpp
199 token_bucket_test_LDADD = libfollytestmain.la  $(top_builddir)/libfollybenchmark.la
200 TESTS += token_bucket_test
201
202 thread_name_test_SOURCES = ThreadNameTest.cpp
203 thread_name_test_LDADD = libfollytestmain.la
204 TESTS += thread_name_test
205
206
207 futures_test_SOURCES = \
208     ../futures/test/CollectTest.cpp \
209     ../futures/test/ContextTest.cpp \
210     ../futures/test/CoreTest.cpp \
211     ../futures/test/ThreadedExecutorTest.cpp \
212     ../futures/test/EnsureTest.cpp \
213     ../futures/test/ExecutorTest.cpp \
214     ../futures/test/FSMTest.cpp \
215     ../futures/test/FilterTest.cpp \
216     ../futures/test/FutureTest.cpp \
217     ../futures/test/HeaderCompileTest.cpp \
218     ../futures/test/InterruptTest.cpp \
219     ../futures/test/MapTest.cpp \
220     ../futures/test/PollTest.cpp \
221     ../futures/test/PromiseTest.cpp \
222     ../futures/test/ReduceTest.cpp \
223     ../futures/test/RetryingTest.cpp \
224     ../futures/test/SharedPromiseTest.cpp \
225     ../futures/test/ThenCompileTest.cpp \
226     ../futures/test/ThenTest.cpp \
227     ../futures/test/TimekeeperTest.cpp \
228     ../futures/test/TimesTest.cpp \
229     ../futures/test/TryTest.cpp \
230     ../futures/test/UnitTest.cpp \
231     ../futures/test/UnwrapTest.cpp \
232     ../futures/test/ViaTest.cpp \
233     ../futures/test/WaitTest.cpp \
234     ../futures/test/WillEqualTest.cpp \
235     ../futures/test/WindowTest.cpp \
236     ../futures/test/WhenTest.cpp \
237     ../futures/test/WhileDoTest.cpp
238
239 futures_test_LDADD = libfollytestmain.la
240 TESTS += futures_test
241
242 check_PROGRAMS += $(TESTS)