geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r599660 - /geronimo/gbuild/daily_build_scripts/testsuite.sh
Date Fri, 30 Nov 2007 00:35:38 GMT
Author: gawor
Date: Thu Nov 29 16:35:36 2007
New Revision: 599660

URL: http://svn.apache.org/viewvc?rev=599660&view=rev
Log:
refactor the script to test both assemblies

Modified:
    geronimo/gbuild/daily_build_scripts/testsuite.sh

Modified: geronimo/gbuild/daily_build_scripts/testsuite.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/testsuite.sh?rev=599660&r1=599659&r2=599660&view=diff
==============================================================================
--- geronimo/gbuild/daily_build_scripts/testsuite.sh (original)
+++ geronimo/gbuild/daily_build_scripts/testsuite.sh Thu Nov 29 16:35:36 2007
@@ -30,10 +30,8 @@
 
 BRANCH_ID=$1
 BRANCH_DIR=$2
-TEST_DIR=/home/prasad/geronimo/$BRANCH_DIR
-
-LOG_DIR_NAME=logs-$ts
-LOG_DIR=$TEST_DIR/$LOG_DIR_NAME
+BRANCH_TEST_DIR=/home/prasad/geronimo/$BRANCH_DIR
+MAIL_FILE=$BRANCH_TEST_DIR/mail.txt
 
 function createLogsDir() {
    FILES=`find . -name $1`
@@ -45,41 +43,62 @@
    done
 }
 
-mkdir -p $LOG_DIR
-testLog=$LOG_DIR/test.log
-ds=`date +%Y%m%d`
-
-cd $TEST_DIR/testsuite
-mvn -B -Pheadless,default -DassemblyId=tomcat -DexcludeTest=test-jetty > $testLog
-mvn -B site-deploy -DbuildNumber=$ds-$BRANCH_ID > deploy.log
-
-createLogsDir geronimo.log
-
-scp -r $LOG_DIR prasad@people:$bin_dir
-
-echo " " >> ../mail.txt
-echo "TESTSUITE RESULTS (Failures only)" >> ../mail.txt
-echo "=================================" >> ../mail.txt
-echo "See detailed results at http://people.apache.org/~prasad/testsuite/ResultsSummary.html"
>> ../mail.txt
-echo "See the full test.log file at http://people.apache.org/~prasad/binaries/$BRANCH_DIR/$dir/$LOG_DIR_NAME/test.log"
>> ../mail.txt
-echo " " >> ../mail.txt
-grep -E "Running|FAILURE!" $testLog | grep -B1 "FAILURE!" >> ../mail.txt
-echo " " >> ../mail.txt
-
-# append server.log 
-grep "Failed to start Geronimo server" $testLog
-if [ $? -eq 0 ]
-then
-  y=`grep -B5 "Failed to start Geronimo server" $testLog | grep "Redirecting"`
-  serverLog=`echo $y | awk -F: '{print $2}'`
-  cat $serverLog >> ../mail.txt
-fi
-
-# append 100 lines before BUILD ERROR
-grep "BUILD ERROR" $testLog
-if [ $? -eq 0 ]
-then
-   grep -B100 "BUILD ERROR" $testLog >> ../mail.txt
-fi
+function runTests() {
+   CONTAINER=$1
+   EXCLUDE_TESTS=$2
+
+   LOG_DIR_NAME=logs-$ts-$CONTAINER
+   LOG_DIR=$BRANCH_TEST_DIR/$LOG_DIR_NAME
+
+   mkdir -p $LOG_DIR
+   testLog=$LOG_DIR/test.log
+   ds=`date +%Y%m%d`
+
+   cd $BRANCH_TEST_DIR/testsuite
+   mvn -B -Pheadless,default -DassemblyId=$CONTAINER -DexcludeTest=$EXCLUDE_TESTS > $testLog
+   mvn -B site-deploy -DbuildNumber=$ds-$BRANCH_ID-$CONTAINER >> deploy.log
+
+   createLogsDir geronimo.log
+
+   scp -r $LOG_DIR prasad@people:$bin_dir
+
+   echo " " >> $MAIL_FILE
+   echo "Assembly: $CONTAINER" >> $MAIL_FILE
+   echo "=================================" >> $MAIL_FILE
+   echo "See the full test.log file at http://people.apache.org/~prasad/binaries/$BRANCH_DIR/$dir/$LOG_DIR_NAME/test.log"
>> $MAIL_FILE
+   echo " " >> $MAIL_FILE
+   grep -E "Running|FAILURE!" $testLog | grep -B1 "FAILURE!" >> $MAIL_FILE
+
+   # append server.log 
+   grep "Failed to start Geronimo server" $testLog
+   if [ $? -eq 0 ]
+   then
+     y=`grep -B5 "Failed to start Geronimo server" $testLog | grep "Redirecting"`
+     serverLog=`echo $y | awk -F: '{print $2}'`
+     echo " " >> $MAIL_FILE
+     cat $serverLog >> $MAIL_FILE
+   fi
+
+   # append 100 lines before BUILD ERROR
+   grep "BUILD ERROR" $testLog
+   if [ $? -eq 0 ]
+   then
+     echo " " >> $MAIL_FILE
+     grep -B100 "BUILD ERROR" $testLog >> $MAIL_FILE
+   fi
+
+   cd $BRANCH_TEST_DIR
+}
+
+echo " " >> $MAIL_FILE
+echo "TESTSUITE RESULTS (Failures only)" >> $MAIL_FILE
+echo "=================================" >> $MAIL_FILE
+echo "See detailed results at http://people.apache.org/~prasad/testsuite/ResultsSummary.html"
>> $MAIL_FILE
+
+runTests tomcat test-jetty
+
+cd $BRANCH_TEST_DIR/testsuite
+mvn clean
+cd $BRANCH_TEST_DIR
 
-cd ..
+runTests jetty test-tomcat



Mime
View raw message