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