THRIFT-913 Test Case for Url encoded strings + simple enhancement to lib/js/test/RunTestServer.sh
and ignore gen-* and *.class
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1022907 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/test/RunTestServer.sh b/lib/js/test/RunTestServer.sh
index 574f7c5..4c41ac1 100755
--- a/lib/js/test/RunTestServer.sh
+++ b/lib/js/test/RunTestServer.sh
@@ -19,17 +19,26 @@
# under the License.
#
-LOG4J="../../java/build/ivy/lib/slf4j-api-1.5.8.jar:../../java/build/ivy/lib/log4j-1.2.15.jar:../../java/build/ivy/lib/slf4j-simple-1.5.8.jar"
+LOG4J="../../java/build/ivy/lib/slf4j-api-1.5.8.jar:../../java/build/ivy/lib/log4j-1.2.14.jar:../../java/build/ivy/lib/slf4j-log4j12-1.5.8.jar"
HTTPCORE="./httpcore-4.0.1.jar"
if [ -f ${HTTPCORE} ]
then
echo "compiling test..."
else
- echo "Missing required file ${HTTPCORE}"
- echo "You can download this from http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz"
- echo "Place the jar in this directory and try again."
- exit
+ echo "try to download httpcore..."
+
+ wget http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz
+ # extract required jar file
+ tar -xzf httpcomponents-core-4.0.1-bin.tar.gz httpcomponents-core-4.0.1/lib/httpcore-4.0.1.jar --to-stdout > ${HTTPCORE}
+
+ if [ ! -f ${HTTPCORE} ]
+ then
+ echo "Missing required file ${HTTPCORE}"
+ echo "You can download this from http://archive.apache.org/dist/httpcomponents/httpcore/binary/httpcomponents-core-4.0.1-bin.tar.gz"
+ echo "Place the jar in this directory and try again."
+ exit
+ fi
fi
../../../compiler/cpp/thrift --gen java ../../../test/ThriftTest.thrift