THRIFT-503. cpp: Move the tests built by "make check" under lib/cpp
authorDavid Reiss <dreiss@apache.org>
Tue, 31 Aug 2010 16:51:19 +0000 (16:51 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 31 Aug 2010 16:51:19 +0000 (16:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991246 13f79535-47bb-0310-9956-ffa450edef68

21 files changed:
.gitignore
configure.ac
lib/cpp/Makefile.am
lib/cpp/test/AllProtocolTests.cpp [moved from test/AllProtocolTests.cpp with 100% similarity]
lib/cpp/test/AllProtocolTests.tcc [moved from test/AllProtocolTests.tcc with 100% similarity]
lib/cpp/test/Benchmark.cpp [moved from test/Benchmark.cpp with 100% similarity]
lib/cpp/test/DebugProtoTest.cpp [moved from test/DebugProtoTest.cpp with 100% similarity]
lib/cpp/test/DebugProtoTest_extras.cpp [moved from test/DebugProtoTest_extras.cpp with 100% similarity]
lib/cpp/test/DenseProtoTest.cpp [moved from test/DenseProtoTest.cpp with 100% similarity]
lib/cpp/test/GenericHelpers.h [moved from test/GenericHelpers.h with 100% similarity]
lib/cpp/test/JSONProtoTest.cpp [moved from test/JSONProtoTest.cpp with 100% similarity]
lib/cpp/test/Makefile.am [new file with mode: 0644]
lib/cpp/test/OptionalRequiredTest.cpp [moved from test/OptionalRequiredTest.cpp with 100% similarity]
lib/cpp/test/TBufferBaseTest.cpp [moved from test/TBufferBaseTest.cpp with 100% similarity]
lib/cpp/test/TFDTransportTest.cpp [moved from test/TFDTransportTest.cpp with 100% similarity]
lib/cpp/test/TMemoryBufferTest.cpp [moved from test/TMemoryBufferTest.cpp with 100% similarity]
lib/cpp/test/TPipedTransportTest.cpp [moved from test/TPipedTransportTest.cpp with 100% similarity]
lib/cpp/test/ThriftTest_extras.cpp [moved from test/ThriftTest_extras.cpp with 100% similarity]
lib/cpp/test/UnitTestMain.cpp [moved from test/UnitTestMain.cpp with 100% similarity]
lib/cpp/test/ZlibTest.cpp [moved from test/ZlibTest.cpp with 100% similarity]
test/Makefile.am

index a9d981b..e89b041 100644 (file)
 /lib/cpp/.libs
 /lib/cpp/Makefile
 /lib/cpp/Makefile.in
+/lib/cpp/test/.deps
+/lib/cpp/test/.libs
+/lib/cpp/test/gen-cpp
+/lib/cpp/test/Makefile
+/lib/cpp/test/Makefile.in
+/lib/cpp/test/Benchmark
+/lib/cpp/test/DebugProtoTest
+/lib/cpp/test/JSONProtoTest
+/lib/cpp/test/OptionalRequiredTest
+/lib/cpp/test/ReflectionTest
+/lib/cpp/test/TFDTransportTest
+/lib/cpp/test/TPipedTransportTest
+/lib/cpp/test/UnitTests
+/lib/cpp/test/*.la
+/lib/cpp/test/*.lo
+/lib/cpp/test/*.o
 /lib/cpp/concurrency_test
 /lib/cpp/*.o
 /lib/cpp/*.la
 /ltmain.sh
 /missing
 /stamp-h1
-/test/.deps
-/test/.libs
-/test/*.o
-/test/*.la
-/test/*.lo
-/test/Benchmark
-/test/DebugProtoTest
-/test/JSONProtoTest
-/test/TFDTransportTest
-/test/TPipedTransportTest
-/test/UnitTests
 /test/Makefile
 /test/Makefile.in
-/test/OptionalRequiredTest
-/test/ReflectionTest
-/test/gen-cpp
 /test/py/Makefile
 /test/py/Makefile.in
 /test/py/gen-py
index 3175a7b..b440ccb 100644 (file)
@@ -292,6 +292,7 @@ AC_CONFIG_FILES([
   compiler/cpp/version.h
   lib/Makefile
   lib/cpp/Makefile
+  lib/cpp/test/Makefile
   lib/cpp/thrift.pc
   lib/cpp/thrift-nb.pc
   lib/cpp/thrift-z.pc
index e83b182..664a58a 100644 (file)
@@ -17,6 +17,8 @@
 # under the License.
 #
 
+SUBDIRS = . test
+
 pkgconfigdir = $(libdir)/pkgconfig
 
 lib_LTLIBRARIES = libthrift.la
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
new file mode 100644 (file)
index 0000000..0585250
--- /dev/null
@@ -0,0 +1,147 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+noinst_LTLIBRARIES = libtestgencpp.la
+nodist_libtestgencpp_la_SOURCES = \
+       gen-cpp/DebugProtoTest_types.cpp \
+       gen-cpp/OptionalRequiredTest_types.cpp \
+       gen-cpp/DebugProtoTest_types.cpp \
+       gen-cpp/ThriftTest_types.cpp \
+       gen-cpp/DebugProtoTest_types.h \
+       gen-cpp/OptionalRequiredTest_types.h \
+       gen-cpp/ThriftTest_types.h \
+       ThriftTest_extras.cpp \
+       DebugProtoTest_extras.cpp
+
+ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
+DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
+
+libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
+
+noinst_PROGRAMS = Benchmark
+
+Benchmark_SOURCES = \
+       Benchmark.cpp
+
+Benchmark_LDADD = libtestgencpp.la
+
+check_PROGRAMS = \
+       TFDTransportTest \
+       TPipedTransportTest \
+       DebugProtoTest \
+       JSONProtoTest \
+       OptionalRequiredTest \
+       AllProtocolsTest \
+       UnitTests
+
+TESTS = \
+       $(check_PROGRAMS)
+
+UnitTests_SOURCES = \
+       UnitTestMain.cpp \
+       TMemoryBufferTest.cpp \
+       TBufferBaseTest.cpp
+
+UnitTests_LDADD = libtestgencpp.la -lboost_unit_test_framework
+
+#
+# TFDTransportTest
+#
+TFDTransportTest_SOURCES = \
+       TFDTransportTest.cpp
+
+TFDTransportTest_LDADD = \
+       $(top_builddir)/lib/cpp/libthrift.la
+
+
+#
+# TPipedTransportTest
+#
+TPipedTransportTest_SOURCES = \
+       TPipedTransportTest.cpp
+
+TPipedTransportTest_LDADD = \
+       $(top_builddir)/lib/cpp/libthrift.la
+
+#
+# AllProtocolsTest
+#
+AllProtocolsTest_SOURCES = \
+       AllProtocolTests.cpp \
+       AllProtocolTests.tcc \
+       GenericHelpers.h
+
+AllProtocolsTest_LDADD = libtestgencpp.la
+
+#
+# DebugProtoTest
+#
+DebugProtoTest_SOURCES = \
+       DebugProtoTest.cpp
+
+DebugProtoTest_LDADD = libtestgencpp.la
+
+
+#
+# JSONProtoTest
+#
+JSONProtoTest_SOURCES = \
+       JSONProtoTest.cpp
+
+JSONProtoTest_LDADD = libtestgencpp.la
+
+#
+# OptionalRequiredTest
+#
+OptionalRequiredTest_SOURCES = \
+       OptionalRequiredTest.cpp
+
+OptionalRequiredTest_LDADD = libtestgencpp.la
+
+
+#
+# Common thrift code generation rules
+#
+THRIFT = $(top_builddir)/compiler/cpp/thrift
+
+gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
+       $(THRIFT) --gen cpp:dense $<
+
+gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
+       $(THRIFT) --gen cpp:dense $<
+
+gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
+       $(THRIFT) --gen cpp:dense $<
+
+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
+       $(THRIFT) --gen cpp:dense $<
+
+INCLUDES = \
+       -I$(top_srcdir)/lib/cpp/src
+
+AM_CPPFLAGS = $(BOOST_CPPFLAGS)
+
+clean-local:
+       $(RM) -r gen-cpp
+
+EXTRA_DIST = \
+       ZlibTest.cpp \
+       DenseProtoTest.cpp \
+       ThriftTest_extras.cpp \
+       DebugProtoTest_extras.cpp
similarity index 100%
rename from test/ZlibTest.cpp
rename to lib/cpp/test/ZlibTest.cpp
index 5fd4f0d..7256f21 100644 (file)
@@ -27,128 +27,6 @@ if WITH_RUBY
 SUBDIRS += rb
 endif
 
-noinst_LTLIBRARIES = libtestgencpp.la
-nodist_libtestgencpp_la_SOURCES = \
-       gen-cpp/DebugProtoTest_types.cpp \
-       gen-cpp/OptionalRequiredTest_types.cpp \
-       gen-cpp/DebugProtoTest_types.cpp \
-       gen-cpp/ThriftTest_types.cpp \
-       gen-cpp/DebugProtoTest_types.h \
-       gen-cpp/OptionalRequiredTest_types.h \
-       gen-cpp/ThriftTest_types.h \
-       ThriftTest_extras.cpp \
-       DebugProtoTest_extras.cpp
-
-ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
-DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
-
-libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
-
-noinst_PROGRAMS = Benchmark
-
-Benchmark_SOURCES = \
-       Benchmark.cpp
-
-Benchmark_LDADD = libtestgencpp.la
-
-check_PROGRAMS = \
-       TFDTransportTest \
-       TPipedTransportTest \
-       DebugProtoTest \
-       JSONProtoTest \
-       OptionalRequiredTest \
-       AllProtocolsTest \
-       UnitTests
-
-TESTS = \
-       $(check_PROGRAMS)
-
-UnitTests_SOURCES = \
-       UnitTestMain.cpp \
-       TMemoryBufferTest.cpp \
-       TBufferBaseTest.cpp
-
-UnitTests_LDADD = libtestgencpp.la -lboost_unit_test_framework
-
-#
-# TFDTransportTest
-#
-TFDTransportTest_SOURCES = \
-       TFDTransportTest.cpp
-
-TFDTransportTest_LDADD = \
-       $(top_builddir)/lib/cpp/libthrift.la
-
-
-#
-# TPipedTransportTest
-#
-TPipedTransportTest_SOURCES = \
-       TPipedTransportTest.cpp
-
-TPipedTransportTest_LDADD = \
-       $(top_builddir)/lib/cpp/libthrift.la
-
-#
-# AllProtocolsTest
-#
-AllProtocolsTest_SOURCES = \
-       AllProtocolTests.cpp \
-       AllProtocolTests.tcc \
-       GenericHelpers.h
-
-AllProtocolsTest_LDADD = libtestgencpp.la
-
-#
-# DebugProtoTest
-#
-DebugProtoTest_SOURCES = \
-       DebugProtoTest.cpp
-
-DebugProtoTest_LDADD = libtestgencpp.la
-
-
-#
-# JSONProtoTest
-#
-JSONProtoTest_SOURCES = \
-       JSONProtoTest.cpp
-
-JSONProtoTest_LDADD = libtestgencpp.la
-
-#
-# OptionalRequiredTest
-#
-OptionalRequiredTest_SOURCES = \
-       OptionalRequiredTest.cpp
-
-OptionalRequiredTest_LDADD = libtestgencpp.la
-
-
-#
-# Common thrift code generation rules
-#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
-gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: DebugProtoTest.thrift
-       $(THRIFT) --gen cpp:dense $<
-
-gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: OptionalRequiredTest.thrift
-       $(THRIFT) --gen cpp:dense $<
-
-gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: StressTest.thrift
-       $(THRIFT) --gen cpp:dense $<
-
-gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: ThriftTest.thrift
-       $(THRIFT) --gen cpp:dense $<
-
-INCLUDES = \
-       -I$(top_srcdir)/lib/cpp/src
-
-AM_CPPFLAGS = $(BOOST_CPPFLAGS)
-
-clean-local:
-       $(RM) -r gen-cpp
 
 EXTRA_DIST = \
        cpp \
@@ -173,9 +51,4 @@ EXTRA_DIST = \
        SmallTest.thrift \
        StressTest.thrift \
        ThriftTest.thrift \
-       ZlibTest.cpp \
-       DenseProtoTest.cpp \
-       FastbinaryTest.py \
-       ThriftTest_extras.cpp \
-       DebugProtoTest_extras.cpp
-
+       FastbinaryTest.py