#!/bin/bash -x TOP=`pwd` EMAIL=/tmp/today export PYTHONPATH=$HOME/regression/testtau/scripts/modules # add the scripts dir to the path LOC=`dirname $0` cd $LOC PATH=`pwd`:$PATH cd $TOP RESULTS=/var/www/html/testtau cd $RESULTS DATE=`date +%Y-%m-%d_%H:%M` mkdir "$DATE" cd "$DATE" LOG="/tmp/nightly-arch-test.$DATE.log" echo "-- Testing Arch Suite --" >> $EMAIL echo "Started Execution at" `date` >> $LOG eval `ssh-agent` &>/dev/null ssh-add $HOME/.ssh/id_dsa &>/dev/null ssh-add $HOME/.ssh/id_dsa2 &>/dev/null # can't do this, mpich hangs if you do #exec 0>&- declare -i ERRORS ERRORS=0 TIMEOUT=3000 error () { ERRORS=$(( $ERRORS + 1 )) echo "FAIL: $*" } launchtests() { echo "Checking out tau and pdt" cd $HOME/regression/testtau rm -rf tau2 pdtoolkit vtf3 export CVSROOT=ix.cs.uoregon.edu:/research/paraducks2/cvs-src/master export CVS_RSH=ssh git clone git.nic.uoregon.edu:/gitroot/tau2 if [ $? -ne 0 ]; then error "Unable to checkout TAU from git!!!" fi cvs -Q co pdtoolkit if [ $? -ne 0 ]; then error "Unable to checkout PDT from CVS!!!" fi cvs -Q co vtf3 if [ $? -ne 0 ]; then error "Unable to checkout VTF from CVS!!!" fi cd "$RESULTS/$DATE" rsync --delete -az -q /home/amorris/regression/testtau sigma:regression if [ $? -ne 0 ]; then error "Error rsync'ing to sigma" fi echo "" echo "aix32" ssh p655-2 regression/testtau/scripts/testtau.py aix32 &> aix32.log if [ $? -ne 0 ]; then error "Error running on p655-2 32bit: $?" fi echo "" echo "aix64" ssh p655-2 regression/testtau/scripts/testtau.py aix64 &> aix64.log if [ $? -ne 0 ]; then error "Error running on p655-2 64bit: $?" fi # echo "" # echo "opteronIntel64" # timeout -s 9 $TIMEOUT ssh helios.cs.uoregon.edu testtau/scripts/testtau.py opteronIntel64 &> opteronIntel64.log # if [ $? -ne 0 ]; then # error "Error running on helios (Intel64): $?" # fi echo "" echo "sunx86_64" ssh muon regression/testtau/scripts/testtau.py sunx86_64 &> sunx86_64.log if [ $? -ne 0 ]; then error "Error running on muon (sunx86_64): $?" fi # echo "" # echo "optixICC8" # timeout -s 9 $TIMEOUT ssh optix testtau/scripts/testtau.py optixICC8 &> optixICC8.log # if [ $? -ne 0 ]; then # error "Error running on optixICC8: $?" # fi # echo "" # echo "optixICC9" # timeout -s 9 $TIMEOUT ssh optix testtau/scripts/testtau.py optixICC9 &> optixICC9.log # if [ $? -ne 0 ]; then # error "Error running on optixICC9: $?" # fi } echo "Launching test, results in $LOG" (time launchtests) &> $LOG DURATION=`tail -3 $LOG | head -1 | awk '{ print $2 }'` echo " Completed in $DURATION" >> $EMAIL echo "Ended Execution at" `date` >> $LOG cd "$RESULTS/$DATE" checkresults.pl kill $SSH_AGENT_PID retval=1 grep -H "Failure: Encountered" *.log &>/dev/null if [ $? = 0 -o $ERRORS -ne 0 ] ; then echo " Arch suite FAILED" >> $EMAIL echo " See http://demon.nic.uoregon.edu/testtau for more details" >> $EMAIL else echo " Arch suite PASSED" >> $EMAIL retval=0 fi echo "" >> $EMAIL exit $retval