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 \ |
| 23 | gen-cpp/OptionalRequiredTest_types.cpp \ |
| 24 | gen-cpp/DebugProtoTest_types.cpp \ |
| 25 | gen-cpp/ThriftTest_types.cpp \ |
| 26 | gen-cpp/DebugProtoTest_types.h \ |
| 27 | gen-cpp/OptionalRequiredTest_types.h \ |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 28 | gen-cpp/Recursive_types.cpp \ |
| 29 | gen-cpp/Recursive_types.h \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 30 | gen-cpp/ThriftTest_types.h \ |
| 31 | ThriftTest_extras.cpp \ |
| 32 | DebugProtoTest_extras.cpp |
| 33 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 34 | nodist_libprocessortest_la_SOURCES = \ |
| 35 | gen-cpp/ChildService.cpp \ |
| 36 | gen-cpp/ChildService.h \ |
| 37 | gen-cpp/ParentService.cpp \ |
| 38 | gen-cpp/ParentService.h \ |
| 39 | gen-cpp/proc_types.cpp \ |
| 40 | gen-cpp/proc_types.h |
| 41 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 42 | ThriftTest_extras.o: gen-cpp/ThriftTest_types.h |
| 43 | DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h |
| 44 | |
| 45 | libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 46 | |
| 47 | noinst_PROGRAMS = Benchmark |
| 48 | |
| 49 | Benchmark_SOURCES = \ |
| 50 | Benchmark.cpp |
| 51 | |
| 52 | Benchmark_LDADD = libtestgencpp.la |
| 53 | |
| 54 | check_PROGRAMS = \ |
| 55 | TFDTransportTest \ |
| 56 | TPipedTransportTest \ |
| 57 | DebugProtoTest \ |
| 58 | JSONProtoTest \ |
| 59 | OptionalRequiredTest \ |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 60 | RecursiveTest \ |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 61 | SpecializationTest \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 62 | AllProtocolsTest \ |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 63 | TransportTest \ |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 64 | ZlibTest \ |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 65 | TFileTransportTest \ |
Roger Meier | 2d59b9e | 2012-05-23 19:40:40 +0000 | [diff] [blame] | 66 | UnitTests |
| 67 | # disable these test ... too strong |
| 68 | # processor_test |
Roger Meier | dd16f05 | 2012-05-11 14:19:48 +0000 | [diff] [blame] | 69 | # concurrency_test |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 70 | |
Roger Meier | 9e0f074 | 2011-08-03 17:36:55 +0000 | [diff] [blame] | 71 | TESTS_ENVIRONMENT= \ |
| 72 | BOOST_TEST_LOG_SINK=tests.xml \ |
| 73 | BOOST_TEST_LOG_LEVEL=test_suite \ |
| 74 | BOOST_TEST_LOG_FORMAT=xml |
| 75 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 76 | TESTS = \ |
| 77 | $(check_PROGRAMS) |
| 78 | |
| 79 | UnitTests_SOURCES = \ |
| 80 | UnitTestMain.cpp \ |
| 81 | TMemoryBufferTest.cpp \ |
Roger Meier | 4cb8e40 | 2012-05-27 18:05:16 +0000 | [diff] [blame] | 82 | TBufferBaseTest.cpp \ |
| 83 | Base64Test.cpp |
Roger Meier | 12d7053 | 2011-12-14 23:35:28 +0000 | [diff] [blame] | 84 | |
| 85 | if !WITH_BOOSTTHREADS |
| 86 | UnitTests_SOURCES += \ |
Roger Meier | 3fc4819 | 2011-12-11 21:05:35 +0000 | [diff] [blame] | 87 | RWMutexStarveTest.cpp |
Roger Meier | 12d7053 | 2011-12-14 23:35:28 +0000 | [diff] [blame] | 88 | endif |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 89 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 90 | UnitTests_LDADD = \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 91 | libtestgencpp.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame^] | 92 | -l:libboost_unit_test_framework.a |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 93 | |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 94 | TransportTest_SOURCES = \ |
| 95 | TransportTest.cpp |
| 96 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 97 | TransportTest_LDADD = \ |
| 98 | libtestgencpp.la \ |
| 99 | $(top_builddir)/lib/cpp/libthriftz.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame^] | 100 | -l:libboost_unit_test_framework.a \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 101 | -lz |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 102 | |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 103 | ZlibTest_SOURCES = \ |
| 104 | ZlibTest.cpp |
| 105 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 106 | ZlibTest_LDADD = \ |
| 107 | libtestgencpp.la \ |
| 108 | $(top_builddir)/lib/cpp/libthriftz.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame^] | 109 | -l:libboost_unit_test_framework.a \ |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 110 | -lz |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 111 | |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 112 | TFileTransportTest_SOURCES = \ |
| 113 | TFileTransportTest.cpp |
| 114 | |
Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 115 | TFileTransportTest_LDADD = \ |
| 116 | libtestgencpp.la \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame^] | 117 | -l:libboost_unit_test_framework.a |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 118 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 119 | # |
| 120 | # TFDTransportTest |
| 121 | # |
| 122 | TFDTransportTest_SOURCES = \ |
| 123 | TFDTransportTest.cpp |
| 124 | |
| 125 | TFDTransportTest_LDADD = \ |
| 126 | $(top_builddir)/lib/cpp/libthrift.la |
| 127 | |
| 128 | |
| 129 | # |
| 130 | # TPipedTransportTest |
| 131 | # |
| 132 | TPipedTransportTest_SOURCES = \ |
| 133 | TPipedTransportTest.cpp |
| 134 | |
| 135 | TPipedTransportTest_LDADD = \ |
| 136 | $(top_builddir)/lib/cpp/libthrift.la |
| 137 | |
| 138 | # |
| 139 | # AllProtocolsTest |
| 140 | # |
| 141 | AllProtocolsTest_SOURCES = \ |
| 142 | AllProtocolTests.cpp \ |
| 143 | AllProtocolTests.tcc \ |
| 144 | GenericHelpers.h |
| 145 | |
| 146 | AllProtocolsTest_LDADD = libtestgencpp.la |
| 147 | |
| 148 | # |
| 149 | # DebugProtoTest |
| 150 | # |
| 151 | DebugProtoTest_SOURCES = \ |
| 152 | DebugProtoTest.cpp |
| 153 | |
| 154 | DebugProtoTest_LDADD = libtestgencpp.la |
| 155 | |
| 156 | |
| 157 | # |
| 158 | # JSONProtoTest |
| 159 | # |
| 160 | JSONProtoTest_SOURCES = \ |
| 161 | JSONProtoTest.cpp |
| 162 | |
| 163 | JSONProtoTest_LDADD = libtestgencpp.la |
| 164 | |
| 165 | # |
| 166 | # OptionalRequiredTest |
| 167 | # |
| 168 | OptionalRequiredTest_SOURCES = \ |
| 169 | OptionalRequiredTest.cpp |
| 170 | |
| 171 | OptionalRequiredTest_LDADD = libtestgencpp.la |
| 172 | |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 173 | # |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 174 | # OptionalRequiredTest |
| 175 | # |
| 176 | RecursiveTest_SOURCES = \ |
| 177 | RecursiveTest.cpp |
| 178 | |
| 179 | RecursiveTest_LDADD = libtestgencpp.la |
| 180 | |
| 181 | # |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 182 | # SpecializationTest |
| 183 | # |
| 184 | SpecializationTest_SOURCES = \ |
| 185 | SpecializationTest.cpp |
| 186 | |
| 187 | SpecializationTest_LDADD = libtestgencpp.la |
| 188 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 189 | concurrency_test_SOURCES = \ |
| 190 | concurrency/Tests.cpp \ |
| 191 | concurrency/ThreadFactoryTests.h \ |
| 192 | concurrency/ThreadManagerTests.h \ |
| 193 | concurrency/TimerManagerTests.h |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 194 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 195 | concurrency_test_LDADD = \ |
| 196 | $(top_builddir)/lib/cpp/libthrift.la |
| 197 | |
| 198 | processor_test_SOURCES = \ |
| 199 | processor/ProcessorTest.cpp \ |
| 200 | processor/EventLog.cpp \ |
| 201 | processor/ServerThread.cpp \ |
| 202 | processor/EventLog.h \ |
| 203 | processor/Handlers.h \ |
| 204 | processor/ServerThread.h |
| 205 | |
| 206 | processor_test_LDADD = libprocessortest.la \ |
| 207 | $(top_builddir)/lib/cpp/libthrift.la \ |
| 208 | $(top_builddir)/lib/cpp/libthriftnb.la \ |
| 209 | $(BOOST_LDFLAGS) \ |
| 210 | -levent \ |
Roger Meier | 73b58a2 | 2014-05-11 17:39:34 +0200 | [diff] [blame^] | 211 | -l:libboost_unit_test_framework.a |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 212 | # |
| 213 | # Common thrift code generation rules |
| 214 | # |
| 215 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 216 | |
| 217 | gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift |
| 218 | $(THRIFT) --gen cpp:dense $< |
| 219 | |
| 220 | gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift |
| 221 | $(THRIFT) --gen cpp:dense $< |
| 222 | |
jfarrell | e0e8316 | 2014-04-08 22:45:01 -0400 | [diff] [blame] | 223 | gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift |
| 224 | $(THRIFT) --gen cpp $< |
| 225 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 226 | gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift |
| 227 | $(THRIFT) --gen cpp:dense $< |
| 228 | |
| 229 | 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 |
| 230 | $(THRIFT) --gen cpp:dense $< |
| 231 | |
Roger Meier | 2b1a528 | 2012-05-11 10:12:39 +0000 | [diff] [blame] | 232 | gen-cpp/ChildService.cpp: processor/proc.thrift |
| 233 | $(THRIFT) --gen cpp:templates,cob_style $< |
| 234 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 235 | INCLUDES = \ |
| 236 | -I$(top_srcdir)/lib/cpp/src |
| 237 | |
| 238 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) |
Roger Meier | 3831578 | 2011-11-06 11:29:41 +0000 | [diff] [blame] | 239 | AM_LDFLAGS = $(BOOST_LDFLAGS) |
Jake Farrell | ea949fb | 2011-12-13 20:02:33 +0000 | [diff] [blame] | 240 | AM_CXXFLAGS = -Wall |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 241 | |
| 242 | clean-local: |
| 243 | $(RM) -r gen-cpp |
| 244 | |
| 245 | EXTRA_DIST = \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 246 | DenseProtoTest.cpp \ |
| 247 | ThriftTest_extras.cpp \ |
Jake Farrell | 7c7a5e0 | 2012-10-11 00:29:11 +0000 | [diff] [blame] | 248 | DebugProtoTest_extras.cpp \ |
| 249 | concurrency \ |
| 250 | processor |