Author: jfrederic.clere(a)jboss.com
Date: 2012-10-15 04:09:25 -0400 (Mon, 15 Oct 2012)
New Revision: 2968
Added:
trunk/build/unix/buildbin.TC6.sh
trunk/build/unix/buildsrc.TC6.sh
trunk/build/unix/buildtest.TC6.sh
Log:
Add TC6 tests.
Added: trunk/build/unix/buildbin.TC6.sh
===================================================================
--- trunk/build/unix/buildbin.TC6.sh (rev 0)
+++ trunk/build/unix/buildbin.TC6.sh 2012-10-15 08:09:25 UTC (rev 2968)
@@ -0,0 +1,216 @@
+#!/bin/sh
+# Copyright(c) 2012 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2009-07-09 18:37:49 +0200 (Thu, 09
Jul 2009) $"
+echo ""
+echo "Started : `date`"
+echo "Common : $1"
+echo "Prefix : $2"
+echo "Output : $3"
+echo "OpenSSL : $4"
+echo "Static : $5"
+echo "Sources : $6"
+echo ""
+
+
+# parameters
+# $1: Location of the common libraries.
+# $2: Destination location.
+# $3: Location where to put the binaries.
+# $4: Use OpenSSL.
+# $5: Use static build.
+# $6: Location of the sources.
+
+common_loc=$1
+prefix_loc=$2
+output_loc=$3
+has_openssl_loc=$4
+has_static_loc=$5
+sources_loc=$6
+
+# Stop Tomcat
+stopTomcat()
+{
+(cd $native_sources/output/build; bin/shutdown.sh)
+sleep 10
+PID=`ps -ef | grep $native_sources | grep java | awk ' { print $2 } '`
+if [ x$PID != "x" ]; then
+ kill -15 $PID
+ sleep 10
+fi
+}
+
+current_loc=`pwd`
+native_sources=srclib/`ls srclib | grep TC6`
+native_sources=`(cd $native_sources; pwd)`
+cd $native_sources
+ant || exit 1
+
+echo ""
+echo "Stopping tomcat (just in case)"
+echo ""
+stopTomcat
+
+echo ""
+echo "Running ant tests"
+ant test || exit 1
+echo "Ant test Done"
+echo ""
+echo "Running TCK tests"
+cp $HOME/tcks/conf/* $native_sources/output/build/conf
+(cd $HOME/tcks/servlet; bash install.sh $native_sources/output/build)
+(cd $HOME/tcks/jsp; bash install.sh $native_sources/output/build)
+sed "/@SSL_CONNECTOR@/r $HOME/tcks/conf/server.xml.jce"
$HOME/tcks/conf/server.xml | sed "/@SSL_CONNECTOR@/d" >
$native_sources/output/build/conf/server.xml
+
+cat > $native_sources/output/build/bin/setenv.sh << EOF
+JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
-Dorg.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR=false
-Dsun.security.ssl.allowUnsafeRenegotiation=true"
+export JAVA_OPTS
+EOF
+sed "/org.apache.jasper.servlet.JspServlet/r $HOME/tcks/conf/web.xml.jsp"
$native_sources/output/build/conf/web.xml > $$.xml
+mv $$.xml $native_sources/output/build/conf/web.xml
+
+# Starting tomcat...
+rm -rf $native_sources/output/build/work
+rm -rf $native_sources/output/build/logs
+mkdir $native_sources/output/build/logs
+(cd $native_sources/output/build; bin/startup.sh)
+echo ""
+echo "Waiting for Tomcat to start"
+sleep 20
+echo ""
+echo "Running TCK tests..."
+echo "SERVLETS"
+echo ""
+export TS_HOME=/home/hudson/tcks/servlet/servlettck
+export ANT_HOME=$TS_HOME/tools/ant
+(cd $TS_HOME/bin; ant run.all || exit 1)
+if [ $? -ne 0 ];then
+ stopTomcat
+ exit 1
+fi
+(cd $TS_HOME/bin; ant report || exit 1)
+if [ $? -ne 0 ];then
+ stopTomcat
+ exit 1
+fi
+
+echo "JSP"
+
+export TS_HOME=/home/hudson/tcks/jsp/jsptck
+export ANT_HOME=$TS_HOME/tools/ant
+(cd $TS_HOME/bin; ant run.all || exit 1)
+if [ $? -ne 0 ];then
+ stopTomcat
+ exit 1
+fi
+(cd $TS_HOME/bin; ant report || exit 1)
+if [ $? -ne 0 ];then
+ stopTomcat
+ exit 1
+fi
+echo ""
+echo "Stopping TC6..."
+echo ""
+stopTomcat
+
+echo ""
+echo "Testing with native"
+echo ""
+# find the native we need to download for the tests.
+is64=false
+java -version 2>&1 | grep 64
+if [ $? -eq 0 ]; then
+ is64=true
+fi
+# Something like
https://hudson.qa.jboss.com/hudson/view/Native/job/JBossWebNative-linux-x...
+BASE=JBossWebNative-linux-x86_64
+EXT=ssl.tar.gz
+#VERNAT=2.0.10
+#PACKVER=jboss-native-${VERNAT}-dev
+#TARBALL=https://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuccessfulBuild/artifact/jbossnative/build/unix/output/${PACKVER}-${BUILD_SYS}-${BUILD_CPU}-${EXT}
+
+VERNAT=2.0.9
+PACKVER=jboss-native-${VERNAT}
+TARBALL=http://downloads.jboss.org/jbossnative/${VERNAT}.GA/${PACKVER}-${BUILD_SYS}-${BUILD_CPU}-${EXT}
+(cd $native_sources/output/build
+ wget --no-check-certificate $TARBALL
+ fname=`basename $TARBALL`
+ case ${fname} in
+ *.tar.gz)
+ gunzip -c $fname | tar -xf -
+ ;;
+ *.zip)
+ unzip -q -o $fname
+ ;;
+ esac
+)
+sed "/@SSL_CONNECTOR@/r $HOME/tcks/conf/server.xml.apr"
$HOME/tcks/conf/server.xml | sed "/@SSL_CONNECTOR@/d" >
$native_sources/output/build/conf/server.xml
+cat >> $native_sources/output/build/bin/setenv.sh << EOF
+LD_LIBRARY_PATH=$native_sources/output/build/bin/native/
+export LD_LIBRARY_PATH
+EOF
+
+# Starting tomcat...
+rm -rf $native_sources/output/build/work
+rm -rf $native_sources/output/build/logs
+mkdir $native_sources/output/build/logs
+(cd $native_sources/output/build; bin/startup.sh)
+echo ""
+echo "Waiting for Tomcat to start"
+sleep 60
+echo ""
+grep http-apr $native_sources/output/build/logs/catalina.out
+if [ $? -ne 0 ]; then
+ echo "Failed can't start native..."
+ stopTomcat
+ exit 1
+fi
+
+echo "Running TCK tests..."
+echo "SERVLETS"
+echo ""
+export TS_HOME=/home/hudson/tcks/servlet/servlettck
+export ANT_HOME=$TS_HOME/tools/ant
+(cd $TS_HOME/bin; ant run.all || exit 1)
+if [ $? -ne 0 ]; then
+ echo "Failed test failed..."
+ stopTomcat
+ exit 1
+else
+ (cd $TS_HOME/bin; ant report || exit 1)
+ if [ $? -ne 0 ]; then
+ echo "Failed build test report failed..."
+ stopTomcat
+ exit 1
+ fi
+fi
+
+echo ""
+echo "Stopping TC6..."
+echo ""
+stopTomcat
+
+echo "Done"
+echo ""
+exit 0
Property changes on: trunk/build/unix/buildbin.TC6.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/build/unix/buildsrc.TC6.sh
===================================================================
--- trunk/build/unix/buildsrc.TC6.sh (rev 0)
+++ trunk/build/unix/buildsrc.TC6.sh 2012-10-15 08:09:25 UTC (rev 2968)
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Copyright(c) 2012 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2009-10-27 08:23:43 +0100 (Tue, 27
Oct 2009) $"
+echo ""
+echo "Started : `date`"
+echo "Tag : $1"
+echo "Target : $2"
+echo ""
+
+# parameters
+# $1: The tag to use something like 2.2.6 or trunk
+# $2: Directory where to put the sources.
+
+tag=$1
+dist=$2
+
+# we need something like:
+#
http://anonsvn.jboss.org/repos/mod_cluster/trunk/
+case $tag in
+ trunk)
+
URLBASE=http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk
+ ;;
+ branches/*)
+
URLBASE=http://svn.apache.org/repos/asf/tomcat/tc6.0.x/branches/${tag}
+ ;;
+ *)
+
URLBASE=http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/${tag}
+ ;;
+esac
+
+echo "$tag using $URLBASE"
+(cd $package_src_dir/srclib
+svn export ${URLBASE} TC6
+)
+if [ $? -ne 0 ]; then
+ echo "svn co ${URLBASE} TC6 FAILED"
+ exit 1
+fi
+if [ ! -d $package_src_dir/srclib/TC6 ]; then
+ echo "$package_src_dir/srclib/TC6 not found!"
+ echo "svn co ${URLBASE} TC6 FAILED"
+ exit 1
+fi
Property changes on: trunk/build/unix/buildsrc.TC6.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/build/unix/buildtest.TC6.sh
===================================================================
--- trunk/build/unix/buildtest.TC6.sh (rev 0)
+++ trunk/build/unix/buildtest.TC6.sh 2012-10-15 08:09:25 UTC (rev 2968)
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright(c) 2012 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+# Run a test of the traffic_server.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+# $4 : Name or IP to use for the tests.
+# $5 : Do the SSL stuff.
+
+base=$1
+root=$2
+build_cache_dir=$3
+IPLOCAL=$4
+loc_has_ssl=$5
+
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2009-10-29 08:26:17 +0100 (Thu, 29
Oct 2009) $"
+echo ""
+
+echo ""
+echo "SUCCESS : `basename $0` $LastChangedDate: 2009-10-29 08:26:17 +0100 (Thu, 29
Oct 2009) $"
+echo ""
+exit 0
Property changes on: trunk/build/unix/buildtest.TC6.sh
___________________________________________________________________
Added: svn:executable
+ *