Skip to content

Commit

Permalink
THRIFT-503. cpp: Move the tests built by "make check" under lib/cpp
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991246 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
David Reiss committed Aug 31, 2010
1 parent f261dd7 commit 351e22b
Show file tree
Hide file tree
Showing 21 changed files with 167 additions and 142 deletions.
30 changes: 16 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@
/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
Expand Down Expand Up @@ -68,22 +84,8 @@
/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
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/cpp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# under the License.
#

SUBDIRS = . test

pkgconfigdir = $(libdir)/pkgconfig

lib_LTLIBRARIES = libthrift.la
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
147 changes: 147 additions & 0 deletions lib/cpp/test/Makefile.am
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
129 changes: 1 addition & 128 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 351e22b

Please sign in to comment.