geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r583850 - in /geronimo/gbuild/daily_build_scripts: ./ gbuild.sh openejb.sh tck.sh testsuite.sh
Date Thu, 11 Oct 2007 15:23:06 GMT
Author: prasad
Date: Thu Oct 11 08:23:05 2007
New Revision: 583850

URL: http://svn.apache.org/viewvc?rev=583850&view=rev
Log:
* checking in scripts that run daily build, run testsuite and tck smoketests

Added:
    geronimo/gbuild/daily_build_scripts/
    geronimo/gbuild/daily_build_scripts/gbuild.sh   (with props)
    geronimo/gbuild/daily_build_scripts/openejb.sh   (with props)
    geronimo/gbuild/daily_build_scripts/tck.sh   (with props)
    geronimo/gbuild/daily_build_scripts/testsuite.sh   (with props)

Added: geronimo/gbuild/daily_build_scripts/gbuild.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/gbuild.sh?rev=583850&view=auto
==============================================================================
--- geronimo/gbuild/daily_build_scripts/gbuild.sh (added)
+++ geronimo/gbuild/daily_build_scripts/gbuild.sh Thu Oct 11 08:23:05 2007
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+export MVN_HOME=/usr/local/maven
+export JAVA_HOME=/usr/local/java
+export JRE_HOME=/usr/lib/jvm/jre
+export PATH=$JRE_HOME/bin:$JAVA_HOME/bin:$MVN_HOME/bin:$PATH
+export MAVEN_OPTS="-XX:MaxPermSize=256m -Xms512m -Xmx1024m"
+
+echo `date` > /home/prasad/date.log
+
+ts=`date +%T | awk -F: '{print $1$2}'`
+log=build-$ts.log
+
+dir=`date +%F | awk -F- '{print $1$2$3}'`
+bin_dir=/home/prasad/public_html/binaries/trunk/$dir
+ssh prasad@people mkdir $bin_dir
+
+rm -rf /home/prasad/.m2/repository
+
+#Build OpenEJB first.
+#. /home/prasad/bin/openejb.sh
+scp prasad@zones:/export/home/prasad/geronimo/binary/openejb.tar .
+tar -xvf openejb.tar
+scp prasad@zones:/export/home/prasad/geronimo/binary/openejbrev.txt .
+openejbrev=`cat openejbrev.txt` 
+
+cd /home/prasad/geronimo
+rm -rf trunk
+svn co https://svn.apache.org/repos/asf/geronimo/server/trunk trunk
+cd trunk
+rev=`svn info | grep Revision`
+
+echo "Building Geronimo trunk at $rev" > $log
+echo "Building OpenEJB trunk at $openejbrev" >> $log
+echo " " >> $log
+
+echo "OpenEJB trunk at $openejbrev" >> mail.txt
+
+function build() {
+  mvn -B -Dmaven.test.skip=$1 install > temp
+  tail -100 temp | grep "Missing:"
+  if [ $? -eq 0 ]
+  then
+    mvn -B -Dmaven.test.skip=$1 install > temp
+  fi
+  cat temp >> $log
+  rm -f temp
+}
+
+function mail_results() {
+   if [ "$1" = "passed" ]
+   then
+      subject="[BUILD] 2.1: Successful"
+      mailto="scm@geronimo.apache.org"
+   else
+      subject="[BUILD] 2.1: Failed for $rev"
+      mailto="dev@geronimo.apache.org"
+   fi
+   scp mail.txt prasad@people:/home/prasad
+   ssh prasad@people "mail -s '$subject' $mailto < mail.txt"
+}
+
+build $1
+scp $log prasad@people:$bin_dir
+
+if [ "$1" = "true" ]
+then
+  echo "Geronimo $rev built with tests skipped" >> mail.txt
+else
+#  mvn -B -Dmaven.test.skip=true deploy >> deploy.log
+  echo "Geronimo $rev built with tests included" >> mail.txt
+fi
+
+echo " " >> mail.txt
+echo "See the full $log file at http://people.apache.org/~prasad/binaries/trunk/$dir/$log"
>> mail.txt
+echo " " >> mail.txt
+
+grep "BUILD SUCCESSFUL" $log
+if [ $? -eq 0 ]
+then
+   echo "Download the binaries from http://people.apache.org/~prasad/binaries/trunk/$dir"
>> mail.txt
+
+   result="passed"
+   grep -A10 "BUILD SUCCESSFUL" $log >> mail.txt
+
+   cd /home/prasad/geronimo/trunk/assemblies
+
+   for i in `find . -name *javaee5*.zip`
+   do
+     scp $i prasad@people:$bin_dir
+   done
+
+   cd ..
+   
+   if [ "$1" = "false" ]
+   then
+     . /home/prasad/bin/testsuite.sh 2.1
+     grep "Failed to start Geronimo server" mail.txt
+     if [ $? -eq 0 ]
+     then
+       result="failed"
+       y=`grep -B5 "Failed to start Geronimo server" mail.txt | grep "Redirecting"`
+       serverLog=`echo $y | awk -F: '{print $2}'`
+       cat $serverLog >> mail.txt
+     fi
+
+   fi
+
+   mail_results $result
+
+else
+  tail -100 $log >> mail.txt
+  mail_results "failed"
+
+fi
+
+. /home/prasad/bin/tck.sh 2.1
+
+exit 0

Propchange: geronimo/gbuild/daily_build_scripts/gbuild.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gbuild/daily_build_scripts/gbuild.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gbuild/daily_build_scripts/gbuild.sh
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Added: geronimo/gbuild/daily_build_scripts/openejb.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/openejb.sh?rev=583850&view=auto
==============================================================================
--- geronimo/gbuild/daily_build_scripts/openejb.sh (added)
+++ geronimo/gbuild/daily_build_scripts/openejb.sh Thu Oct 11 08:23:05 2007
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+export MVN_HOME=/usr/local/maven
+export JAVA_HOME=/usr/local/java
+export JRE_HOME=/usr/lib/jvm/jre
+export PATH=$JRE_HOME/bin:$JAVA_HOME/bin:$MVN_HOME/bin:$PATH
+export MAVEN_OPTS="-XX:MaxPermSize=128m -Xms512m -Xmx1024m"
+
+openejbLog=openejb-$ts.log
+
+cd /home/prasad/geronimo
+rm -rf openejb3
+
+svn co https://svn.apache.org/repos/asf/openejb/trunk/openejb3 openejb3
+
+cd openejb3
+openejbrev=`svn info | grep Revision | awk -F: '{print $2}'`
+openejbrev=${openejbrev#* }
+
+function build() {
+# Openejb builds fails with missing dependency errors most of the time.
+# run it twice if need be
+   mvn -B -Dmaven.test.skip=true install > temp
+   tail -100 $openejbLog | grep "Missing:"
+   if [ $? -eq 0 ]
+   then
+     mvn -B -Dmaven.test.skip=true install > temp
+   fi
+   cat temp >> $openejbLog
+}
+
+echo "Building OpenEJB trunk at $openejbrev" > $openejbLog
+build
+scp $openejbLog prasad@people.apache.org:$bin_dir
+
+grep "BUILD SUCCESSFUL" $openejbLog
+if [ $? -ne 0 ]
+then
+# Build failed. Mail build results.
+  grep "Missing:" $openejbLog
+  if [ $? -ne 0 ]
+  then
+    subject="[Build] OpenEJB: Failed for $openejbrev"
+    tail -100 $openejbLog >> mail.txt
+
+    scp mail.txt prasad@people.apache.org:/home/prasad
+    ssh prasad@people.apache.org "mail -s '$subject' commits@openejb.apache.org < mail.txt"
+  fi
+  openejbrev="0"
+fi

Propchange: geronimo/gbuild/daily_build_scripts/openejb.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gbuild/daily_build_scripts/openejb.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gbuild/daily_build_scripts/openejb.sh
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Added: geronimo/gbuild/daily_build_scripts/tck.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/tck.sh?rev=583850&view=auto
==============================================================================
--- geronimo/gbuild/daily_build_scripts/tck.sh (added)
+++ geronimo/gbuild/daily_build_scripts/tck.sh Thu Oct 11 08:23:05 2007
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+export MVN_HOME=/usr/local/maven
+export JAVA_HOME=/usr/local/java
+export JRE_HOME=/usr/lib/jvm/jre
+export PATH=$JRE_HOME/bin:$JAVA_HOME/bin:$MVN_HOME/bin:$PATH
+export MAVEN_OPTS="-XX:MaxPermSize=128m -Xms512m -Xmx1024m"
+
+tckLog=tck-$ts.log
+
+cd /home/prasad/geronimo
+rm -rf tck
+
+svn co https://svn.apache.org/repos/tck/geronimo-tck/porting/branches/$1 tck
+
+cd tck
+tckrev=`svn info | grep Revision | awk -F: '{print $2}'`
+tckrev=${tckrev#* }
+
+
+echo "Geronimo trunk at $rev" >> $tckLog
+echo "OpenEJB trunk at $openejbrev" >> $tckLog
+echo "TCK at $tckrev" >> $tckLog
+echo " " >> $tckLog
+
+mvn -B >> $tckLog
+grep "BUILD SUCCESSFUL" $tckLog
+if [ $? -eq 0 ]
+then
+  cd tck-testsuite
+
+# Run Jetty tests.
+  echo "====== Jetty TCK Test =======" >> jetty-$tckLog
+  echo "Geronimo $1 at $rev" >> jetty-$tckLog
+  echo "OpenEJB trunk at $openejbrev" >> jetty-$tckLog
+  echo "TCK at $tckrev" >> jetty-$tckLog
+  echo " " >> jetty-$tckLog
+
+  ./runtests --nocolor smoketest >> jetty-$tckLog
+
+  passed=`grep Passed: jetty-$tckLog | awk -F: '{print $2}'`
+  failed=`grep Failed: jetty-$tckLog | awk -F: '{print $2}'`
+  errors=`grep Errors: jetty-$tckLog | awk -F: '{print $2}'`
+  ERROR=`grep ERROR jetty-$tckLog | awk -F: '{print $2}'`
+
+  echo "[Jetty SmokeTest] $rev:$openejbrev:$tckrev - ${passed#* }/${failed#* }/${errors#*
}" > tck.log
+  cat jetty-$tckLog >> tck.log
+
+  if [[ $failed != " 0"   ||  $errors != " 0" ||  $ERROR != " 0" ]]
+  then
+    subject="[Jetty $1 SmokeTest] $rev:$openejbrev:$tckrev - ${passed#* }/${failed#* }/${errors#*
}"
+  else
+    subject="[Jetty $1 SmokeTest] Passed"
+  fi
+
+  scp tck.log prasad@people:/home/prasad
+  ssh prasad@people "mail -s '$subject' geronimo-tck@geronimo.apache.org < tck.log"
+  ssh prasad@people "rm -f tck.log"
+
+# Run tomcat tests.
+  echo "========= Tomcat TCK Test ========" >> tomcat-$tckLog
+  echo "Geronimo $1 at $rev" >> tomcat-$tckLog
+  echo "OpenEJB trunk at $openejbrev" >> tomcat-$tckLog
+  echo "TCK at $tckrev" >> tomcat-$tckLog
+  echo " " >> tomcat-$tckLog
+
+  ./runtests --nocolor -w tomcat smoketest >> tomcat-$tckLog
+
+  passed=`grep Passed: tomcat-$tckLog | awk -F: '{print $2}'`
+  failed=`grep Failed: tomcat-$tckLog | awk -F: '{print $2}'`
+  errors=`grep Errors: tomcat-$tckLog | awk -F: '{print $2}'`
+  ERROR=`grep ERROR: tomcat-$tckLog | awk -F: '{print $2}'`
+
+  echo "[Tomcat SmokeTest] $rev:$openejbrev:$tckrev - ${passed#* }/${failed#* }/${errors#*
}" > tck.log
+  cat tomcat-$tckLog >> tck.log
+
+  if [[ $failed != " 0"   ||  $errors != " 0" ||  $ERROR != " 0" ]]
+  then
+    subject="[Tomcat $1 SmokeTest] $rev:$openejbrev:$tckrev - ${passed#* }/${failed#* }/${errors#*
}"
+  else
+    subject="[Tomcat $1 SmokeTest] Passed"
+  fi
+
+  scp tck.log prasad@people:/home/prasad
+  ssh prasad@people "mail -s '$subject' geronimo-tck@geronimo.apache.org < tck.log"
+  ssh prasad@people "rm -f tck.log"
+
+else
+# Build failed. Mail build results.
+  subject="[TCK $1 Build Failed] $rev:$tckrev"
+  scp $tckLog prasad@people:/home/prasad
+  ssh prasad@people "mail -s '$subject' geronimo-tck@geronimo.apache.org < $tckLog"
+  ssh prasad@people "rm -f $tckLog"
+
+fi
+
+
+#exit 0

Propchange: geronimo/gbuild/daily_build_scripts/tck.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gbuild/daily_build_scripts/tck.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gbuild/daily_build_scripts/tck.sh
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Added: geronimo/gbuild/daily_build_scripts/testsuite.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/testsuite.sh?rev=583850&view=auto
==============================================================================
--- geronimo/gbuild/daily_build_scripts/testsuite.sh (added)
+++ geronimo/gbuild/daily_build_scripts/testsuite.sh Thu Oct 11 08:23:05 2007
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+export MVN_HOME=/usr/local/maven
+export JAVA_HOME=/usr/local/java
+export JRE_HOME=/usr/lib/jvm/jre
+export FIREFOX_HOME=/usr/local/firefox
+export PATH=$JRE_HOME/bin:$JAVA_HOME/bin:$MVN_HOME/bin:$PATH:/usr/X11R6/bin:$FIREFOX_HOME
+export MAVEN_OPTS="-XX:MaxPermSize=128m -Xms512m -Xmx1024m"
+
+BRANCH=trunk
+TEST_DIR=/home/prasad/geronimo/$BRANCH
+
+LOG_DIR_NAME=logs-$ts
+LOG_DIR=$TEST_DIR/$LOG_DIR_NAME
+
+function createLogsDir() {
+   FILES=`find . -name $1`
+   for FILE in $FILES
+   do
+       destdir=`dirname $FILE`
+       mkdir -p $LOG_DIR/$destdir
+       cp $FILE $LOG_DIR/$destdir
+   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-$1 > 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/$LOG_DIR_NAME/test.log"
>> ../mail.txt
+echo " " >> ../mail.txt
+grep -E "Running|FAILURE!" $testLog | grep -B1 "FAILURE!" >> ../mail.txt
+echo " " >> ../mail.txt
+grep "BUILD SUCCESSFUL" $testLog
+if [ $? -ne 0 ]
+then
+   tail -100 $testLog >> ../mail.txt
+fi
+cd ..

Propchange: geronimo/gbuild/daily_build_scripts/testsuite.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gbuild/daily_build_scripts/testsuite.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gbuild/daily_build_scripts/testsuite.sh
------------------------------------------------------------------------------
    svn:keywords = Date Revision



Mime
View raw message