Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 46713 invoked from network); 24 Nov 2006 08:35:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2006 08:35:54 -0000 Received: (qmail 48758 invoked by uid 500); 24 Nov 2006 08:35:59 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 48696 invoked by uid 500); 24 Nov 2006 08:35:58 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 48680 invoked by uid 99); 24 Nov 2006 08:35:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:35:58 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:35:44 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 128D81A984F; Fri, 24 Nov 2006 00:35:08 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r478802 [3/3] - in /db/derby/code/trunk/tools/testing/reporting: ./ Failures/ TEMPLATES/ scripts/ scripts/gnuplot/ Date: Fri, 24 Nov 2006 08:35:06 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061124083509.128D81A984F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests Fri Nov 24 00:35:04 2006 @@ -0,0 +1,367 @@ +#!/bin/bash + +GETHOSTNAME="host" +# GETHOSTNAME="echo" +# Options: +# VERBOSE="-Dverbose=true" +# VERBOSE="-Dverbose=false" +VERBOSE="" +# You should NOT need to modify anything below. +#--------------------------------------------- +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +SEND_UPDATE_EXECUTE_REVISION_MISMATCH_MSG="true" +SVNREVUSED="-" + +SANDBOX=`basename ${DERBYDIR}` + +move_log(){ + TESTDIRl="$1" + TESTHOSTl="$2" + OSPLATFROMl="$3" + HWPROCl="$4" + startTimel="$5" + TESTLOGDIRl="$6" + ## Following may need modification. + # EXCLUDEl="-x \*.dat" # Does not seem to work. + EXCLUDEl="-x@/${DERBYDIR}/testing/ExcludeFromZip" + # EXCLUDEl="" + echo "*************************************************************" + echo "mkdir -p ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl}" + echo "zip -r -q -9 ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl}/${startTimel}.zip . ${EXCLUDEl}" + mkdir -p ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl} && \ + chmod go+rx ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl} && \ + zip -r -q -9 ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl}/${startTimel}.zip . ${EXCLUDEl} && \ + cd ../ && \ + # Wait: keep until starting next testrun.rm -rf ${OSPLATFROMl}_${HWPROCl} && \ + echo "Successfully moved logfiles to ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl}/${startTimel}.zip" + chmod go+r ${TESTLOGDIRl}/${OSPLATFROMl}_${HWPROCl}/${startTimel}.zip +} +# move_log END + +if [ "$1" == "" ] +then + echo "Usage: $0 fileListingTestsToRun fullPathTestLogDir" + echo " Derby db files and test logs are moved to fullPathTestLogDir after test." + echo "E.g. Unix: runAllTests testing/testlist ~/Apache/Derby/testing/testlog" + echo " Win: ~/bin/runAllTests.cygwin testing/testlist /log/huge3/derbytester/DerbyTestLog" + echo " Rerun: cd ..../Derby/adhoc/" + echo " runAllTests ../testing/testlistReRun ~/Apache/Derby/testing/testlogEmbeddedReRun" + exit +fi +if [ "$2" == "" ] +then + echo "Usage: $0 $1 testLogDir" + echo " Derby db files and test logs are moved to fullPathTestLogDir after test." + exit +fi + +TESTLISTFILE=$1 +TESTLOGDIR=$2 + +if [ ! -e $TESTLISTFILE ] +then + echo "$TESTLISTFILE does not exist." + exit +fi + +USEDERBYNET="" +if [ "$3" != "" ] +then + USEDERBYNET="-Dframework=DerbyNet" +fi + +HASFULLPATH=`echo "$TESTLOGDIR" | sed -e 's|^/|HASFULLPATH /|' | gawk '{ print $1 }'` +#DEBUG echo "${HASFULLPATH}" +if [ "${HASFULLPATH}" != "HASFULLPATH" ] +then + echo "Directory for test logs must be full path. You supplied '"$TESTLOGDIR"'" + exit +fi +if [ ! -d $TESTLOGDIR ] +then + echo "$TESTLOGDIR does not exist." + exit +fi +if [ ! -w $TESTLOGDIR ] +then + echo "$TESTLOGDIR is not writable." + exit +fi + +SUITES=`gawk '{ print $1 }' ${TESTLISTFILE} | grep -v "^#"` +TESTHOST=`uname -n` +TESTHOST=`${GETHOSTNAME} ${TESTHOST} | awk '{print $1}'` + +KERNEL=`uname -s` +KERN_REV=`uname -r` +OSPLATFROM="${KERNEL}-${KERN_REV}" +# OSPLATFROM="${KERNEL}" +HWNAME=`uname -m` +PROCNAME=`uname -p` +HWPROC="${HWNAME}-${PROCNAME}" +HWPLATFORM=`uname -i` + +TESTLOG_PLATF_DIR="${TESTLOGDIR}/${OSPLATFROM}_${HWPROC}" + +#DEBUG echo "Log files will be zipped to $TESTLOG_PLATF_DIR/" + +# echo "mkdir -p ${TESTLOG_PLATF_DIR}" +mkdir -p ${TESTLOG_PLATF_DIR} +chmod go+rx ${TESTLOG_PLATF_DIR} + +TESTDIR="${TESTEXECUTIONDIR}/${OSPLATFROM}_${HWPROC}" + +# We keep old results until next test run is started, so now is the time to: +rm -rf ${TESTDIR} + +# echo "mkdir -p ${TESTDIR}" +mkdir -p ${TESTDIR} +chmod go+rx ${TESTDIR} +if [ ! -w $TESTDIR ] +then + echo "$TESTDIR is not writable." + exit +fi +cd ${TESTDIR} + +#DEBUG pwd + +echo "Tests are executed on ${TESTHOST} in ${TESTDIR}" +echo "${TESTHOST}: ${OSPLATFROM}_${HWPROC} [${HWPLATFORM}]" > OS_HW +echo "ANT_HOME: ${ANT_HOME}" >> OS_HW +echo "JAVA_HOME: ${JAVA_HOME}" >> OS_HW +ant -version >> OS_HW +java -version 2>> OS_HW + +echo "cp ${BUILDLOGDIR}/lastBuildInfo buildInfo" +cp ${BUILDLOGDIR}/lastBuildInfo buildInfo + +REVISION=`head -2 buildInfo | tail -1 | gawk '{ print $3 }'` +REPOSITORY=`head -2 buildInfo | tail -1 | gawk '{ print $6 }'` +BUILTOS=`head -1 buildInfo | gawk '{ print $3 }'` +BUILTOSKERN=`head -1 buildInfo | gawk '{ print $4 }'` +BUILTDATE=`head -1 buildInfo | gawk '{ print $8" "$9 }'` +BUILTINFO=`grep "^Built on" buildInfo` + +# echo "REVISION: ${REVISION} REPOSITORY: ${REPOSITORY} BUILTOS: ${BUILTOS} BUILTOSKERN: ${BUILTOSKERN} BUILTDATE: ${BUILTDATE} BUILTINFO: ${BUILTINFO}" + +timeId="${REVISION}" +startTime=`date +%Y-%m-%d" "%H:%M:%S` + +SUITESLOG="${TESTLOG_PLATF_DIR}/${timeId}.csv" +JAVAINFO="${TESTLOG_PLATF_DIR}/${timeId}.javainfo" +CURRSUITESLOG="${TESTLOG_PLATF_DIR}/current.csv" +PREVSUITESLOG="${TESTLOG_PLATF_DIR}/previous.csv" +LOG="${TESTLOG_PLATF_DIR}/${timeId}.txt" +cp ${CURRSUITESLOG} ${PREVSUITESLOG} +echo -n "Starting Derby tests on ${TESTHOST} [${OSPLATFROM}_${HWPROC} [${HWPLATFORM}]] at " +echo -n -e "${TESTHOST}\t${KERNEL}\t${KERN_REV}\t${HWNAME}\t${PROCNAME}\t${HWPLATFORM}\t${REVISION}\t${REPOSITORY}\t" > ${CURRSUITESLOG} +echo ${startTime} +echo -e ${startTime} >> ${CURRSUITESLOG} +echo "${BUILTINFO}" >> ${CURRSUITESLOG} +echo "" >> ${CURRSUITESLOG} + +# Start without knowing.... +echo "-" > ${JAVAINFO} +echo "-" >> ${JAVAINFO} +chmod go+r ${JAVAINFO} + +${TOOLDIR}/system > ${TESTLOG_PLATF_DIR}/${REVISION}-system +${TOOLDIR}/cpu_mem > ${TESTLOG_PLATF_DIR}/${REVISION}-cpu_mem +chmod go+r ${TESTLOG_PLATF_DIR}/${REVISION}-system +chmod go+r ${TESTLOG_PLATF_DIR}/${REVISION}-cpu_mem + +# echo "CLASSPATH = ${CLASSPATH}" + +HEADER="Tests \tPassed \tFailed \tSkippd \tDuration" +echo -e "Suite \t${HEADER}" >> ${CURRSUITESLOG} + +# export CLASSPATH=`cygpath -wp $CLASSPATH` +# echo "CLASSPATH: $CLASSPATH" + +# echo ${SUITES} +echo "" > ${LOG} +JAVAVENDOR="" +for suite in ${SUITES} +do + if [ "${suite}" == "exit" ] + then + echo "Exit: found ${suite}" + echo -e "\n\n\n" >> ${CURRSUITESLOG} + endTime=`date +%Y-%m-%d" "%H:%M:%S` + echo -e "Started:\t${startTime}\tEnd:\t${endTime}\tHost:\t${TESTHOST}" >> ${CURRSUITESLOG} + # cat buildInfo >> ${CURRSUITESLOG} + echo "Started: ${startTime} End: ${endTime} ${TESTHOST}" + cp -f ${CURRSUITESLOG} ${SUITESLOG} + chmod go+r ${SUITESLOG} + move_log ${TESTDIR} ${TESTHOST} ${OSPLATFROM} ${HWPROC} ${timeId} ${TESTLOGDIR} + + + SUBJECT="Regression Test: ${SANDBOX} ${timeId}/${SVNREVUSED} - ${OSPLATFROM}_${HWPROC} - ${TESTHOST} - ${BUILTOS} ${BUILTOSKERN} ${BUILTDATE}" + FILELIST="${SUITESLOG}" + ### ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOEXT} "${FILELIST}" + + exit + fi + suiteStart=`date +%Y-%m-%d" "%H:%M:%S` + echo + echo "------------ ${suite} " + echo "${suiteStart} ------------ ${suite} " >> ${LOG} + + # Remove possible leftovers: + rm -rf ${suite} + # (re)Create the suite dir: + mkdir -p ${suite} + chmod go+rx ${suite} + cd ${suite} + + ### VMPID=`${TOOLDIR}/beginVmStat vmstat.log` + + date +%H:%M:%S > ${TESTLOG_PLATF_DIR}/suiteStart.txt + # --------------- + # The test suite is run here: + JUNIT=`echo ${suite} | grep org.apache.derbyTesting` + if [ "${JUNIT}" == "" ] + then + echo "java ${VERBOSE} ${USEDERBYNET} org.apache.derbyTesting.functionTests.harness.RunSuite ${suite}" + echo -n "Start: ${suiteStart} End: " + java ${VERBOSE} ${USEDERBYNET} org.apache.derbyTesting.functionTests.harness.RunSuite ${suite} > out.log 2>out.err + else + echo "java junit.textui.TestRunner ${suite}" + echo -n "Start: ${suiteStart} End: " + java junit.textui.TestRunner ${suite} > out.log 2>out.err + java org.apache.derby.tools.sysinfo > ${suite}_report.txt # To have sysinfo for junit tests + fi + # --------------- + echo "" > ${TESTLOG_PLATF_DIR}/suiteStart.txt + + ### ${TOOLDIR}/endVmStat ${VMPID} vmstat.log + date +%Y-%m-%d" "%H:%M:%S + # date +%Y-%m-%d" "%H:%M:%S >> suite.log + + if [ "${SEND_UPDATE_EXECUTE_REVISION_MISMATCH_MSG}" = "true" ] + then + SVNREVUSED=`grep ".jar] " ${suite}_report.txt | head -1 | gawk '{ print $NF }' | sed -e 's/(//' | sed -e 's/)//'` + + if [ "${SVNREVUSED}" != "${REVISION}" ] + then + SUBJECT="Regression Test: ${SANDBOX} Expected revision ${REVISION}, found ${SVNREVUSED} - ${OSPLATFROM}_${HWPROC} - ${TESTHOST} - ${BUILTDATE}" + FILELIST="" # JVM1.6 produces a LARGE _report.txt file. "${suite}_report.txt" + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOEXT} "${FILELIST}" + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOINT} "${FILELIST}" + SEND_UPDATE_EXECUTE_REVISION_MISMATCH_MSG="false" + else + SUBJECT="Regression Test: ${SANDBOX} ${REVISION}/${SVNREVUSED} - ${OSPLATFROM}_${HWPROC} - ${TESTHOST} - ${BUILTDATE}" + FILELIST="${suite}_report.txt" + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOEXT} "${FILELIST}" + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOINT} "${FILELIST}" + SEND_UPDATE_EXECUTE_REVISION_MISMATCH_MSG="false" + + fi + + fi + + + TESTSRUN="UNKNOWN" + PASS="UNKNOWN" + FAIL="UNKNOWN" + SKIPPED="UNKNOWN" + DURATION="UNKNOWN" + if [ "${JUNIT}" == "" ] + then + TESTSRUN=`grep "Tests Run" ${suite}_report.txt | gawk '{ print $1 }'` + PASS=`grep "% Pass" ${suite}_report.txt | gawk '{ print $3 }' | sed -e 's|(||'` + FAIL=`grep "% Fail" ${suite}_report.txt | gawk '{ print $3 }' | sed -e 's|(||'` + SKIPPED=`grep "Suites skipped" ${suite}_report.txt | gawk '{ print $1 }'` + DURATION=`grep "Test Run Duration:" ${suite}_report.txt | gawk '{ print $4 }'` + else + OK=`tail -3 out.log | grep "OK ("` + FAILURES=`tail -3 out.log | grep "FAILURES"` + if [ "${OK}" != "" ] + then + TESTSRUN=`tail -3 out.log | grep "OK ("| gawk '{ print $2 }' | sed -e s/\(//` + PASS=${TESTSRUN} + FAIL=0 + SKIPPED=0 # NA for JUnit tests + TIME=`tail -5 out.log | grep "^Time: " ` # seconds as: 1,498.864 + SECSONLY=`echo ${TIME} | gawk '{ print $2 }' | gawk -F. '{ print $1 }' | sed -e s/,//` + DURATION=`${TOOLDIR}/fromSeconds ${SECSONLY}` + elif [ "${FAILURES}" != "" ] + then + SUMMARY=`tail -3 out.log | grep "^Tests run: "` + TESTSRUN=`echo ${SUMMARY} | gawk '{ print $3 }' | sed -e s/,//` + FAILES=`echo ${SUMMARY} | gawk '{ print $5 }' | sed -e s/,//` # Assertion in test failed + ERRS=`echo ${SUMMARY} | gawk '{ print $7 }'` # Unhandled error, exception not catched... + let " PASS = ${TESTSRUN} - ${FAILES} - ${ERRS} " # FIXME: may get PASS less than 0.... + FAIL="F:${FAILES},E:${ERRS}" + SKIPPED=0 # NA for JUnit tests + TIME=`grep "^Time: " out.log` # seconds as: 1,498.864 + SECSONLY=`echo ${TIME} | gawk '{ print $2 }' | gawk -F. '{ print $1 }' | sed -e s/,//` + DURATION=`${TOOLDIR}/fromSeconds ${SECSONLY}` + grep "^.*) " out.log > ${suite}_fail.txt + fi + cat out.log >> ${suite}_report.txt + echo "------------------------------" >> ${suite}_report.txt + cat out.err >> ${suite}_report.txt + fi + MSG="${TESTSRUN} \t${PASS} \t${FAIL} \t${SKIPPED} \t${DURATION}" + TEXT="${HEADER}\n${MSG}" + echo -e "${TEXT}" + echo -e "${TEXT}" > suite.log + echo -e "${TEXT}" >> ${LOG} + + if [ "${JAVAVENDOR}" == "" ] + then + JAVAVERSION=`grep '(build ' ../OS_HW | head -1 | gawk -F\( '{ print $NF }' | gawk '{ print $2 }' | sed -e s/\)//` + JAVAVENDOR=`grep "Java Vendor:" ${suite}_report.txt | sed -e 's/Java Vendor://'` + fi + echo ${JAVAVENDOR} > ${JAVAINFO} + echo ${JAVAVERSION} >> ${JAVAINFO} + + + if [ "${FAIL}" != "0" ] + then + FAILLOG="${TESTLOG_PLATF_DIR}/${timeId}-${suite}_fail.txt" + DIFFLOG="${TESTLOG_PLATF_DIR}/${timeId}-${suite}_diff.txt" + + echo "${suite} fail *************************************************************" > ${FAILLOG} + cat ${suite}_fail.txt >> ${FAILLOG} + echo "${suite} fail *************************************************************" > ${DIFFLOG} + cat ${suite}_fail.txt >> ${DIFFLOG} + echo "" >> ${DIFFLOG} + echo "${suite} diff -------------------------------------------------------------" >> ${DIFFLOG} + cat ${suite}_report.txt >> ${DIFFLOG} + chmod go+r ${DIFFLOG} ${FAILLOG} + fi + if [ ${SKIPPED} != 0 ] + then + SKIPLOG="${TESTLOG_PLATF_DIR}/${timeId}-${suite}_skipped.txt" + cat ${suite}_skip.txt > ${SKIPLOG} + fi + + cd ../ + echo -e "${suite} \t${MSG}" >> ${CURRSUITESLOG} + + #---------------- + # Make it avalable as soon as possible: + cp -f ${CURRSUITESLOG} ${SUITESLOG} + chmod go+r ${SUITESLOG} + #---------------- + + echo "===========================================================" + +done +echo -e "\n\n\n" >> ${CURRSUITESLOG} +endTime=`date +%Y-%m-%d" "%H:%M:%S` +echo -e "Started:\t${startTime}\tEnd:\t${endTime}\tHost:\t${TESTHOST}" >> ${CURRSUITESLOG} +# cat buildInfo >> ${CURRSUITESLOG} +echo "Started: ${startTime} End: ${endTime} ${TESTHOST}" +cp -f ${CURRSUITESLOG} ${SUITESLOG} +chmod go+r ${SUITESLOG} +move_log ${TESTDIR} ${TESTHOST} ${OSPLATFROM} ${HWPROC} ${timeId} ${TESTLOGDIR} + +SUBJECT="Regression Test: ${SANDBOX} ${timeId}/${SVNREVUSED} - ${OSPLATFROM}_${HWPROC} - ${TESTHOST} - ${BUILTOS} ${BUILTOSKERN} ${BUILTDATE}" +FILELIST="${SUITESLOG}" +### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SUBJECT}" ${MAILTOINT} "${FILELIST}" Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/runAllTests ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy Fri Nov 24 00:35:04 2006 @@ -0,0 +1,2 @@ +#!/bin/bash +echo "SCP NOT DONE: $@" Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/scp_dummy ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem Fri Nov 24 00:35:04 2006 @@ -0,0 +1,19 @@ +#!/bin/bash +MODEL=`uname -m` # Minimalistic + +# Following gives details +psrinfo -v > psrinfo$$ +NUMBER=`psrinfo -p` +PROC=`grep "processor operates at " psrinfo$$ | head -1 | gawk '{ print $2 }'` +FREQ=`grep "processor operates at " psrinfo$$ | head -1 | gawk '{ print $6 }'` +CACHE='unknown' +ARCH=`psrinfo -vp 1 | tail -1 | sed -e 's/ //g'` +MODEL="${MODEL} ${PROC} (${ARCH})" + +# echo "Installed memory:" +MEMTOTAL=`prtconf | grep "Memory size" | gawk -F: '{ print $2 }' | sed -e 's/ //g'` +MEMFREE='unknown' + +rm psrinfo$$ + +echo "${NUMBER} X ${MODEL}: ${FREQ} MHz, ${CACHE} cache. ${MEMTOTAL} Total Memory." Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-cpu_mem ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system Fri Nov 24 00:35:04 2006 @@ -0,0 +1,6 @@ +#!/bin/sh +# head -1 /etc/release +HEAD=`head -1 /etc/release` +BITS=`isainfo -b` +echo "${HEAD} ${BITS}" | awk '{ print $1" "$2" "$3" "$4" "$5" "$6"bits" }' +uname -srv Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/solaris-system ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests Fri Nov 24 00:35:04 2006 @@ -0,0 +1,40 @@ +#!/bin/bash +# export DERBYDIR="${HOME}/Apache/Derby" +DERBYDIR=$1 + +if [ "${DERBYDIR}" = "" ] +then + echo "DERBYDIR must be defined." + exit +fi +if [ ! -e ${DERBYDIR} ] +then + echo "Nonexisting DERBYDIR: ${DERBYDIR} was given to $0." + exit +fi + +cd ${DERBYDIR} + +HOST=`uname -n` + +. ./env.sh +. ./testenv.sh + +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +SANDBOX=`basename ${DERBYDIR}` +if [ ! -e ${BUILDLOGDIR}/buildOK ] +then + echo "Derby was NOT updated or build failed" + echo " ${BUILDLOGDIR}/buildOK does not exist." + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SANDBOX} was NOT updated or build failed" "${MAILTOINT}" "${BUILDLOGDIR}/lastBuildInfo" + exit +fi + +mkdir -p TestRunLogs +cd TestRunLogs + +echo "${TOOLDIR}/runAllTests ../testing/testlist ${DERBYDIR}/testing/testlog > ${HOST}.log" > ${HOST}.log +${TOOLDIR}/runAllTests ../testing/testlist ${DERBYDIR}/testing/testlog >> ${HOST}.log 2>${HOST}.err & + Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/startDerbyTests ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev Fri Nov 24 00:35:04 2006 @@ -0,0 +1,20 @@ +#!/bin/bash +TOOLDIR="${HOME}/bin/DerbyTools" +. ${TOOLDIR}/env +cd ${DERBYDIR} +. ./env.sh + +cd ${derby_source} + +if [ "$1" = "" ] +then + echo "Usage: $0 rev" + echo " Do svn diff -r Rev-1:Rev" + exit +fi + +prevRev=` expr $1 - 1 ` + +svn log -r $prevRev:$1 +echo "svn diff -r $prevRev:$1" +svn diff -r $prevRev:$1 Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnDiffToRev ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs Fri Nov 24 00:35:04 2006 @@ -0,0 +1,18 @@ +#!/bin/bash +if [ "$1" == "" ] +then + echo "Usage: $0 prevRev currRev" + echo " Do svn log -r prevRev+1:currRev" + exit +fi +prevRev=`expr $1 + 1 ` +if [ "$2" == "" ] +then + echo "Usage: $0 $1 currRev" + echo " Do svn log -r prevRev+1:currRev" + exit +fi +currRev=$2 + +echo "svn log -r $prevRev:$currRev" +svn log -r $prevRev:$currRev Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new Fri Nov 24 00:35:04 2006 @@ -0,0 +1,49 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env +# echo "cd ${DERBYDIR}" +cd ${DERBYDIR} +. ./env.sh + +REVISIONSFILE="${REVISIONLIST}" +# REVISIONS=`head -12 ${REVISIONSFILE} | gawk '{ print $1 }' | grep -v "^#"` +OURPREVREV=`grep -v "^#" ${REVISIONSFILE} | head -2 | tail -1 | gawk '{ print $1 }'` +# echo ${OURPREVREV} +OURCURRENTREV=`grep -v "^#" ${REVISIONSFILE} | head -1 | gawk '{ print $1 }' ` +# echo ${OURCURRENTREV} + +# DEBUG echo "cd ${derby_source}" +cd ${derby_source} + + +if [ "$1" = "" ] +then + # echo "Usage: $0 prevRev currRev" + # echo " Do svn log -r prevRev+1:currRev" + # exit + # echo "Will do svn log -r OURPREVREV+1:OURCURRENTREV" + prevRev=` expr ${OURPREVREV} + 1 ` + currRev="${OURCURRENTREV}" +elif [ "$1" = "NEW" ] +then +# echo "Will do svn log -r OURCURRENTREV+1:HEAD" + prevRev=` expr ${OURCURRENTREV} + 1 ` + currRev="HEAD" +else + # echo "Will do svn log -r $1+1:HEAD" + prevRev=` expr $1 + 1 ` + currRev="HEAD" +fi + +if [ "$2" != "" ] +then + # echo "Usage: $0 $1 currRev" + # echo " Do svn log -r prevRev+1:currRev" + # exit + # echo "Will do svn log -r ${prevRev}:$2" + currRev=$2 +fi + +# echo "svn log -r $prevRev:$currRev" +svn log -r $prevRev:$currRev +# svn info Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/svnLogRevs.new ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/system URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/system?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/system (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/system Fri Nov 24 00:35:04 2006 @@ -0,0 +1,24 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" + +# Temporary patch until gawk is available on techra28/nevada: +PATH=${PATH}:/usr/local/bin:/usr/sbin + +OS=`uname -s | gawk -F_ '{ print $1 }'` +FULLOS=`uname` + +if [ "${OS}" = "SunOS" ] +then + ${TOOLDIR}/solaris-system +elif [ "${OS}" = "Linux" ] +then + ${TOOLDIR}/linux-system +elif [ "${OS}" = "CYGWIN" ] +then + ${TOOLDIR}/cygwin-system +elif [ "${FULLOS}" = "HP-UX" ] +then + uname -srv +else + echo "Haven't yet figured out how to get SYSTEM info for ${OS}" +fi Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/system ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/system ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/testDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/testDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/testDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/testDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,66 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +# LOCAL_EXEC="true" # Set to 'true' to execute on THIS host only!; i.e. do not loop over machines in $1. +LOCAL_EXEC="false" # Set to NOT 'true' to execute on all machines in $1. +RSH_SSH=ssh # Set to rsh or ssh. + +if [ "$1" == "" ] +then + echo "Usage: $0 fileListingHostsToRunTests" + exit +fi + +SANDBOX=`basename ${DERBYDIR}` +if [ ! -e ${BUILDLOGDIR}/buildOK ] +then + echo "Derby was NOT (re)built:" + echo " ${BUILDLOGDIR}/buildOK does not exist." + ### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SANDBOX} was NOT (re)built" "${MAILTOINT}" "${UPDATELOGDIR}/update.out ${BUILDLOGDIR}/lastBuildInfo" + exit +fi + +HOSTLISTFILE=$1 +echo "Execute runAllTests on all hosts listed in ${HOSTLISTFILE}" +if [ ! -e $HOSTLISTFILE ] +then + echo "$HOSTLISTFILE does not exist." + exit +fi + +if [ "${DERBYDIR}" = "" ] +then + echo "DERBYDIR must be defined as it is sent to startDerbyTests" + exit +fi +if [ ! -e ${DERBYDIR} ] +then + echo "Nonexisting DERBYDIR: ${DERBYDIR} was given to $0." + exit +fi + +if [ "${LOCAL_EXEC}" != "true" ] +then + HOSTLIST=`grep -v "^#" ${HOSTLISTFILE}` + for HOST in ${HOSTLIST} + do + if [ "${HOST}" == "exit" ] + then + echo "Exit: found ${HOST}" + exit + fi + + echo "Host: ${HOST}" + echo "${RSH_SSH} ${HOST} \"${TOOLDIR}/startDerbyTests ${DERBYDIR}\"" + ${RSH_SSH} ${HOST} "${TOOLDIR}/startDerbyTests ${DERBYDIR}" + done +else + ${TOOLDIR}/startDerbyTests ${DERBYDIR} +fi + +# We can't handle win/cygwin via 'rsh host cmd' so must use a flag which +# is detected by a looping script on the cygwin host(s): +# touch ${TESTLOGDIR}/ReadyToStartOnCygWin +touch ${DERBYDIR}/testing/ReadyToStartOnCygWin +# To be detected by ${TOOLDIR}/loopToDetectAndStartDerbyTestsOnCygwin Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,236 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +SHOWDETAILS="" +PRESENTATION="Limited" +if [ "$1" = "details" ] +then + # Show details + SHOWDETAILS="ShowDetails" + PRESENTATION="Full" +fi + +# We have one catalog per platform +if [ ! -e ${TESTLOGDIR} ] +then + echo "${TESTLOGDIR} does not exist" + exit +fi + +# Get the list of testsuite we are running: +TESTLISTFILE="${DERBYDIR}/testing/showtestlist" +SUITES=`gawk '{ print $1 }' ${TESTLISTFILE} | grep -v "^#"` + +# Get the set of platforms +cd ${TESTLOGDIR} +PLATFORMS=`ls` + +# Get the list of revisions +# 12 latest. +REVISIONSFILE="${REVISIONLIST}" +REVISIONS=`head -12 ${REVISIONSFILE} | gawk '{ print $1 }' | grep -v "^#"` + +# Main loop for collecting suite status: +for SUITE in ${SUITES} +do + if [ "${SUITE}" = "exit" ] + then + echo "Exit: found ${SUITE}" + exit + fi + + echo "${SUITE}" + + HISTORY="${DERBYDIR}/testing/${PRESENTATION}/${SUITE}_history.html" + mkdir -p ${DERBYDIR}/testing/${PRESENTATION} + chmod o+rx ${DERBYDIR}/testing/${PRESENTATION} + + # Build table header: + echo "" > ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} # NB This is the only variation in header.... + no=0 + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + #DEBUG echo "${PLATFORM}" + PLATF=`echo "${PLATFORM}" | gawk -F_ '{ print $1"
"$2"
"$3 }'` + #DEBUG echo "${PLATF}" + + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + for HEAD in Num OK Fail Skip + do + echo -n "" >> ${HISTORY} + done + fi + done # PLATFORMS + echo "" >> ${HISTORY} + # Done building header. + + + for REVISION in ${REVISIONS} + do + TS=`cat ${UPDATELOGDIR}/${REVISION}/UpdateTime` + echo " ${REVISION}" + + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + echo "" >> ${HISTORY} + + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo " ${PLATFORM}" + + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv` + #DEBUG echo "${SUITE}: ${RES}" + if [ "${RES}" = "" ] + then + RES="" + else + NUMBER=`echo ${RES} | gawk '{ print $2 }'` + OK=`echo ${RES} | gawk '{ print $3 }'` + FAILED=`echo ${RES} | gawk '{ print $4 }'` + SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + CFB="" + CSB="" + if [ "${FAILED}" != "0" ] + then + # REV=`head -1 ${PLATFORM}/${REVISION}.csv | gawk '{ print $7 }'` + FAILED="${FAILED}" + CFB="bgcolor=\"red\"" + fi + if [ "${SKIPPED}" != "0" ] + then + # CSB="bgcolor=\"yellow\"" + CSB="bgcolor=\"#FFFFA0\"" + fi + RES="" + fi + # DEBUG echo "${RES}" + echo -n "${RES}" >> ${HISTORY} + + fi + done # PLATFORMS Number, OK, Failed, Skipped + echo "" >> ${HISTORY} + + # if [ "${SHOWDETAILS}" = "ShowDetails" ] + # then + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + for PLATFORM in ${PLATFORMS} # Duration + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + + echo " ${PLATFORM}" + TIME=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv | gawk '{ print $6 }'` + #DEBUG echo "${SUITE}: ${RES}" + if [ "${TIME}" = "" ] + then + RES="" + echo -n "${RES}" >> ${HISTORY} + else + SECONDS=`${TOOLDIR}/toSeconds ${TIME}` + # echo ${SECONDS} + BASESECONDS=`grep "^${SUITE} " ${PLATFORM}/baseline.csv | gawk '{ print $3 }'` + # echo ${BASESECONDS} + PERCENT=`${TOOLDIR}/calcPercent ${SECONDS} ${BASESECONDS}` + # echo ${PERCENT} + # RES="" + # echo ${RES} + if [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo -n "" >> ${HISTORY} + echo -n "" >> ${HISTORY} + else + echo -n "" >> ${HISTORY} + fi + fi + fi + done # PLATFORMS Duration + echo "" >> ${HISTORY} + # fi # SHOWDETAILS + + done # REVISIONS + + # Show baseline info for each platform: + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + no=0 + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + BASELINE=`head -1 ${PLATFORM}/baseline.csv | gawk '{ print $2 }'` + TS=`cat ${UPDATELOGDIR}/${BASELINE}/UpdateTime` + PLATF=`echo "${PLATFORM}" | sed -e 's/CYGWIN_/CYGWIN /' | gawk -F_ '{ print $1"
"$2 }' | sed -e 's/CYGWIN /CYGWIN_/'` + echo "" >> ${HISTORY} + fi + done # PLATFORMS + echo "" >> ${HISTORY} + echo "
${SUITE} ${PLATF}" >> ${HISTORY} + fi + done # PLATFORMS + + echo "
${HEAD}
${REVISION}
${TS}
"$NA""$NA""$NA""$NA"${NUMBER}${OK}${FAILED}${SKIPPED}
Duration:"$NA""${TIME} ${PERCENT}"" >> ${HISTORY} + echo -n " ${TIME} " >> ${HISTORY} + echo -n "" >> ${HISTORY} + echo -n " ${PERCENT}% " >> ${HISTORY} + echo -n "" >> ${HISTORY} + echo -n " ${PERCENT}% " >> ${HISTORY} + echo -n "
Baseline for duration
percent is rev.:
${BASELINE}
${TS}
(${PLATF})
" >> ${HISTORY} + + + echo "
" >> ${HISTORY} + echo "
" >> ${HISTORY} + echo "" >> ${HISTORY} + date +%Y-%m-%d" "%H:%M:%S" "%Z >> ${HISTORY} + echo "" >> ${HISTORY} + echo "
" >> ${HISTORY} + chmod go+r ${HISTORY} + + if [ "${SHOWDETAILS}" != "ShowDetails" ] + then + DTIPUB="${PUBLISHDIR}/${PRESENTATION}/${SUITE}_history.html" + SRC="${HISTORY}" + DST="${DTIPUB}" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} +fi + +done # SUITES + Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testHistoriesDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,243 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +SHOWDETAILS="" +PRESENTATION="Limited" +RSPAN=4 +if [ "$1" = "details" ] +then + # Show details + SHOWDETAILS="ShowDetails" + PRESENTATION="Full" + RSPAN=5 +fi + +# We have one catalog per platform +if [ ! -e ${TESTLOGDIR} ] +then + echo "${TESTLOGDIR} does not exist" + exit +fi + +# Get the list of testsuite we are running: +TESTLISTFILE="${DERBYDIR}/testing/testlist" +SUITES=`gawk '{ print $1 }' ${TESTLISTFILE} | grep -v "^#"` + +# Get the set of platforms +cd ${TESTLOGDIR} +PLATFORMS=`ls` + +# Get the list of revisions +REVISIONSFILE="${DERBYDIR}/testing/revisionlist" +# This is extremely timeconsuming: +# Use only 12 latest revisions +REVISIONS=`head -12 ${REVISIONSFILE} | gawk '{ print $1 }' | grep -v "^#"` + +for PLATFORM in ${PLATFORMS} +do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo ${PLATFORM} + # Create one file per platform + HISTORY="${DERBYDIR}/testing/${PRESENTATION}/${PLATFORM}_history.html" + mkdir -p ${DERBYDIR}/testing/${PRESENTATION} + chmod o+rx ${DERBYDIR}/testing/${PRESENTATION} + + # Build table header: + echo "" > ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + + chmod go+r ${HISTORY} + + no=0 + for REVISION in ${REVISIONS} + do + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + #DEBUG echo "${REVISION}" + + TS=`cat ${UPDATELOGDIR}/${REVISION}/UpdateTime` + + echo "" >> ${HISTORY} + # Done building header. + + for SUITE in ${SUITES} + do + echo " ${SUITE}" + # Info per SUITE in rows + + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + echo "" >> ${HISTORY} + + echo "" >> ${HISTORY} + + echo "" >> ${HISTORY} + echo -n " N: " + for REVISION in ${REVISIONS} + do + echo -n " ${REVISION}" + # Info per REVISION in columns: Number of tests + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv` + if [ "${RES}" = "" ] + then + RES="" + else + NUMBER=`echo ${RES} | gawk '{ print $2 }'` + # OK=`echo ${RES} | gawk '{ print $3 }'` + # FAILED=`echo ${RES} | gawk '{ print $4 }'` + # SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + RES="" + fi + # DEBUG echo "${RES}" + echo -n "${RES}" >> ${HISTORY} + done # REVISIONS Number + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo ""; echo -n " OK: " + for REVISION in ${REVISIONS} + do + echo -n " ${REVISION}" + # Info per REVISION in columns: Number of tests + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv` + if [ "${RES}" = "" ] + then + RES="" + else + # NUMBER=`echo ${RES} | gawk '{ print $2 }'` + OK=`echo ${RES} | gawk '{ print $3 }'` + # FAILED=`echo ${RES} | gawk '{ print $4 }'` + # SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + RES="" + fi + # DEBUG echo "${RES}" + echo -n "${RES}" >> ${HISTORY} + done # REVISIONS OK + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo ""; echo -n " Failed: " + for REVISION in ${REVISIONS} + do + echo -n " ${REVISION}" + # Info per REVISION in columns: Number of tests + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv` + if [ "${RES}" = "" ] + then + RES="" + else + # NUMBER=`echo ${RES} | gawk '{ print $2 }'` + # OK=`echo ${RES} | gawk '{ print $3 }'` + FAILED=`echo ${RES} | gawk '{ print $4 }'` + # SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + CFB="${BGCOLOR}" + if [ "${FAILED}" != "0" ] + then + FAILED="${FAILED}" + CFB="bgcolor=\"red\"" + fi + RES="" + fi + # DEBUG echo "${RES}" + echo -n "${RES}" >> ${HISTORY} + done # REVISIONS Failed + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo ""; echo -n " Skipped:" + for REVISION in ${REVISIONS} + do + echo -n " ${REVISION}" + # Info per REVISION in columns: Number of tests + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv` + CSB="" + if [ "${RES}" = "" ] + then + RES="" + else + # NUMBER=`echo ${RES} | gawk '{ print $2 }'` + # OK=`echo ${RES} | gawk '{ print $3 }'` + # FAILED=`echo ${RES} | gawk '{ print $4 }'` + SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + if [ "${SKIPPED}" != "0" ] + then + # CSB="bgcolor=\"yellow\"" + CSB="bgcolor=\"#FFFFA0\"" + fi + RES="" + fi + # DEBUG echo "${RES}" + echo -n "${RES}" >> ${HISTORY} + done # REVISIONS Skipped + echo "" >> ${HISTORY} + if [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo "" >> ${HISTORY} + echo "" >> ${HISTORY} + echo ""; echo -n " Duratio:" + for REVISION in ${REVISIONS} # Duration + do + echo -n " ${REVISION}" + RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv | gawk '{ print "" }'` + #DEBUG echo "${RES}" + if [ "${RES}" = "" ] + then + RES="" + fi + echo -n "${RES}" >> ${HISTORY} + done # REVISIONS Duration + echo "" >> ${HISTORY} + fi # SHOWDETAILS + + echo "" >> ${HISTORY} + + echo ""; echo " End ${SUITE}" + done # SUITES + + echo "
${PLATFORM} Rev.:
${REVISION}
${TS}" >> ${HISTORY} + done + echo "
${SUITE}"\#:""$NA"${NUMBER}
"OK:""$NA"${OK}
"Failed:""$NA"${FAILED}
"Skip:""$NA"${SKIPPED}
Duration:"$6""$NA"
" >> ${HISTORY} + echo "
" >> ${HISTORY} + echo "
" >> ${HISTORY} + echo "" >> ${HISTORY} + date +%Y-%m-%d" "%H:%M:%S" "%Z >> ${HISTORY} + echo "" >> ${HISTORY} + echo "
" >> ${HISTORY} + + chmod go+r ${HISTORY} + + echo "End ${PLATFORM}" + fi + + if [ "${SHOWDETAILS}" != "ShowDetails" ] + then + DTIPUB="${PUBLISHDIR}/${PRESENTATION}/${PLATFORM}_history.html" + SRC="${HISTORY}" + DST="${DTIPUB}" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + fi + +done # PLATFORMS + Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testPlatformsDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,477 @@ +#!/bin/bash +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +if [ "$1" = "" ] +then + echo "Usage: $0 current|previous|revision [details]" + exit +fi +WHICH=$1 +SHOWDETAILS="" +PRESENTATION="Limited" +if [ "$2" = "details" ] +then + # Show details + SHOWDETAILS="ShowDetails" + PRESENTATION="Full" +fi + +# We have one catalog per platform +if [ ! -e ${TESTLOGDIR} ] +then + echo "${TESTLOGDIR} does not exist" + exit +fi + +cd ${TESTLOGDIR} + +SUMMARY="${DERBYDIR}/testing/${PRESENTATION}/testSummary-${WHICH}-$$.html" +SHOWSUMMARY="${DERBYDIR}/testing/${PRESENTATION}/testSummary-${WHICH}.html" +SHOWSUMMARYPUB="${PUBLISHDIR}/${PRESENTATION}/testSummary-${WHICH}.html" +mkdir -p ${DERBYDIR}/testing/${PRESENTATION} +chmod o+xr ${DERBYDIR}/testing/${PRESENTATION} + +# Get the list of testsuite we are running: +TESTLISTFILE="${DERBYDIR}/testing/showtestlist" +SUITES=`gawk '{ print $1 }' ${TESTLISTFILE} | grep -v "^#"` + +PLATFORMS=`ls` + +DERBYVERSION=" -" +if [ "${WHICH}" = "current" ] +then + DERBYVERSION=`grep "/classes] " ${DERBYDIR}/BuildLog/currentSysInfo.txt | gawk -F] '{ print $2 }'` + if [ "${DERBYVERSION}" == "" ] # extractFromJETrun copies from ..._report.txt. Make this default... + then + DERBYVERSION=`grep "derby.jar] " ${DERBYDIR}/BuildLog/currentSysInfo.txt | gawk -F] '{ print $2 }'` + fi +elif [ "${WHICH}" = "previous" ] +then + REVISIONSFILE="${DERBYDIR}/testing/revisionlist" + PREVREV=`grep -v "^#" ${REVISIONSFILE} | head -2 | tail -1 | gawk '{ print $1 }'` + DERBYVERSION=`grep "/classes] " ${DERBYDIR}/BuildLog/${PREVREV}/sysinfo.txt | gawk -F] '{ print $2 }'` + if [ "${DERBYVERSION}" == "" ] # extractFromJETrun copies from ..._report.txt. Make this default... + then + DERBYVERSION=`grep "derby.jar] " ${DERBYDIR}/BuildLog/${PREVREV}/sysinfo.txt | gawk -F] '{ print $2 }'` + fi +else + DERBYVERSION=`grep "/classes] " ${DERBYDIR}/BuildLog/${WHICH}/sysinfo.txt | gawk -F] '{ print $2 }'` + if [ "${DERBYVERSION}" == "" ] # extractFromJETrun copies from ..._report.txt. Make this default... + then + DERBYVERSION=`grep "derby.jar] " ${DERBYDIR}/BuildLog/${WHICH}/sysinfo.txt | gawk -F] '{ print $2 }'` + fi +fi + +SANDBOX=`basename ${DERBYDIR}` +echo "" > ${SUMMARY} +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "${SANDBOX} ${WHICH} ${DERBYVERSION} Apache Derby Open Source Database" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} +DBV=`echo "${DERBYVERSION}" | gawk -F\( '{ print $2 }' | gawk -F\) '{ print $1 }'` +# Next is added since we now get e.g. 394991:394993M +DBV=`echo "${DBV}" | gawk -F: '{ print $1 }'` +PUREDBV=`echo ${DBV} | sed -e 's/M//'` +FAILDBV=${PUREDBV} +HASSEQNO=`echo ${WHICH} | grep "S"` + +if [ "${WHICH}" = "current" ] # No need for mkJIRArefs.current: We have DBV. +then + ${TOOLDIR}/mkJIRArefs.current ${SANDBOX} current # May be overkill, doing this too many places now..... +elif [ "${WHICH}" = "previous" ] # No need for mkJIRArefs.current: We have DBV. +then + ${TOOLDIR}/mkJIRArefs.current ${SANDBOX} previous # May be overkill, doing this too many places now..... +elif [ "${HASSEQNO}" != "" ] +then + ${TOOLDIR}/mkJIRArefs ${SANDBOX} ${WHICH} # May be overkill, doing this too many places now..... + FAILDBV=${WHICH} + PUREDBV=${WHICH} +else + ${TOOLDIR}/mkJIRArefs ${SANDBOX} ${WHICH} # ${DBV} # May be overkill, doing this too many places now..... + FAILDBV=${WHICH} + PUREDBV=${WHICH} +fi +DETAILS="(Failures in ${FAILDBV})" + +NOTE="" +if [ -e ${DERBYDIR}/testing/Notes/${WHICH}.txt ] +then + TXT=`cat ${DERBYDIR}/testing/Notes/${WHICH}.txt` + NOTE="
Note: ${TXT}" +fi + +echo " ${SANDBOX} ${WHICH} ${DETAILS} ${NOTE}" >> ${SUMMARY} + +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} + +# Show Legend in top, leftmost col.: +echo "" >> ${SUMMARY} +fi +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} + +# Heading: +no=0 +for PLATFORM in ${PLATFORMS} +do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + #DEBUG echo "PLATFORM: ${PLATFORM}" + PLATF=`echo "${PLATFORM}" | sed -e 's/CYGWIN_/CYGWIN /' | gawk -F_ '{ print $1"
"$2 }' | sed -e 's/CYGWIN /CYGWIN_/'` + #DEBUG echo "PLATF: ${PLATF}" + THNAME="" + BUILDPLATFHOST=`grep "^Built on " ${PLATFORM}/${WHICH}.csv | gawk '{ print $3" "$4" "$5" "$6 }'` + BP=`echo ${BUILDPLATFHOST} | gawk -F[ '{ print $1 }'` + BHNAME="" + if [ "${SHOWDETAILS}" = "ShowDetails" ] + then + TESTHOST=`head -1 ${PLATFORM}/${WHICH}.csv | gawk '{ print $1 }'` + THNAME="
${TESTHOST}" + BHNAME=`echo ${BUILDPLATFHOST} | gawk -F[ '{ print $2 }' | gawk -F] '{ print $1 }'` + BHNAME="
${BHNAME}" + fi + # DEBUG echo "BHNAME: ${BHNAME}" + REVISION=`head -1 ${PLATFORM}/${WHICH}.csv | gawk '{ print $7 }'` + + # Need to check every time in case we're looking at current or previous :-( + TS=`cat ${UPDATELOGDIR}/${REVISION}/UpdateTime` + + TESTLOG_PLATF_DIR="${TESTLOGDIR}/${PLATFORM}" + JAVA="${TESTLOG_PLATF_DIR}/${REVISION}.javainfo" + JAVAVENDOR=`head -1 ${JAVA}` + JAVAVERSION=`tail -1 ${JAVA}` + JAVAINFO="${JAVAVENDOR}
${JAVAVERSION}" + + SHREV="${REVISION}
${TS}" + if [ "${REVISION}" != "${PUREDBV}" ] + then + SHREV="${REVISION}
${TS}
" + fi + # DEBUG echo "SHREV: ${SHREV}" + + echo "" >> ${SUMMARY} + fi # externallyVisible || "ShowDetails" +done # PLATFORMS +echo "" >> ${SUMMARY} + +if [ "${REVISION}" = "" ] +then + REVISION="${WHICH}" +fi + +echo "" >> ${SUMMARY} +# echo "" >> ${SUMMARY} +# DBV=`echo "${DERBYVERSION}" | gawk -F\( '{ print $2 }' | gawk -F\) '{ print $1 }'` +## if [ "${SHOWDETAILS}" = "ShowDetails" ] # FIXME +## then + echo "" >> ${SUMMARY} +## else +## echo "" >> ${SUMMARY} +## fi +for PLATFORM in ${PLATFORMS} +do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + for HEAD in Num OK Fail Skip + do + # echo -n "" >> ${SUMMARY} + echo -n "" >> ${SUMMARY} + done + fi +done # PLATFORMS +echo "" >> ${SUMMARY} + +no=0 +NA="NA" + +for SUITE in ${SUITES} +do + if [ "${SUITE}" = "exit" ] + then + echo "Exit: found ${SUITE}" + echo "
" >> ${SUMMARY} +echo "
" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "Test platform:

" >> ${SUMMARY} +echo "Java Vendor:
" >> ${SUMMARY} +echo "Java Version:
" >> ${SUMMARY} +if [ "${SHOWDETAILS}" = "ShowDetails" ] +then + echo "Test host:" >> ${SUMMARY} +fi +echo "
" >> ${SUMMARY} +echo "Rev:
Date & Time:
" >> ${SUMMARY} + +# DBV=`echo "${DERBYVERSION}" | gawk -F\( '{ print $2 }' | gawk -F\) '{ print $1 }'` + +# If the build failed: +if [ -e ${DERBYDIR}/testing/UpdateInfo/${DBV}-buildDetails.txt ] +then + echo "ERRORS! " >> ${SUMMARY} + + SRC="${DERBYDIR}/testing/UpdateInfo/${DBV}-buildDetails.txt" + DST="${PUBLISHDIR}/UpdateInfo/${DBV}-buildDetails.txt" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + +fi + +if [ "${SHOWDETAILS}" != "ShowDetails" ] +then + # Make sure we transfer the change info from previous rev.: + SRC="${DERBYDIR}/testing/UpdateInfo/${PUREDBV}.txt" + DST="${PUBLISHDIR}/UpdateInfo/${PUREDBV}.txt" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} +fi + +echo "Build platform:" >> ${SUMMARY} +if [ "${SHOWDETAILS}" = "ShowDetails" ] +then + echo "
Build host:
${PLATF}
${JAVAINFO}${THNAME}
${SHREV}
${BP}${BHNAME}
Changes(->${REVISION}) Changes(->${PUREDBV}) Changes(->${PUREDBV}) ${HEAD} ${HEAD}
" >> ${SUMMARY} + echo "
" >> ${SUMMARY} + echo "
" >> ${SUMMARY} + echo "" >> ${SUMMARY} + date +%Y-%m-%d" "%H:%M:%S" "%Z >> ${SUMMARY} + echo "" >> ${SUMMARY} + echo "
" >> ${SUMMARY} + cp -f ${SUMMARY} ${SHOWSUMMARY} + chmod go+r ${SHOWSUMMARY} + rm -f ${SUMMARY} + + if [ "${SHOWDETAILS}" != "ShowDetails" ] + then + SRC="${SHOWSUMMARY}" + DST="${SHOWSUMMARYPUB}" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + fi + + exit + fi + + echo "${SUITE}" + + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + #DEBUG echo "$no: $BGCOLOR" + + echo "${SUITE}" >> ${SUMMARY} + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo " ${PLATFORM}" + # 2: Number, 3: OK, 4: Failed, 5: Skipped + RES=`grep "^${SUITE} " ${PLATFORM}/${WHICH}.csv` + if [ "${RES}" = "" ] + then + RES=""$NA""$NA""$NA""$NA"" + else + NUMBER=`echo ${RES} | gawk '{ print $2 }'` + OK=`echo ${RES} | gawk '{ print $3 }'` + FAILED=`echo ${RES} | gawk '{ print $4 }'` + SKIPPED=`echo ${RES} | gawk '{ print $5 }'` + CFB="" + CSB="" + if [ "${FAILED}" != "0" ] + then + REVISION=`head -1 ${PLATFORM}/${WHICH}.csv | gawk '{ print $7 }'` + FAILFILE="${PLATFORM}/${REVISION}-${SUITE}_diff.txt" + FAILED="${FAILED}" + CFB="bgcolor=\"red\"" + if [ "${SHOWDETAILS}" != "ShowDetails" ] + then + SRC="${DERBYDIR}/testing/testlog/${FAILFILE}" + DST="${PUBLISHDIR}/testlog/${FAILFILE}" + chmod go+r ${SRC} + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + fi + fi + if [ "${SKIPPED}" != "0" ] + then + REVISION=`head -1 ${PLATFORM}/${WHICH}.csv | gawk '{ print $7 }'` + SKIPFILE="${PLATFORM}/${REVISION}-${SUITE}_skipped.txt" + SKIPPED="${SKIPPED}" + # CSB="bgcolor=\"yellow\"" + CSB="bgcolor=\"#FFFFA0\"" + if [ "${SHOWDETAILS}" != "ShowDetails" ] + then + SRC="${DERBYDIR}/testing/testlog/${SKIPFILE}" + DST="${PUBLISHDIR}/testlog/${SKIPFILE}" + chmod go+r ${SRC} + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + fi + fi + CNB="" + if [ "${NUMBER}" == "0" ] + then + CNB="bgcolor=\"yellow\"" + fi + RES="${NUMBER}${OK}${FAILED}${SKIPPED}" + fi + #DEBUG echo "${RES}" + + echo -n "${RES}" >> ${SUMMARY} + fi + done # PLATFORMS + echo "" >> ${SUMMARY} + + # if [ "${SHOWDETAILS}" = "ShowDetails" ] + # then + echo "" >> ${SUMMARY} + + echo " Duration:" >> ${SUMMARY} + for PLATFORM in ${PLATFORMS} + do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + #DEBUG echo " ${PLATFORM}" + TIME=`grep "^${SUITE} " ${PLATFORM}/${WHICH}.csv | gawk '{ print $6 }'` + # echo "${TIME}" + if [ "${TIME}" = "" ] + then + RES=""$NA"" + STARTED=`head -1 ${PLATFORM}/suiteStart.txt` + if [ "${SHOWDETAILS}" = "ShowDetails" ] + then + if [ "${STARTED}" != "" ] + then + RES="Start: ${STARTED}" + RES="${RES}" + fi + fi + echo -n "${RES}" >> ${SUMMARY} + else + SECONDS=`${TOOLDIR}/toSeconds ${TIME}` + # echo ${SECONDS} + BASESECONDS=`grep "^${SUITE} " ${PLATFORM}/baseline.csv | gawk '{ print $3 }'` + # echo ${BASESECONDS} + PERCENT=`${TOOLDIR}/calcPercent ${SECONDS} ${BASESECONDS}` + # echo ${PERCENT} + # RES=""${TIME} ${PERCENT}"" + # echo ${RES} + if [ "${SHOWDETAILS}" = "ShowDetails" ] + then + echo -n "" >> ${SUMMARY} + echo -n " ${TIME} " >> ${SUMMARY} + echo -n "" >> ${SUMMARY} + echo -n "" >> ${SUMMARY} + echo -n " ${PERCENT}% " >> ${SUMMARY} + echo -n "" >> ${SUMMARY} + else + echo -n "" >> ${SUMMARY} + echo -n " ${PERCENT}% " >> ${SUMMARY} + echo -n "" >> ${SUMMARY} + fi + # echo -n "${RES}" >> ${SUMMARY} + fi + fi + done # PLATFORMS + echo "" >> ${SUMMARY} + # fi # SHOWDETAILS + +done # SUITE in ${SUITES} + +# Show baseline info for each platform: +echo "" >> ${SUMMARY} +echo " Baseline for
duration is rev.:
" >> ${SUMMARY} +no=0 +for PLATFORM in ${PLATFORMS} +do + if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "ShowDetails" ] + then + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + BASELINE=`head -1 ${PLATFORM}/baseline.csv | gawk '{ print $2 }'` + TS=`cat ${UPDATELOGDIR}/${BASELINE}/UpdateTime` + PLATF=`echo "${PLATFORM}" | sed -e 's/CYGWIN_/CYGWIN /' | gawk -F_ '{ print $1"
"$2 }' | sed -e 's/CYGWIN /CYGWIN_/'` + echo "${BASELINE}
${TS}
(${PLATF})
" >> ${SUMMARY} + fi +done # PLATFORMS +echo "" >> ${SUMMARY} + +if [ "${SHOWDETAILS}" == "ShowDetails" ] # Internal pages +then + echo "" >> ${SUMMARY} # Show link to revision.zip file on internal pages: + echo " Zipped
'Java user dir':
" >> ${SUMMARY} + no=0 + for PLATFORM in ${PLATFORMS} + do + + BGCOLOR="bgcolor=\"${COLOR0}\"" + # expr $no % 2 + if [ `expr $no % 2` = 0 ] + then + BGCOLOR="bgcolor=\"${COLOR1}\"" + fi + no=`expr $no + 1` + REVISION=`head -1 ${PLATFORM}/${WHICH}.csv | gawk '{ print $7 }'` + ZIPFILE="${PLATFORM}/${REVISION}.zip" + ZIPPED="${REVISION}.zip" + echo "${ZIPPED}" >> ${SUMMARY} + done # PLATFORMS + echo "" >> ${SUMMARY} +fi +echo "" >> ${SUMMARY} + +echo "
" >> ${SUMMARY} +echo "
" >> ${SUMMARY} +echo "" >> ${SUMMARY} +date +%Y-%m-%d" "%H:%M:%S" "%Z >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "
" >> ${SUMMARY} +echo "" >> ${SUMMARY} +echo "" >> ${SUMMARY} + +cp -f ${SUMMARY} ${SHOWSUMMARY} +chmod go+r ${SHOWSUMMARY} +rm -f ${SUMMARY} + +if [ "${SHOWDETAILS}" != "ShowDetails" ] +then + SRC="${SHOWSUMMARY}" + DST="${SHOWSUMMARYPUB}" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} +fi + +# Transfer -system info +for PLATFORM in ${PLATFORMS} +do + SRC="${DERBYDIR}/testing/testlog/${PLATFORM}/${REVISION}-system" + EXTVIS="${DERBYDIR}/testing/testlog/${PLATFORM}/externallyVisible" + if [ -e ${EXTVIS} ] && [ "${SHOWDETAILS}" != "ShowDetails" ] && [ -e ${SRC} ] + then + DST="${PUBLISHDIR}/testlog/${PLATFORM}/${REVISION}-system" + chmod go+r ${SRC} + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + fi +done # PLATFORMS Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/testSummariesDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/textMail URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/textMail?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/textMail (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/textMail Fri Nov 24 00:35:04 2006 @@ -0,0 +1,47 @@ +#!/bin/bash +if [ "$1" == "" ] +then + echo "Missing Subject" + exit +fi +if [ "$2" == "" ] +then + echo "Missing toMailAdr" + exit +fi +if [ "$3" == "" ] +then + echo "Missing File(s)" + echo "NB! Must be plain text files with nothing that the shell might try to interpret!" + exit +fi +SUBJECT=$1 +TO=$2 +FILELIST=$3 + +# echo "Creating sendmail file" + +echo "Subject: ${SUBJECT}" >> sendmailfile$$ +echo "To: ${TO}" >> sendmailfile$$ +echo "From: John.Doe@ACME.COM" >> sendmailfile$$ + +for FILE in ${FILELIST} +do + + # echo "File: ${FILE}:" >> sendmailfile$$ + # echo "" >> sendmailfile$$ + + cat ${FILE} >> sendmailfile$$ + + # echo "-------" >> sendmailfile$$ + echo "" >> sendmailfile$$ + +done + +cat sendmailfile$$ + +echo "Sending mail w/Subject '"${SUBJECT}"' to ${TO}" +/usr/lib/sendmail -t < sendmailfile$$ + + +rm sendmailfile$$ Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/textMail ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/textMail ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds Fri Nov 24 00:35:04 2006 @@ -0,0 +1,16 @@ +#!/bin/bash +# +HrMinSecString=$1 +# echo ${HrMinSecString} +Hours=`echo ${HrMinSecString} | awk -F: '{print $1}'` +Minutes=`echo ${HrMinSecString} | awk -F: '{print $2}'` +Seconds=`echo ${HrMinSecString} | awk -F: '{print $3}'` +# echo "${Hours} ${Minutes} ${Seconds} " +# Force let to interpret as decimal (leading 0 otherwise means octal). +Hours="10#${Hours}" +Minutes="10#${Minutes}" +Seconds="10#${Seconds}" +# echo "${Hours} ${Minutes} ${Seconds} " +let " Minutes = ${Minutes} + ${Hours}*60 " +let " Seconds = ${Seconds} + ${Minutes}*60 " +echo ${Seconds} Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/toSeconds ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,32 @@ +#!/bin/bash +# if "ZipJars"..: +MKBUILDZIP=$1 +DESIREDREVISION=$2 +ANTPROPFILE=$3 + +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + + +cd ${DERBYDIR} +echo "This script is supposed to be executed on the Derby build host." +echo "-------------------------------------" +. ./env.sh +echo "Update Derby source from repository." +${TOOLDIR}/updateDerby ${DESIREDREVISION} +echo "-------------------------------------" + +# Force build: uncomment next line +# touch ${UPDATELOGDIR}/updateOK + +echo "Build Derby" +${TOOLDIR}/buildDerby "${MKBUILDZIP}" "${ANTPROPFILE}" +echo "-------------------------------------" + +# Force test: uncomment next line +# touch ${BUILDLOGDIR}/buildOK + +echo "Test Derby" +${TOOLDIR}/testDerby ${HOSTLISTFILE} +echo "-------------------------------------" + Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/updateBuildTestDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby Fri Nov 24 00:35:04 2006 @@ -0,0 +1,155 @@ +#!/bin/bash +# +DESIREDREVISION="" +if [ "$1" != "" ] +then + DESIREDREVISION="-r $1" +fi +# You should NOT need to modify anything below. +# NB: derby_source must be defined. +# NB NB: Assumes a svn update IS done when run first time! +# If neccessary do a svn up -rXXXXXX to a previous revision first. +#--------------------------------------------- +TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" +. ${TOOLDIR}/env + +SRCDIR=${derby_source} + +if [ ! -e ${SRCDIR} ] +then + echo "${SRCDIR} does not exist." + exit +fi +SANDBOX=`basename ${DERBYDIR}` +UPDATELOGDIR=${DERBYDIR}/UpdateLog +UPDATEID=`date +%Y-%m-%d_%H-%M-%S` + +UPDATELOGDIRCUR=${UPDATELOGDIR}/${UPDATEID} +mkdir -p ${UPDATELOGDIRCUR} +if [ ! -e ${UPDATELOGDIRCUR} ] +then + echo "${UPDATELOGDIRCUR} does not exist." + exit +fi + +# First time... +mkdir -p ${DERBYDIR}/testing + +SVNHOSTINFO=`uname -srpi` +SVNHOST=`uname -n` +SVNHOST=`host ${SVNHOST} | awk '{print $1}'` +cd ${SRCDIR} + +rm -f ${UPDATELOGDIR}/updateOK + +svn --version > ${UPDATELOGDIRCUR}/svn--version + +LASTUPDATEREVISION=`head -1 ${REVISIONLIST}` +OLDREVISION=`svn info | grep '^Revision:'` +OLDREPOSITORY=`svn info | grep '^URL:'` + +echo "${SVNHOSTINFO}[${SVNHOST}]" > ${UPDATELOGDIRCUR}/status-u.out +echo "${OLDREVISION} ${OLDREPOSITORY}" >> ${UPDATELOGDIRCUR}/status-u.out + +svn status -u >> ${UPDATELOGDIRCUR}/status-u.out 2> ${UPDATELOGDIRCUR}/status-u.err + +echo "${SVNHOSTINFO}[${SVNHOST}]" > ${UPDATELOGDIRCUR}/update.out + +STARTTIME=`date +%Y-%m-%d" "%H:%M:%S" "%Z` + +#################################### +# Do the update +# +svn update ${DESIREDREVISION} >> ${UPDATELOGDIRCUR}/update.out 2> ${UPDATELOGDIRCUR}/update.err +# +#################################### + +REVISION=`svn info | grep '^Revision:'` +REPOSITORY=`svn info | grep '^URL:'` + +REVISION=`echo ${REVISION} | gawk '{ print $2 }'` +OLDREVISION=`echo ${OLDREVISION} | gawk '{ print $2 }'` + +echo "${REVISION} ${REPOSITORY}" >> ${UPDATELOGDIRCUR}/update.out +svn status >> ${UPDATELOGDIRCUR}/update.out 2>> ${UPDATELOGDIRCUR}/update.err +cp ${UPDATELOGDIRCUR}/update.out ${UPDATELOGDIR}/update.out + +echo "LASTUPDATEREVISION: ${LASTUPDATEREVISION}, OLDREVISION: ${OLDREVISION}, REVISION: ${REVISION}" + +# java/testing/README.htm is NOT readable by 'o' by default.... +# I publish a web-link to it: +chmod go+r java/testing/README.htm + +# Flag that update went OK: +if [ -e ${UPDATELOGDIR}/${UPDATEID}/update.err ] +then + LNSERR=`wc -l ${UPDATELOGDIR}/${UPDATEID}/update.err | gawk '{ print $1 }'` + echo "LNSERR: ${LNSERR}" + if [ "${LNSERR}" = "0" ] + then + ls -l ${UPDATELOGDIR}/${UPDATEID}/update.out + if [ -e ${UPDATELOGDIR}/${UPDATEID}/update.out ] + then + UPDATED=`grep "Updated to revision" ${UPDATELOGDIR}/${UPDATEID}/update.out | wc -l | gawk '{ print $1 }'` + UNCHANGED=`grep "At revision" ${UPDATELOGDIR}/${UPDATEID}/update.out | wc -l | gawk '{ print $1 }'` + echo "UPDATED: ${UPDATED}, UNCHANGED: ${UNCHANGED}." + if [ "${UPDATED}" = "1" -o "${UNCHANGED}" = "1" ] + then + echo "LASTUPDATEREVISION: ${LASTUPDATEREVISION}, OLDREVISION: ${OLDREVISION}, REVISION: ${REVISION}" + if [ "${UNCHANGED}" = "1" ] + then + echo "UNCHANGED is 1" + STATUS="unchanged from revision ${LASTUPDATEREVISION}/${OLDREVISION} to" + # echo "${TOOLDIR}/textMail \"Derby ${STATUS} ${REVISION}\" \"${MAILTOEXT}\" \"${UPDATELOGDIR}/update.out\"" + # ${TOOLDIR}/textMail "Derby ${STATUS} ${REVISION}" "${MAILTOEXT}" "${UPDATELOGDIR}/update.out" + # Remove ...../${UPDATEID}/ + rm -rf ${UPDATELOGDIR}/${UPDATEID} + echo "${STATUS} ${REVISION}" + exit + else + echo "UNCHANGED is not 1" + STATUS="updated to revision" + echo ${REVISION} > ${REVISIONLIST}.this + cp ${REVISIONLIST} ${REVISIONLIST}.prev + cat ${REVISIONLIST}.this ${REVISIONLIST}.prev > ${REVISIONLIST} + rm -f ${REVISIONLIST}.prev ${REVISIONLIST}.this + echo "touch ${UPDATELOGDIR}/updateOK" + touch ${UPDATELOGDIR}/updateOK + + UPDATEINFO="UpdateInfo" + mkdir -p ${DERBYDIR}/${UPDATEINFO} + REVLO="${DERBYDIR}/${UPDATEINFO}/${REVISION}.txt" + echo "Changes from ${LASTUPDATEREVISION}/${OLDREVISION} to ${REVISION}:" > ${REVLO} + ${TOOLDIR}/svnLogRevs.new ${OLDREVISION} ${REVISION} >> ${REVLO} + echo " " >> ${REVLO} + cat ${UPDATELOGDIR}/${UPDATEID}/update.out >> ${REVLO} + + LUREV="${DERBYDIR}/${UPDATEINFO}/LatestUpdateRevision.txt" + echo ${REVISION} > ${LUREV} + SRC="${REVLO} ${LUREV}" + chmod go+r ${SRC} + + SCPUT=/usr/bin/scp # Do NOT block this one + DST="${PUBLISHDIR}/${UPDATEINFO}/" + echo "**** OBS! ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST}" + ### UNCOMMENT TO PUBLISH. ${SCPUT} ${SRC} ${PUBLISHUSER}@${PUBLISHSITE}:${DST} + + # echo "${TOOLDIR}/textMail \"${SANDBOX} ${STATUS} ${REVISION}\" \"${MAILTOEXT}\" \"${UPDATELOGDIR}/update.out\"" + # ${TOOLDIR}/textMail "Derby ${STATUS} ${REVISION}" "${MAILTOEXT}" "${UPDATELOGDIR}/update.out" + # Rename ...../${UPDATEID}/ to ...../${REVISION}/ + mv ${UPDATELOGDIR}/${UPDATEID} ${UPDATELOGDIR}/${REVISION} + echo ${STARTTIME} > ${UPDATELOGDIR}/${REVISION}/UpdateTime + echo "Changes from ${LASTUPDATEREVISION}/${OLDREVISION} to ${REVISION}." + exit + fi + echo "updateDerby 1" + fi + echo "updateDerby 2" + fi + echo "updateDerby 3" + fi + echo "updateDerby 4" +fi +echo "updateDerby 5" +### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SANDBOX} update failed" "${MAILTOINT}" "${UPDATELOGDIR}/update.out ${UPDATELOGDIRCUR}/update.err" +### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SANDBOX} update failed" "${MAILTOEXT}" "${UPDATELOGDIR}/update.out ${UPDATELOGDIRCUR}/update.err" Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/updateDerby ------------------------------------------------------------------------------ svn:executable = * Added: db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase?view=auto&rev=478802 ============================================================================== --- db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase (added) +++ db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase Fri Nov 24 00:35:04 2006 @@ -0,0 +1,16 @@ +#!/bin/bash +# +HrMinSecString=$1 +baseLineSeconds=$2 +# echo "${HrMinSecString},${baseLineSeconds}" +currSeconds=`toSeconds ${HrMinSecString}` +# echo "${currSeconds} / ${baseLineSeconds}" +let " Percent = ${currSeconds}*10000 / ${baseLineSeconds} " +let " Decimal = ${Percent} % 100 " +let " Percent = ${Percent} / 100 " +if [ "${Decimal}" = "0" ] +then + Decimal="00" +fi +echo "${Percent}.${Decimal}" +# echo -e "${Percent}.${Decimal}\tx" Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase ------------------------------------------------------------------------------ svn:eol-style = native Propchange: db/derby/code/trunk/tools/testing/reporting/scripts/vsTimeBase ------------------------------------------------------------------------------ svn:executable = *