Added stress test for thrift benchmarks
Modified TServer - made it a subclass of concurrency::Runnable to allow servers to be handed directly to concurreny::ThreadFactory when creating server threads.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664759 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/test/Makefile b/lib/cpp/src/test/Makefile
new file mode 100644
index 0000000..73206cd
--- /dev/null
+++ b/lib/cpp/src/test/Makefile
@@ -0,0 +1,50 @@
+# Makefile for Thrift test project.
+#
+# Author:
+# Marc Kwiatkowski <marc@facebook.com>
+
+
+ifndef thrift_home
+thrift_home=../../../../build
+endif #thrift_home
+
+target: all
+
+ifndef thirdparty
+thirdparty = ../../../../../../../thirdparty
+endif #thirdparty
+
+ifndef boost_home
+boost_home = /usr/local/include/boost-1_33_1
+endif #thrift_home
+target: all
+
+include_paths = $(thrift_home)/include/thrift \
+ $(boost_home)
+
+include_flags = $(patsubst %,-I%, $(include_paths))
+
+# Tools
+THRIFT = thrift
+CC = g++
+LD = g++
+
+# Compiler flags
+DCFL = -Wall -O3 -g -I cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
+CFL = -Wall -O3 -I cpp-gen $(include_flags) -L$(thrift_home)/lib -lthrift
+
+all: stress-test
+
+debug: stress-test-debug
+
+stubs: StressTest.thrift
+ $(THRIFT) --cpp StressTest.thrift
+
+stress-test-debug: stubs
+ g++ -o stress-test $(DCFL) main.cc cpp-gen/StressTest.cc
+
+stress-test: stubs
+ g++ -o stress-test $(CFL) main.cc cpp-gen/StressTest.cc
+
+clean:
+ rm -fr stress-test cpp-gen