Author: jfrederic.clere(a)jboss.com
Date: 2011-01-12 02:25:50 -0500 (Wed, 12 Jan 2011)
New Revision: 2717
Modified:
trunk/build/unix/buildbin.TC7.sh
Log:
Add logic to test native too.
Modified: trunk/build/unix/buildbin.TC7.sh
===================================================================
--- trunk/build/unix/buildbin.TC7.sh 2011-01-11 14:26:15 UTC (rev 2716)
+++ trunk/build/unix/buildbin.TC7.sh 2011-01-12 07:25:50 UTC (rev 2717)
@@ -81,6 +81,8 @@
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/conf/web.xml.jsp"
$native_sources/output/build/conf/web.xml > $$.xml
+mv $$.xml $native_sources/output/build/conf/web.xml
(cd $native_sources/output/build; bin/startup.sh)
echo ""
@@ -105,7 +107,65 @@
echo "Stopping TC7..."
echo ""
(cd $native_sources/output/build; bin/shutdown.sh)
+
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
+PACKVER=jboss-native-2.0.10-dev
+EXT=-ssl.tar.gz
+TARBALL=https://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuccessfulBuild/artifact/jbossnative/build/unix/output/${PACKVER}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
+(cd $native_sources/output/build
+ wget $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...
+(cd $native_sources/output/build; bin/startup.sh)
+echo ""
+echo "Waiting for Tomcat to start"
+sleep 20
+echo ""
+grep Http11AprProtocol $native_sources/output/build/logs/catalina.out
+if [ $? -ne 0 ]; then
+ echo "Failed can't start native..."
+ (cd $native_sources/output/build; bin/shutdown.sh)
+ 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) || exit 1
+(cd $TS_HOME/bin; ant report || exit 1) || exit 1
+
+echo ""
+echo "Stopping TC7..."
+echo ""
+(cd $native_sources/output/build; bin/shutdown.sh)
+
echo "Done"
echo ""
exit 0