Only run eventfd tests on Linux.
[folly.git] / folly / test / Makefile.am
1 SUBDIRS = . function_benchmark
2
3 ACLOCAL_AMFLAGS = -I m4
4
5 CPPFLAGS += -Igtest-1.6.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 lib_LTLIBRARIES = libgtestmain.la libgtest.la
18
19 libgtestmain_la_CPPFLAGS = -Igtest-1.6.0 -Igtest-1.6.0/src
20 libgtestmain_la_SOURCES = gtest-1.6.0/src/gtest-all.cc gtest-1.6.0/src/gtest_main.cc
21
22 libgtest_la_CPPFLAGS = -Igtest-1.6.0 -Igtest-1.6.0/src
23 libgtest_la_SOURCES = gtest-1.6.0/src/gtest-all.cc
24
25 noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
26                  FBVectorTestBenchmarks.cpp.h
27
28 noinst_PROGRAMS=benchmark_test
29
30 if HAVE_X86_64
31 small_locks_test_SOURCES = SmallLocksTest.cpp
32 small_locks_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
33 TESTS += small_locks_test
34
35 # Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
36 packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
37 packed_sync_ptr_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
38 TESTS += packed_sync_ptr_test
39
40 small_vector_test_SOURCES = small_vector_test.cpp
41 small_vector_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
42 TESTS += small_vector_test
43
44 discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
45 discriminated_ptr_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
46 TESTS += discriminated_ptr_test
47 endif
48
49 sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
50 sorted_vector_types_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
51
52
53 foreach_test_SOURCES = ForeachTest.cpp
54 foreach_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
55
56 hash_test_SOURCES = HashTest.cpp
57 hash_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
58
59
60 fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
61 fbstring_test_using_jemalloc_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
62 TESTS += fbstring_test_using_jemalloc
63
64 if HAVE_LINUX
65 eventfd_test_SOURCES = EventFDTest.cpp
66 eventfd_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
67 TESTS += eventfd_test
68 endif
69
70 thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
71 thread_cached_int_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
72
73 thread_local_test_SOURCES = ThreadLocalTest.cpp
74 thread_local_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
75
76 TESTS += thread_cached_int_test thread_local_test
77
78 fbvector_test_SOURCES = FBVectorTest.cpp
79 fbvector_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
80 TESTS += fbvector_test
81
82 # fails due to cout
83 dynamic_test_SOURCES = DynamicTest.cpp
84 dynamic_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la $(top_builddir)/libfolly.la
85 TESTS += dynamic_test
86
87 # fails due to cout
88 json_test_SOURCES = JsonTest.cpp
89 json_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la  $(top_builddir)/libfolly.la
90 TESTS += json_test
91
92 benchmark_test_SOURCES = BenchmarkTest.cpp
93 benchmark_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
94
95 # fails due to destructor
96 scope_guard_test_SOURCES = ScopeGuardTest.cpp
97 scope_guard_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
98 TESTS += scope_guard_test
99
100 timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
101 timeout_queue_test_LDADD = libgtestmain.la $(top_builddir)/libfollytimeout_queue.la
102
103 conv_test_SOURCES = ConvTest.cpp
104 conv_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
105
106 range_test_SOURCES = RangeTest.cpp
107 range_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
108
109 bits_test_SOURCES = BitsTest.cpp
110 bits_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
111
112 bit_iterator_test_SOURCES = BitIteratorTest.cpp
113 bit_iterator_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
114
115 endian_test_SOURCES = EndianTest.cpp
116 endian_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
117 TESTS += endian_test
118
119 rw_spinlock_test_SOURCES = RWSpinLockTest.cpp
120 rw_spinlock_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
121 TESTS += rw_spinlock_test
122
123 synchronized_test_SOURCES = SynchronizedTest.cpp
124 synchronized_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
125 TESTS += synchronized_test
126
127 concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
128 concurrent_skiplist_test_LDADD = libgtest.la $(top_builddir)/libfolly.la
129 TESTS += concurrent_skiplist_test
130
131 concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
132 concurrent_skiplist_benchmark_LDADD = $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
133 noinst_PROGRAMS += concurrent_skiplist_benchmark
134
135 histogram_test_SOURCES = HistogramTest.cpp
136 histogram_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
137 TESTS += histogram_test
138
139 group_varint_test_SOURCES = GroupVarintTest.cpp
140 group_varint_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
141 TESTS += group_varint_test
142
143 map_util_test_SOURCES = MapUtilTest.cpp
144 map_util_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
145 TESTS += map_util_test
146
147 string_test_SOURCES = StringTest.cpp
148 string_test_LDADD = libgtest.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
149 TESTS += string_test
150
151 producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
152 producer_consumer_queue_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
153 TESTS += producer_consumer_queue_test
154
155 atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
156 atomic_hash_array_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
157 TESTS += atomic_hash_array_test
158
159 atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
160 atomic_hash_map_test_LDADD = libgtest.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
161 TESTS += atomic_hash_map_test
162
163 format_test_SOURCES = FormatTest.cpp
164 format_test_LDADD = libgtest.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
165 TESTS += format_test
166
167 fingerprint_test_SOURCES = FingerprintTest.cpp
168 fingerprint_test_LDADD = libgtest.la $(top_builddir)/libfolly.la $(top_builddir)/libfollyfingerprint.la $(top_builddir)/libfollybenchmark.la
169 TESTS += fingerprint_test
170
171 portability_test_SOURCES = PortabilityTest.cpp
172 portability_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
173 TESTS += portability_test
174
175 cpuid_test_SOURCES = CpuIdTest.cpp
176 cpuid_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
177 TESTS += cpuid_test
178
179 spooky_hash_v1_test_SOURCES = SpookyHashV1Test.cpp
180 spooky_hash_v1_test_LDADD = -lrt $(top_builddir)/libfolly.la
181 TESTS += spooky_hash_v1_test
182
183 spooky_hash_v2_test_SOURCES = SpookyHashV2Test.cpp
184 spooky_hash_v2_test_LDADD = -lrt $(top_builddir)/libfolly.la
185 TESTS += spooky_hash_v2_test
186
187 check_PROGRAMS= $(TESTS)