THRIFT-1336 thrift: added server and processor test code

move the tests from src to test:
lib\cpp\src\thrift\concurrency\test to lib\cpp\test\concurrency
lib\cpp\src\thrift\processor\test to lib\cpp\test\processor

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1337098 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
old mode 100644
new mode 100755
index bf41935..f7b1c26
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-noinst_LTLIBRARIES = libtestgencpp.la
+noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
 nodist_libtestgencpp_la_SOURCES = \
 	gen-cpp/DebugProtoTest_types.cpp \
 	gen-cpp/OptionalRequiredTest_types.cpp \
@@ -29,6 +29,14 @@
 	ThriftTest_extras.cpp \
 	DebugProtoTest_extras.cpp
 
+nodist_libprocessortest_la_SOURCES = \
+	gen-cpp/ChildService.cpp \
+	gen-cpp/ChildService.h \
+	gen-cpp/ParentService.cpp \
+	gen-cpp/ParentService.h \
+	gen-cpp/proc_types.cpp \
+	gen-cpp/proc_types.h
+
 ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
 DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
 
@@ -52,7 +60,9 @@
 	TransportTest \
 	ZlibTest \
 	TFileTransportTest \
-	UnitTests
+	UnitTests \
+	concurrency_test \
+	processor_test
 
 TESTS_ENVIRONMENT= \
 	BOOST_TEST_LOG_SINK=tests.xml \
@@ -163,7 +173,29 @@
 
 SpecializationTest_LDADD = libtestgencpp.la
 
+concurrency_test_SOURCES = \
+	concurrency/Tests.cpp \
+	concurrency/ThreadFactoryTests.h \
+	concurrency/ThreadManagerTests.h \
+	concurrency/TimerManagerTests.h
 
+concurrency_test_LDADD = \
+  $(top_builddir)/lib/cpp/libthrift.la
+
+processor_test_SOURCES = \
+	processor/ProcessorTest.cpp \
+	processor/EventLog.cpp \
+	processor/ServerThread.cpp \
+	processor/EventLog.h \
+	processor/Handlers.h \
+	processor/ServerThread.h
+
+processor_test_LDADD = libprocessortest.la \
+                       $(top_builddir)/lib/cpp/libthrift.la \
+                       $(top_builddir)/lib/cpp/libthriftnb.la \
+                       $(BOOST_LDFLAGS) \
+                       -levent \
+                       $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
 #
 # Common thrift code generation rules
 #
@@ -181,6 +213,9 @@
 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 $<
 
+gen-cpp/ChildService.cpp: processor/proc.thrift
+	$(THRIFT) --gen cpp:templates,cob_style $<
+
 INCLUDES = \
 	-I$(top_srcdir)/lib/cpp/src