David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 1 | # |
| 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | # |
Roger Meier | c095919 | 2013-01-15 23:20:19 +0100 | [diff] [blame] | 19 | .NOTPARALLEL: |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 20 | noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 21 | nodist_libtestgencpp_la_SOURCES = \ |
| 22 | gen-cpp/DebugProtoTest_types.cpp \ |
Jens Geyer | ae0b22c | 2014-09-04 23:04:21 +0200 | [diff] [blame] | 23 | gen-cpp/EnumTest_types.cpp \ |
| 24 | gen-cpp/EnumTest_types.h \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 25 | gen-cpp/OptionalRequiredTest_types.cpp \ |
| 26 | gen-cpp/DebugProtoTest_types.cpp \ |
| 27 | gen-cpp/ThriftTest_types.cpp \ |
| 28 | gen-cpp/DebugProtoTest_types.h \ |
| 29 | gen-cpp/OptionalRequiredTest_types.h \ |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 30 | gen-cpp/Recursive_types.cpp \ |
| 31 | gen-cpp/Recursive_types.h \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 32 | gen-cpp/ThriftTest_types.h \ |
| 33 | ThriftTest_extras.cpp \ |
| 34 | DebugProtoTest_extras.cpp |
| 35 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 36 | nodist_libprocessortest_la_SOURCES = \ |
| 37 | gen-cpp/ChildService.cpp \ |
| 38 | gen-cpp/ChildService.h \ |
| 39 | gen-cpp/ParentService.cpp \ |
| 40 | gen-cpp/ParentService.h \ |
| 41 | gen-cpp/proc_types.cpp \ |
| 42 | gen-cpp/proc_types.h |
| 43 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 44 | ThriftTest_extras.o: gen-cpp/ThriftTest_types.h |
| 45 | DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h |
| 46 | |
| 47 | libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 48 | |
| 49 | noinst_PROGRAMS = Benchmark |
| 50 | |
| 51 | Benchmark_SOURCES = \ |
| 52 | Benchmark.cpp |
| 53 | |
| 54 | Benchmark_LDADD = libtestgencpp.la |
| 55 | |
| 56 | check_PROGRAMS = \ |
| 57 | TFDTransportTest \ |
| 58 | TPipedTransportTest \ |
| 59 | DebugProtoTest \ |
| 60 | JSONProtoTest \ |
| 61 | OptionalRequiredTest \ |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 62 | RecursiveTest \ |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 63 | SpecializationTest \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 64 | AllProtocolsTest \ |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 65 | TransportTest \ |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 66 | ZlibTest \ |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 67 | TFileTransportTest \ |
Roger Meier | 63fcb7e | 2014-06-15 21:48:59 +0200 | [diff] [blame] | 68 | UnitTests \ |
Alan Dunn | bee7b73 | 2014-07-26 13:48:43 -0500 | [diff] [blame] | 69 | link_test \ |
Jens Geyer | ae0b22c | 2014-09-04 23:04:21 +0200 | [diff] [blame] | 70 | OpenSSLManualInitTest \ |
| 71 | EnumTest |
Roger Meier | 2d59b9e | 2012-05-23 19:40:40 +0000 | [diff] [blame] | 72 | # disable these test ... too strong |
| 73 | # processor_test |
Roger Meier | dd16f05 | 2012-05-11 14:19:48 +0000 | [diff] [blame] | 74 | # concurrency_test |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 75 | |
Roger Meier | 9e0f074 | 2011-08-03 17:36:55 +0000 | [diff] [blame] | 76 | TESTS_ENVIRONMENT= \ |
| 77 | BOOST_TEST_LOG_SINK=tests.xml \ |
| 78 | BOOST_TEST_LOG_LEVEL=test_suite \ |
| 79 | BOOST_TEST_LOG_FORMAT=xml |
| 80 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 81 | TESTS = \ |
| 82 | $(check_PROGRAMS) |
| 83 | |
| 84 | UnitTests_SOURCES = \ |
| 85 | UnitTestMain.cpp \ |
| 86 | TMemoryBufferTest.cpp \ |
Roger Meier | 4cb8e40 | 2012-05-27 18:05:16 +0000 | [diff] [blame] | 87 | TBufferBaseTest.cpp \ |
Konrad Grochowski | b3f6ea1 | 2014-09-02 16:00:47 +0200 | [diff] [blame] | 88 | Base64Test.cpp \ |
| 89 | ToStringTest.cpp |
Roger Meier | 12d7053 | 2011-12-14 23:35:28 +0000 | [diff] [blame] | 90 | |
| 91 | if !WITH_BOOSTTHREADS |
| 92 | UnitTests_SOURCES += \ |
Roger Meier | 3fc4819 | 2011-12-11 21:05:35 +0000 | [diff] [blame] | 93 | RWMutexStarveTest.cpp |
Roger Meier | 12d7053 | 2011-12-14 23:35:28 +0000 | [diff] [blame] | 94 | endif |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 95 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 96 | UnitTests_LDADD = \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 97 | libtestgencpp.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame] | 98 | -l:libboost_unit_test_framework.a |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 99 | |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 100 | TransportTest_SOURCES = \ |
| 101 | TransportTest.cpp |
| 102 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 103 | TransportTest_LDADD = \ |
| 104 | libtestgencpp.la \ |
| 105 | $(top_builddir)/lib/cpp/libthriftz.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame] | 106 | -l:libboost_unit_test_framework.a \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 107 | -lz |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 108 | |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 109 | ZlibTest_SOURCES = \ |
| 110 | ZlibTest.cpp |
| 111 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 112 | ZlibTest_LDADD = \ |
| 113 | libtestgencpp.la \ |
| 114 | $(top_builddir)/lib/cpp/libthriftz.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame] | 115 | -l:libboost_unit_test_framework.a \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 116 | -lz |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 117 | |
Jens Geyer | ae0b22c | 2014-09-04 23:04:21 +0200 | [diff] [blame] | 118 | EnumTest_SOURCES = \ |
| 119 | EnumTest.cpp |
| 120 | |
| 121 | EnumTest_LDADD = \ |
| 122 | libtestgencpp.la \ |
| 123 | $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a |
| 124 | |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 125 | TFileTransportTest_SOURCES = \ |
| 126 | TFileTransportTest.cpp |
| 127 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 128 | TFileTransportTest_LDADD = \ |
| 129 | libtestgencpp.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame] | 130 | -l:libboost_unit_test_framework.a |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 131 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 132 | # |
| 133 | # TFDTransportTest |
| 134 | # |
| 135 | TFDTransportTest_SOURCES = \ |
| 136 | TFDTransportTest.cpp |
| 137 | |
| 138 | TFDTransportTest_LDADD = \ |
| 139 | $(top_builddir)/lib/cpp/libthrift.la |
| 140 | |
| 141 | |
| 142 | # |
| 143 | # TPipedTransportTest |
| 144 | # |
| 145 | TPipedTransportTest_SOURCES = \ |
| 146 | TPipedTransportTest.cpp |
| 147 | |
| 148 | TPipedTransportTest_LDADD = \ |
| 149 | $(top_builddir)/lib/cpp/libthrift.la |
| 150 | |
| 151 | # |
| 152 | # AllProtocolsTest |
| 153 | # |
| 154 | AllProtocolsTest_SOURCES = \ |
| 155 | AllProtocolTests.cpp \ |
| 156 | AllProtocolTests.tcc \ |
| 157 | GenericHelpers.h |
| 158 | |
| 159 | AllProtocolsTest_LDADD = libtestgencpp.la |
| 160 | |
| 161 | # |
| 162 | # DebugProtoTest |
| 163 | # |
| 164 | DebugProtoTest_SOURCES = \ |
| 165 | DebugProtoTest.cpp |
| 166 | |
| 167 | DebugProtoTest_LDADD = libtestgencpp.la |
| 168 | |
| 169 | |
| 170 | # |
| 171 | # JSONProtoTest |
| 172 | # |
| 173 | JSONProtoTest_SOURCES = \ |
| 174 | JSONProtoTest.cpp |
| 175 | |
| 176 | JSONProtoTest_LDADD = libtestgencpp.la |
| 177 | |
| 178 | # |
| 179 | # OptionalRequiredTest |
| 180 | # |
| 181 | OptionalRequiredTest_SOURCES = \ |
| 182 | OptionalRequiredTest.cpp |
| 183 | |
| 184 | OptionalRequiredTest_LDADD = libtestgencpp.la |
| 185 | |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 186 | # |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 187 | # OptionalRequiredTest |
| 188 | # |
| 189 | RecursiveTest_SOURCES = \ |
| 190 | RecursiveTest.cpp |
| 191 | |
| 192 | RecursiveTest_LDADD = libtestgencpp.la |
| 193 | |
| 194 | # |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 195 | # SpecializationTest |
| 196 | # |
| 197 | SpecializationTest_SOURCES = \ |
| 198 | SpecializationTest.cpp |
| 199 | |
| 200 | SpecializationTest_LDADD = libtestgencpp.la |
| 201 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 202 | concurrency_test_SOURCES = \ |
| 203 | concurrency/Tests.cpp \ |
| 204 | concurrency/ThreadFactoryTests.h \ |
| 205 | concurrency/ThreadManagerTests.h \ |
| 206 | concurrency/TimerManagerTests.h |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 207 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 208 | concurrency_test_LDADD = \ |
| 209 | $(top_builddir)/lib/cpp/libthrift.la |
| 210 | |
Roger Meier | 63fcb7e | 2014-06-15 21:48:59 +0200 | [diff] [blame] | 211 | link_test_SOURCES = \ |
| 212 | link/LinkTest.cpp \ |
| 213 | link/TemplatedService1.cpp \ |
| 214 | link/TemplatedService2.cpp |
| 215 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 216 | processor_test_SOURCES = \ |
| 217 | processor/ProcessorTest.cpp \ |
| 218 | processor/EventLog.cpp \ |
| 219 | processor/ServerThread.cpp \ |
| 220 | processor/EventLog.h \ |
| 221 | processor/Handlers.h \ |
| 222 | processor/ServerThread.h |
| 223 | |
| 224 | processor_test_LDADD = libprocessortest.la \ |
| 225 | $(top_builddir)/lib/cpp/libthrift.la \ |
| 226 | $(top_builddir)/lib/cpp/libthriftnb.la \ |
| 227 | $(BOOST_LDFLAGS) \ |
| 228 | -levent \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame] | 229 | -l:libboost_unit_test_framework.a |
Alan Dunn | bee7b73 | 2014-07-26 13:48:43 -0500 | [diff] [blame] | 230 | |
| 231 | OpenSSLManualInitTest_SOURCES = \ |
| 232 | OpenSSLManualInitTest.cpp |
| 233 | |
| 234 | OpenSSLManualInitTest_LDADD = \ |
| 235 | $(top_builddir)/lib/cpp/libthrift.la \ |
| 236 | -l:libboost_unit_test_framework.a |
| 237 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 238 | # |
| 239 | # Common thrift code generation rules |
| 240 | # |
| 241 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 242 | |
| 243 | gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift |
| 244 | $(THRIFT) --gen cpp:dense $< |
| 245 | |
Jens Geyer | ae0b22c | 2014-09-04 23:04:21 +0200 | [diff] [blame] | 246 | gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift |
| 247 | $(THRIFT) --gen cpp $< |
| 248 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 249 | gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift |
| 250 | $(THRIFT) --gen cpp:dense $< |
| 251 | |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 252 | gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift |
| 253 | $(THRIFT) --gen cpp $< |
| 254 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 255 | gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift |
| 256 | $(THRIFT) --gen cpp:dense $< |
| 257 | |
| 258 | gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: $(top_srcdir)/test/ThriftTest.thrift |
| 259 | $(THRIFT) --gen cpp:dense $< |
| 260 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 261 | gen-cpp/ChildService.cpp: processor/proc.thrift |
| 262 | $(THRIFT) --gen cpp:templates,cob_style $< |
| 263 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 264 | INCLUDES = \ |
| 265 | -I$(top_srcdir)/lib/cpp/src |
| 266 | |
| 267 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) |
Roger Meier | 3831578 | 2011-11-06 11:29:41 +0000 | [diff] [blame] | 268 | AM_LDFLAGS = $(BOOST_LDFLAGS) |
Jake Farrell | ea949fb | 2011-12-13 20:02:33 +0000 | [diff] [blame] | 269 | AM_CXXFLAGS = -Wall |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 270 | |
| 271 | clean-local: |
| 272 | $(RM) -r gen-cpp |
| 273 | |
| 274 | EXTRA_DIST = \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 275 | DenseProtoTest.cpp \ |
| 276 | ThriftTest_extras.cpp \ |
Jake Farrell | 7c7a5e0 | 2012-10-11 00:29:11 +0000 | [diff] [blame] | 277 | DebugProtoTest_extras.cpp \ |
| 278 | concurrency \ |
| 279 | processor |