geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r608225 - /geronimo/gbuild/daily_build_scripts/tck.sh
Date Wed, 02 Jan 2008 20:58:23 GMT
Author: gawor
Date: Wed Jan  2 12:58:22 2008
New Revision: 608225

URL: http://svn.apache.org/viewvc?rev=608225&view=rev
Log:
create unqiue files for sending messages to prevent confclits

Modified:
    geronimo/gbuild/daily_build_scripts/tck.sh

Modified: geronimo/gbuild/daily_build_scripts/tck.sh
URL: http://svn.apache.org/viewvc/geronimo/gbuild/daily_build_scripts/tck.sh?rev=608225&r1=608224&r2=608225&view=diff
==============================================================================
--- geronimo/gbuild/daily_build_scripts/tck.sh (original)
+++ geronimo/gbuild/daily_build_scripts/tck.sh Wed Jan  2 12:58:22 2008
@@ -29,6 +29,18 @@
 
 tckLog=tck-$ts.log
 
+
+function send_mail() {
+   subject=$1
+   mailto=$2
+
+   mail_ts=`date +%Y%m%d%H%M%S`
+   remote_mail_file=/home/prasad/${mail_ts}.tck.log
+   scp tck.log prasad@people:$remote_mail_file
+   ssh prasad@people "mail -s '$subject' $mailto < $remote_mail_file; rm -f $remote_mail_file"
+}
+
+
 cd /home/prasad/geronimo
 rm -rf tck
 
@@ -80,9 +92,7 @@
     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"
+  send_mail "$subject" "geronimo-tck@geronimo.apache.org"
 
 # Run tomcat tests.
   echo "========= Tomcat TCK Test ========" >> tomcat-$tckLog
@@ -111,16 +121,14 @@
     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"
+  send_mail "$subject" "geronimo-tck@geronimo.apache.org"
 
 else
 # Build failed. Mail build results.
+
+  cat $tckLog >> tck.log
   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"
+  send_mail "$subject" "geronimo-tck@geronimo.apache.org"
 
 fi
 



Mime
View raw message