Author: jfrederic.clere(a)jboss.com
Date: 2014-04-30 10:55:11 -0400 (Wed, 30 Apr 2014)
New Revision: 3273
Modified:
trunk/build/unix/buildbin.TC8.sh
Log:
Add servlet tests.
Modified: trunk/build/unix/buildbin.TC8.sh
===================================================================
--- trunk/build/unix/buildbin.TC8.sh 2014-04-30 13:41:02 UTC (rev 3272)
+++ trunk/build/unix/buildbin.TC8.sh 2014-04-30 14:55:11 UTC (rev 3273)
@@ -65,7 +65,6 @@
native_sources=srclib/`ls srclib | grep TC8`
native_sources=`(cd $native_sources; pwd)`
cd $native_sources
-JAVA_HOME=$JAVA_7_HOME
echo "Using $JAVA_HOME for ant"
ant || exit 1
@@ -80,88 +79,48 @@
echo "Ant test Done"
echo ""
-echo ""
-echo "Stopping TC8"
-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
-OS=`uname -s`
-# Something like
https://hudson.qa.jboss.com/hudson/view/Native/job/JBossWebNative-linux-x...
-case $OS in
- Linux)
- BASE=JBossWebNative-linux-x86_64
- ;;
- Darwin)
- BASE=JBossWebNative-macosx-x64
- ;;
- *)
- echo "Unknow OS: $OS"
- exit 1
- ;;
-esac
-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.12-dev
-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...
+# Cleaning
rm -rf $native_sources/output/build/work
rm -rf $native_sources/output/build/logs
+rm -rf $native_sources/output/build/webapps
mkdir $native_sources/output/build/logs
+mkdir $native_sources/output/build/webapps
+
+#installing
+export TS_HOME=/home/hudson/TCK7/javaeetck
+export ANT_HOME=$TS_HOME/tools/ant
+DIR=$TS_HOME/dist/com/sun/ts/tests/servlet
+RID=$TS_HOME/src/com/sun/ts/tests/servlet
+for file in `find $DIR -name *.war`
+do
+ FILE=`basename $file`
+ rm -rf TMP
+ mkdir TMP
+ cd TMP
+ jar xvf $file
+ rm META-INF/MANIFEST.MF
+ jar cvf $FILE *
+ cp $FILE $native_sources/output/build/webapps
+ cd -
+done
+
+# Starting tomcat...
(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)
+(cd $RID; ant runclient || exit 1)
if [ $? -ne 0 ]; then
echo "Failed test failed..."
stopTomcat
exit 1
else
- (cd $TS_HOME/bin; ant report || exit 1)
+ (cd $RID; ant report || exit 1)
if [ $? -ne 0 ]; then
echo "Failed build test report failed..."
stopTomcat