Changeset 27541 for other-projects/nightly-tasks
- Timestamp:
- 2013-06-04T19:35:21+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/task
r27540 r27541 217 217 echo "</test>" >> $xmlout 218 218 219 # email out if failed 220 echo "Checking if failed... " 221 result=`java org.apache.xalan.xslt.Process -IN "$xmlout" -XSL "$TASK_HOME/xsl/passed-or-not.xsl"` 222 echo "result: "$result 223 if [ "$result" != "yes" ]; then 224 echo 'gsdl regression test for '$dateid' failed' | mail -s $1' Regression Test Failed' $MONITOR_EMAIL 225 #$WEBMASTER_EMAIL 226 fi 227 echo "done" 219 echo "done" 220 228 221 } 229 222 … … 231 224 # ensure the upload directory exists 232 225 # before trying to transfer the xml and html files across 226 # if it already existed, clear it of contents 233 227 if [ ! -d "$UPLOAD_DIR" ]; then 234 228 mkdir -p "$UPLOAD_DIR"; 229 # else 230 # rm $UPLOAD_DIR/* 235 231 fi 236 232 237 233 scp $DATA_DIR/*.xml $DATA_DIR/*.html $UPLOAD_DIR 234 } 235 236 function mail_simple_message() { 237 # email out brief failure message if failed 238 echo "Checking if failed... " 239 result=`java org.apache.xalan.xslt.Process -IN "$xmlout" -XSL "$TASK_HOME/xsl/passed-or-not.xsl"` 240 echo "result: "$result 241 if [ "$result" != "yes" ]; then 242 echo 'gsdl regression test for '$dateid' failed' | mail -s 'Regression Test Failed' $MONITOR_EMAIL #$WEBMASTER_EMAIL 243 fi 244 } 245 246 247 function mail_with_report_attached() { 248 # http://stackoverflow.com/questions/17359/how-do-i-send-a-file-as-an-email-attachment-using-linux-command-line 249 250 #echo "This is the message body" | mutt -a "/path/to/file.to.attach" -s "subject of message" -- [email protected] 251 252 253 # email out with report attached, if the tests failed 254 echo "Checking if failed... " 255 result=`java org.apache.xalan.xslt.Process -IN "$xmlout" -XSL "$TASK_HOME/x\ 256 sl/passed-or-not.xsl"` 257 echo "result: "$result 258 if [ "$result" != "yes" ]; then 259 echo 'gsdl regression test for '$dateid' failed' | mutt -a $DATA_DIR'/report-'$dateid'.html' -s 'Regression Test Failed' -- $MONITOR_EMAIL 260 fi 261 echo "Sent mail with report attached." 238 262 } 239 263 … … 277 301 elif [ "$action" == "run_test" ]; then 278 302 run_test 303 # mail_simple_message 279 304 elif [ "$action" == "summarise" ]; then 280 305 summarise 281 306 elif [ "$action" == "upload" ]; then 282 307 upload 308 mail_simple_message 309 mail_with_report_attached 283 310 elif [ "$action" == "all" ]; then 284 311 setup_greenstone … … 286 313 summarise 287 314 upload 288 fi 289 315 mail_with_report_attached 316 fi 317
Note:
See TracChangeset
for help on using the changeset viewer.