Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | #! /bin/sh |
michael@0 | 2 | ######################################################################## |
michael@0 | 3 | # |
michael@0 | 4 | # /u/sonmi/bin/qa_stat - /u/svbld/bin/init/nss/qa_stat |
michael@0 | 5 | # |
michael@0 | 6 | # this script is supposed to automatically run QA for NSS on all required |
michael@0 | 7 | # Unix platforms |
michael@0 | 8 | # |
michael@0 | 9 | # parameters |
michael@0 | 10 | # ---------- |
michael@0 | 11 | # nssversion (supported: 30b, 31, tip) |
michael@0 | 12 | # builddate (default - today) |
michael@0 | 13 | # |
michael@0 | 14 | # options |
michael@0 | 15 | # ------- |
michael@0 | 16 | # -y answer all questions with y - use at your own risk...ignores warnings |
michael@0 | 17 | # -s silent (only usefull with -y) |
michael@0 | 18 | # -h, -? - you guessed right - displays this text |
michael@0 | 19 | # -d debug |
michael@0 | 20 | # -f <filename> - write the (error)output to filename |
michael@0 | 21 | # -m <mailinglist> - send filename to mailinglist (csl) only useful |
michael@0 | 22 | # with -f |
michael@0 | 23 | # -cron equivalient to -y -s -d -f $RESULTDIR/$HOST.qa_stat |
michael@0 | 24 | # |
michael@0 | 25 | ######################################################################## |
michael@0 | 26 | |
michael@0 | 27 | O_OPTIONS=ON |
michael@0 | 28 | |
michael@0 | 29 | TBX_EXIT=49 # in case we are running on a tinderbox build, any |
michael@0 | 30 | # early exit needs to return an error |
michael@0 | 31 | if [ -z "$O_TBX" -o "$O_TBX" = "OFF" ] ; then |
michael@0 | 32 | if [ -z "$O_LOCAL" -o "$O_LOCAL" = "OFF" ] ; then |
michael@0 | 33 | . `dirname $0`/header |
michael@0 | 34 | fi |
michael@0 | 35 | fi |
michael@0 | 36 | Debug "Sourced header O_TBX=$O_TBX O_LOCAL=$O_LOCAL" |
michael@0 | 37 | TBX_EXIT=48 |
michael@0 | 38 | EARLY_EXIT=TRUE |
michael@0 | 39 | |
michael@0 | 40 | URL="cindercone.red.iplanet.com" |
michael@0 | 41 | |
michael@0 | 42 | DOCDIR=/u/sonmi/doc |
michael@0 | 43 | |
michael@0 | 44 | HTML_ERRORCOLOR=\"#FF0000\" |
michael@0 | 45 | HTML_ERRORMSG=Failed |
michael@0 | 46 | |
michael@0 | 47 | HTML_MISSINGCOLOR=\"#FFFFCC\" |
michael@0 | 48 | HTML_MISSINGMSG=Missing |
michael@0 | 49 | |
michael@0 | 50 | HTML_INCOMPLETECOLOR=$HTML_MISSINGCOLOR |
michael@0 | 51 | HTML_INCOMPLETEMSG=Incomplete |
michael@0 | 52 | |
michael@0 | 53 | HTML_PASSEDCOLOR=\"#66FF99\" |
michael@0 | 54 | HTML_PASSEDMSG=Passed |
michael@0 | 55 | |
michael@0 | 56 | # this file is used to deal with hanging rsh - a new shell is started |
michael@0 | 57 | # for each rsh, and a function is called after it is finished - they |
michael@0 | 58 | # communicate with this file |
michael@0 | 59 | |
michael@0 | 60 | RSH_FILE=$TMP/rsh.$$ |
michael@0 | 61 | echo >$RSH_FILE |
michael@0 | 62 | TMPFILES="$TMPFILES $WARNINGLIST $RSH_FILE " |
michael@0 | 63 | RSH_WAIT_TIME=80 #maximum time allowed for the 2 rsh to finish... |
michael@0 | 64 | #TOTAL_TESTS=106 |
michael@0 | 65 | TOTAL_TESTS=252 #tip |
michael@0 | 66 | #TOTAL_TESTS=244 #3.4 |
michael@0 | 67 | #TOTAL_TESTS=123 #3.3.2 |
michael@0 | 68 | BCT_TOTAL_TESTS=122 #3.2.2 |
michael@0 | 69 | #TOTAL_TESTS=133 #tip |
michael@0 | 70 | |
michael@0 | 71 | Debug "NTDIST $NTDIST" |
michael@0 | 72 | Debug "UXDIST $UXDIST" |
michael@0 | 73 | Debug "TESTSCRIPTDIR $TESTSCRIPTDIR" |
michael@0 | 74 | Debug "RESULTDIR $RESULTDIR" |
michael@0 | 75 | |
michael@0 | 76 | ############################### watch_rsh ############################## |
michael@0 | 77 | # local shell function, deals with a hanging rsh (kills it...) |
michael@0 | 78 | # this function is started as a backgroundprocess before the rsh is started, |
michael@0 | 79 | # and writes info to the RSH_FILE, after the rsh is finished it writes finish |
michael@0 | 80 | # info to the same file (this time called as a function, forground). |
michael@0 | 81 | # the backgroundprocess stays around for RSH_WAIT_TIME, if then the finish |
michael@0 | 82 | # information is not there attempts to kill the rsh |
michael@0 | 83 | # |
michael@0 | 84 | # watch_rsh start qa_computername & |
michael@0 | 85 | # watch_rsh stop qa_computername |
michael@0 | 86 | # |
michael@0 | 87 | ######################################################################## |
michael@0 | 88 | watch_rsh() |
michael@0 | 89 | { |
michael@0 | 90 | case $1 in |
michael@0 | 91 | start) |
michael@0 | 92 | echo "$2 started" >>$RSH_FILE |
michael@0 | 93 | sleep $RSH_WAIT_TIME |
michael@0 | 94 | O_ALWAYS_YES=ON # may modify global flags because this is a |
michael@0 | 95 | # forked off bg process - kill_by_name otherwise |
michael@0 | 96 | # will ask the user if it really should be killed |
michael@0 | 97 | grep "$2 finished" $RSH_FILE >/dev/null || kill_by_name "rsh $2" |
michael@0 | 98 | exit |
michael@0 | 99 | ;; |
michael@0 | 100 | stop) |
michael@0 | 101 | echo "$2 finished" >>$RSH_FILE |
michael@0 | 102 | ;; |
michael@0 | 103 | esac |
michael@0 | 104 | } |
michael@0 | 105 | |
michael@0 | 106 | ############################### find_qa_systems ######################## |
michael@0 | 107 | # local shell function, tries to determine the QA operating system |
michael@0 | 108 | # works remotely, and for Windows machines |
michael@0 | 109 | ######################################################################## |
michael@0 | 110 | find_qa_systems() |
michael@0 | 111 | { |
michael@0 | 112 | for QA_SYS in `ls $RESULTDIR | grep '\.1$' | sed -e "s/\..*//" | sort -u` |
michael@0 | 113 | do |
michael@0 | 114 | NO_RSH="FALSE" |
michael@0 | 115 | QA_OS="" |
michael@0 | 116 | QA_RHVER="" |
michael@0 | 117 | IS_64="" |
michael@0 | 118 | IS_WIN="" |
michael@0 | 119 | |
michael@0 | 120 | grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa >/dev/null && NO_RSH=TRUE |
michael@0 | 121 | |
michael@0 | 122 | if [ "$NO_RSH" = "TRUE" ] |
michael@0 | 123 | then |
michael@0 | 124 | |
michael@0 | 125 | QA_OS=`grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \ |
michael@0 | 126 | -e "s/.*-OS-LINE: /${QA_SYS}/"` |
michael@0 | 127 | QA_OS_STRING=`echo $QA_OS | sed -e "s/^[_ ]//" -e "s/ /_/g"` |
michael@0 | 128 | echo $QA_OS_STRING >>$PLATFORMLIST |
michael@0 | 129 | if [ "$O_SILENT" != ON ] ; then |
michael@0 | 130 | echo $QA_OS |
michael@0 | 131 | fi |
michael@0 | 132 | |
michael@0 | 133 | #grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \ |
michael@0 | 134 | #-e "s/.*-OS-LINE: /${QA_SYS}_/" >>$PLATFORMLIST |
michael@0 | 135 | #if [ "$O_SILENT" != ON ] ; then |
michael@0 | 136 | #grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \ |
michael@0 | 137 | #-e "s/.*-OS-LINE:/${QA_SYS}/" |
michael@0 | 138 | #fi |
michael@0 | 139 | else |
michael@0 | 140 | REM_SYSNAME=$QA_SYS |
michael@0 | 141 | watch_rsh start $REM_SYSNAME & |
michael@0 | 142 | qa_stat_get_sysinfo $QA_SYS |
michael@0 | 143 | watch_rsh stop $REM_SYSNAME |
michael@0 | 144 | echo $QA_OS_STRING >>$PLATFORMLIST |
michael@0 | 145 | # use later for missing list |
michael@0 | 146 | fi |
michael@0 | 147 | done |
michael@0 | 148 | |
michael@0 | 149 | } |
michael@0 | 150 | |
michael@0 | 151 | ################################### qa_stat_init ########################## |
michael@0 | 152 | # local shell function, sets the name of the resultfile to: |
michael@0 | 153 | # <filename> if option -f <filename> |
michael@0 | 154 | # $RESULTDIR/result if write permission |
michael@0 | 155 | # (mozilla/tests_results/security/result) |
michael@0 | 156 | # $HOME/resultNSS${NSSVER}-${BUILDDATE} if no write permission in $RESULTDIR |
michael@0 | 157 | ######################################################################## |
michael@0 | 158 | qa_stat_init() |
michael@0 | 159 | { |
michael@0 | 160 | if [ $O_FILE = ON -a $O_CRON = OFF ] # if -f was specified write there |
michael@0 | 161 | then |
michael@0 | 162 | RFILE=$FILENAME |
michael@0 | 163 | else |
michael@0 | 164 | RFILE=${RESULTDIR}/result.$$ |
michael@0 | 165 | if [ ! -w $RESULTDIR ] |
michael@0 | 166 | then |
michael@0 | 167 | RFILE=$HOME/resultNSS${NSSVER}-${BUILDDATE}.$$ |
michael@0 | 168 | Debug "Using alternate resultfile $RFILE" |
michael@0 | 169 | #elif [ $O_CRON = ON ] |
michael@0 | 170 | #then |
michael@0 | 171 | ##find ${RESULTDIR} -exec chmod a+rw {} \; #FIXME - umask |
michael@0 | 172 | ##doesn't seem to work - this is a tmp workaround |
michael@0 | 173 | fi |
michael@0 | 174 | |
michael@0 | 175 | if [ ! -x $RESULTDIR -o ! -r $RESULTDIR -o ! -w $RESULTDIR ] |
michael@0 | 176 | then |
michael@0 | 177 | glob_usage "$RESULTDIR does not have the right permissions `ls -l $RESULTDIR`" |
michael@0 | 178 | fi |
michael@0 | 179 | if [ -d $RESULTDIR ] |
michael@0 | 180 | then |
michael@0 | 181 | cd $RESULTDIR |
michael@0 | 182 | else |
michael@0 | 183 | glob_usage "$RESULTDIR does not exist" |
michael@0 | 184 | fi |
michael@0 | 185 | fi |
michael@0 | 186 | |
michael@0 | 187 | ERRORLIST=${RFILE}.E |
michael@0 | 188 | PLATFORMLIST=${RFILE}.P |
michael@0 | 189 | PERFLIST=${RFILE}.PE |
michael@0 | 190 | TMP_HTML_FILE=${RFILE}.html |
michael@0 | 191 | HTML_FILE=${RESULTDIR}/result.html |
michael@0 | 192 | WARNINGLIST=${RFILE}.W |
michael@0 | 193 | BCMISSINGLIST=${RFILE}.BCM |
michael@0 | 194 | BCERRORLIST=${RFILE}.BCE |
michael@0 | 195 | TMPFILE=${RFILE}.T |
michael@0 | 196 | ML_FILE=${RFILE}.ML |
michael@0 | 197 | |
michael@0 | 198 | TMPFILES="$TMPFILES $TMPFILE" |
michael@0 | 199 | TMPFILES="$TMPFILES $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \ |
michael@0 | 200 | $BCMISSINGLIST $BCERRORLIST $ML_FILE" #FIXME uncomment |
michael@0 | 201 | |
michael@0 | 202 | FILENAME=$RFILE #we might want to mail it...later switch to html file |
michael@0 | 203 | O_FILE="ON" |
michael@0 | 204 | |
michael@0 | 205 | rm $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \ |
michael@0 | 206 | $BCMISSINGLIST $BCERRORLIST $TMP_HTML_FILE 2>/dev/null |
michael@0 | 207 | touch $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \ |
michael@0 | 208 | $BCMISSINGLIST $BCERRORLIST $TMP_HTML_FILE 2>/dev/null |
michael@0 | 209 | |
michael@0 | 210 | if [ $O_WIN = "ON" -a "$O_TBX" = "ON" ] ; then |
michael@0 | 211 | HTML_PATH="http://${URL}${UX_D0}/nss${NSSVER}/tinderbox/tests_results/security/`basename $RESULTDIR`" |
michael@0 | 212 | else |
michael@0 | 213 | HTML_PATH="http://${URL}${RESULTDIR}" |
michael@0 | 214 | fi |
michael@0 | 215 | HREF_TMP_HTML_FILE="${HTML_PATH}/`basename $HTML_FILE`" |
michael@0 | 216 | |
michael@0 | 217 | write_qa_header_html >$TMP_HTML_FILE |
michael@0 | 218 | } |
michael@0 | 219 | |
michael@0 | 220 | ################################# html_footer ######################### |
michael@0 | 221 | # local shell function, writes end of the html body |
michael@0 | 222 | ####################################################################### |
michael@0 | 223 | write_qa_header_html() |
michael@0 | 224 | { |
michael@0 | 225 | echo 'Subject: QA Report ' $NSSVER $BUILDDATE ' |
michael@0 | 226 | From: sonmi@iplanet.com |
michael@0 | 227 | Reply-To: sonmi@iplanet.com |
michael@0 | 228 | Content-Type: text/html; charset=us-ascii |
michael@0 | 229 | <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
michael@0 | 230 | <html> |
michael@0 | 231 | <head> |
michael@0 | 232 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
michael@0 | 233 | <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; U; SunOS 5.8 sun4u) [N |
michael@0 | 234 | etscape]"> |
michael@0 | 235 | </head> |
michael@0 | 236 | <body> |
michael@0 | 237 | <br> |
michael@0 | 238 | |
michael@0 | 239 | <br> |
michael@0 | 240 | <h2> |
michael@0 | 241 | <a href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=NSS">Tinderbox</a |
michael@0 | 242 | ><br> |
michael@0 | 243 | <a href="http://cindercone.red.iplanet.com/share/builds/mccrel3/nss/nsstip/tinderbox/tests_results/security/">Tinderbox QA result</a><br> |
michael@0 | 244 | <a href="ftp://ftp.mozilla.org/pub/security/nss/daily_qa">Mozilla Daily NSS QA result</a></h2> |
michael@0 | 245 | |
michael@0 | 246 | |
michael@0 | 247 | |
michael@0 | 248 | <br> |
michael@0 | 249 | <center> |
michael@0 | 250 | <h1> |
michael@0 | 251 | <a NAME="Top"></a><b><font size=+2>QA Results</font></b></h1></center> |
michael@0 | 252 | |
michael@0 | 253 | |
michael@0 | 254 | <table BORDER WIDTH="100%" NOSAVE > |
michael@0 | 255 | <tr> |
michael@0 | 256 | <td> <b><font size=+1>Build-OS and version</font></b></td> |
michael@0 | 257 | <td><b><font size=+1>QA-OS</font></b></td> |
michael@0 | 258 | <td><b><font size=+1>Systemname</font></b></td> |
michael@0 | 259 | <td><b><font size=+1>P/F</font></b></td> |
michael@0 | 260 | <td><b><font size=+1>result</font></b></td> |
michael@0 | 261 | <td><b><font size=+1>output</font></b></td> |
michael@0 | 262 | <td><b><font size=+1>errors</font></b></td> |
michael@0 | 263 | <td><b><font size=+1>QA time / #</font></b></td> |
michael@0 | 264 | </tr> |
michael@0 | 265 | ' |
michael@0 | 266 | } |
michael@0 | 267 | |
michael@0 | 268 | ################################# html_footer ######################### |
michael@0 | 269 | # local shell function, writes end of the html body |
michael@0 | 270 | ####################################################################### |
michael@0 | 271 | html_footer() |
michael@0 | 272 | { |
michael@0 | 273 | echo '</body>' |
michael@0 | 274 | echo '</html>' |
michael@0 | 275 | } |
michael@0 | 276 | |
michael@0 | 277 | ################################# setQAsysvars ######################### |
michael@0 | 278 | # local shell function, sets system specific variables |
michael@0 | 279 | ######################################################################## |
michael@0 | 280 | setQAsysvars() |
michael@0 | 281 | { |
michael@0 | 282 | if [ "$MACHINE" != "0" ] |
michael@0 | 283 | then |
michael@0 | 284 | MACHINE=`echo $MACHINE | sed -e 's/^bct.//g'` |
michael@0 | 285 | TESTDATE=`ls -ld $MACHINE | awk '{ print $6, $7, $8 }'` |
michael@0 | 286 | TESTNUMBER=`echo $MACHINE | sed -e 's/.*\.//'` |
michael@0 | 287 | SYSNAME=`echo $MACHINE | sed -e 's/\..*//'` |
michael@0 | 288 | Debug "SYSNAME= $SYSNAME" |
michael@0 | 289 | |
michael@0 | 290 | if [ "$O_TBX" = "ON" -o "$O_LOCAL" = "ON" ] ; then |
michael@0 | 291 | QA_SYS_OS=$QA_OS |
michael@0 | 292 | else |
michael@0 | 293 | QA_SYS_OS=`grep $SYSNAME $PLATFORMLIST | |
michael@0 | 294 | sed -e 's/ |
michael@0 | 295 | //' | \ |
michael@0 | 296 | sort | uniq | sed -e "s/$SYSNAME//" \ |
michael@0 | 297 | -e "s/^_//" | sort | uniq` |
michael@0 | 298 | fi |
michael@0 | 299 | Debug "QA_SYS_OS= $QA_SYS_OS" |
michael@0 | 300 | fi |
michael@0 | 301 | BUILD_SYS=`echo $BUILDPLATFORM | sed -e 's/\.OBJ//' -e 's/_DBG/ Debug/' \ |
michael@0 | 302 | -e 's/_OPT/ Optimized/' -e 's/_64/ 64bit/' -e 's/_glibc_PTH//' \ |
michael@0 | 303 | -e 's/_/ /'` |
michael@0 | 304 | Debug "BUILD_SYS=$BUILD_SYS" |
michael@0 | 305 | if [ -f "${RESULTDIR}/${MACHINE}/results.html" ] ; then |
michael@0 | 306 | RESULT="${HTML_PATH}/${MACHINE}/results.html" |
michael@0 | 307 | else |
michael@0 | 308 | RESULT="0" |
michael@0 | 309 | fi |
michael@0 | 310 | if [ -f "${RESULTDIR}/bct/${MACHINE}/results.html" ] ; then |
michael@0 | 311 | BCB_RESULT="${HTML_PATH}/bct/${MACHINE}/results.html" |
michael@0 | 312 | else |
michael@0 | 313 | BCB_RESULT="0" |
michael@0 | 314 | fi |
michael@0 | 315 | |
michael@0 | 316 | if [ -f "${RESULTDIR}/${MACHINE}/output.log" ] ; then |
michael@0 | 317 | LOG="${HTML_PATH}/${MACHINE}/output.log" |
michael@0 | 318 | else |
michael@0 | 319 | LOG="0" |
michael@0 | 320 | fi |
michael@0 | 321 | if [ -f "${RESULTDIR}/bct/${MACHINE}/output.log" ] ; then |
michael@0 | 322 | BCB_LOG="${HTML_PATH}/bct/${MACHINE}/output.log" |
michael@0 | 323 | else |
michael@0 | 324 | BCB_LOG="0" |
michael@0 | 325 | fi |
michael@0 | 326 | } |
michael@0 | 327 | |
michael@0 | 328 | ################################# html_line() ######################### |
michael@0 | 329 | # local shell function, writes a line in the html table |
michael@0 | 330 | ######################################################################## |
michael@0 | 331 | html_line() |
michael@0 | 332 | { |
michael@0 | 333 | echo '<tr NOSAVE>' |
michael@0 | 334 | echo '<td NOSAVE>'$BUILD_SYS'</td>' |
michael@0 | 335 | echo '' |
michael@0 | 336 | if [ "$QA_SYS_OS" != "0" ] ; then |
michael@0 | 337 | echo '<td NOSAVE>'$QA_SYS_OS'</td>' |
michael@0 | 338 | else |
michael@0 | 339 | echo '<td></td>' |
michael@0 | 340 | fi |
michael@0 | 341 | echo '' |
michael@0 | 342 | if [ "$SYSNAME" != "0" ] ; then |
michael@0 | 343 | echo '<td>'$SYSNAME'</td>' |
michael@0 | 344 | else |
michael@0 | 345 | echo '<td></td>' |
michael@0 | 346 | fi |
michael@0 | 347 | #echo '<td>'$SYSNAME $TESTNUMBER $TESTDATE'</td>' |
michael@0 | 348 | echo '' |
michael@0 | 349 | # hopefully we never run more different tests on a tinderbox build... |
michael@0 | 350 | # on win some shells can not handle exit codes greater then 52 (64???) |
michael@0 | 351 | # so for very early exits the codes are set 50-45, for failures later |
michael@0 | 352 | # in the process the higher the number, the more failures |
michael@0 | 353 | if [ "$O_TBX" = "ON" -a "$TBX_EXIT" -gt 45 ] ; then |
michael@0 | 354 | TBX_EXIT=0 |
michael@0 | 355 | fi |
michael@0 | 356 | if [ "$1" = "failed" ] |
michael@0 | 357 | then |
michael@0 | 358 | TBX_EXIT=`expr $TBX_EXIT + 1` |
michael@0 | 359 | echo '<td BGCOLOR='$HTML_ERRORCOLOR' NOSAVE><b>'$HTML_ERRORMSG'</b></td>' |
michael@0 | 360 | elif [ "$1" = "passed" ] |
michael@0 | 361 | then |
michael@0 | 362 | echo '<td BGCOLOR='$HTML_PASSEDCOLOR' NOSAVE>'$HTML_PASSEDMSG'</td>' |
michael@0 | 363 | elif [ "$1" = "incomplete" ] |
michael@0 | 364 | then |
michael@0 | 365 | TBX_EXIT=`expr $TBX_EXIT + 1` |
michael@0 | 366 | echo '<td BGCOLOR='$HTML_INCOMPLETECOLOR' NOSAVE>'$HTML_INCOMPLETEMSG'</td>' |
michael@0 | 367 | else |
michael@0 | 368 | TBX_EXIT=`expr $TBX_EXIT + 1` |
michael@0 | 369 | echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 370 | fi |
michael@0 | 371 | if [ "$CURRENT_TABLE" != "BC" ] ; then |
michael@0 | 372 | if [ "$RESULT" = "0" ] ; then |
michael@0 | 373 | echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 374 | else |
michael@0 | 375 | echo '<td> <a href="'$RESULT'">result</a> </td>' |
michael@0 | 376 | fi |
michael@0 | 377 | if [ "$LOG" = "0" ] ; then |
michael@0 | 378 | echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 379 | else |
michael@0 | 380 | echo '<td> <a href="'$LOG'">log</a> </td>' |
michael@0 | 381 | fi |
michael@0 | 382 | if [ "$1" = "failed" ] ; then |
michael@0 | 383 | echo '<td> <a href="'${HREF_TMP_HTML_FILE}'#errorlist">error</a> </td>' |
michael@0 | 384 | else |
michael@0 | 385 | echo '<td></td>' |
michael@0 | 386 | fi |
michael@0 | 387 | else |
michael@0 | 388 | #<td><b><font size=+1>errors</font></b></td> |
michael@0 | 389 | #<td><b><font size=+1>P/F</font></b></td> |
michael@0 | 390 | #<td><b><font size=+1>P/F</font></b></td> |
michael@0 | 391 | |
michael@0 | 392 | #echo '<td><b><font size=+1>All Current</font></b></td>' |
michael@0 | 393 | #echo '<td><b><font size=+1>old dlls</font></b></td>' |
michael@0 | 394 | #echo '<td><b><font size=+1>old executables</font></b></td>' |
michael@0 | 395 | #if [ "$RESULT" != "0" -a "$LOG" != "0" ] ; then |
michael@0 | 396 | #echo '<td><a href="'$RESULT'">result</a>, <a href="'$LOG'">log</td>' |
michael@0 | 397 | #elif [ "$RESULT" = "0" -a "$LOG" != "0" ] ; then |
michael@0 | 398 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$LOG'">log</a></td>' |
michael@0 | 399 | #elif [ "$RESULT" != "0" -a "$LOG" = "0" ] ; then |
michael@0 | 400 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$RESULT'">result</a></td>' |
michael@0 | 401 | #else |
michael@0 | 402 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 403 | #fi |
michael@0 | 404 | #if [ "$BCB_RESULT" != "0" -a "$BCB_LOG" != "0" ] ; then |
michael@0 | 405 | #echo '<td><a href="'$BCB_RESULT'">result</a>, <a href="'$BCB_LOG'"> log</td>' |
michael@0 | 406 | #elif [ "$BCB_RESULT" = "0" -a "$BCB_LOG" != "0" ] ; then |
michael@0 | 407 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$BCB_LOG'">log</a></td>' |
michael@0 | 408 | #elif [ "$BCB_RESULT" != "0" -a "$BCB_LOG" = "0" ] ; then |
michael@0 | 409 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$BCB_RESULT'">result</a></td>' |
michael@0 | 410 | #else |
michael@0 | 411 | #echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 412 | #fi |
michael@0 | 413 | if [ "$BCB_RESULT" = "0" ] ; then |
michael@0 | 414 | echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 415 | else |
michael@0 | 416 | echo '<td> <a href="'$BCB_RESULT'">result</a> </td>' |
michael@0 | 417 | fi |
michael@0 | 418 | if [ "$BCB_LOG" = "0" ] ; then |
michael@0 | 419 | echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>' |
michael@0 | 420 | else |
michael@0 | 421 | echo '<td> <a href="'$BCB_LOG'">log</a> </td>' |
michael@0 | 422 | fi |
michael@0 | 423 | fi |
michael@0 | 424 | echo '<td>'$TESTDATE $TESTNUMBER'</td>' |
michael@0 | 425 | echo '</tr>' |
michael@0 | 426 | } |
michael@0 | 427 | |
michael@0 | 428 | ################################# qa_errorlist ######################### |
michael@0 | 429 | # local shell function, finds problems in the previously run QA |
michael@0 | 430 | # linux:the gnu grep, on Linux can output 10 lines above and 3 lines below |
michael@0 | 431 | # the errormessage |
michael@0 | 432 | ######################################################################## |
michael@0 | 433 | qa_errorlist() |
michael@0 | 434 | { |
michael@0 | 435 | grep "bgcolor=red" ${MACHINES_TO_CHECK}*/results.html | |
michael@0 | 436 | sed -e 's/.results.html:<TR><TD>/ /' -e 's/<[^>]*>/ /g' |
michael@0 | 437 | grep 'cache hits; .* cache misses, .* cache not reusable' \ |
michael@0 | 438 | ${MACHINES_TO_CHECK}*/output.log | |
michael@0 | 439 | grep strsclnt | |
michael@0 | 440 | grep -v '0 cache hits; 0 cache misses, 0 cache not reusable' | |
michael@0 | 441 | grep -v ' cache hits; 1 cache misses, 0 cache not reusable' |
michael@0 | 442 | for logfile in ${MACHINES_TO_CHECK}*/output.log; do |
michael@0 | 443 | grep -vi "write to SSL socket" $logfile | |
michael@0 | 444 | grep -vi "HDX PR_Read returned error" | |
michael@0 | 445 | grep -vi "no error" | |
michael@0 | 446 | grep -vi "12285" | |
michael@0 | 447 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP error |
michael@0 | 448 | #grep -vi "5938" | needed for -v option |
michael@0 | 449 | #grep -vi "HDX PR_Read hit EOF" | |
michael@0 | 450 | grep -vi "write to SSL socket" $logfile | |
michael@0 | 451 | grep -vi "peer cannot verify" | |
michael@0 | 452 | grep -vi "error" | |
michael@0 | 453 | grep -vi "fatal" | |
michael@0 | 454 | grep -vi "TCP Connection aborted" | |
michael@0 | 455 | grep -vi "TCP connection reset" | |
michael@0 | 456 | grep $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i failed |
michael@0 | 457 | done |
michael@0 | 458 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "segmentation violation" \ |
michael@0 | 459 | ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 460 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "memory fault" \ |
michael@0 | 461 | ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 462 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "bus error" \ |
michael@0 | 463 | ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 464 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "core dumped" \ |
michael@0 | 465 | ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 466 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP fatal \ |
michael@0 | 467 | ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 468 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i\ |
michael@0 | 469 | "PKCS12 decode not verified" ${MACHINES_TO_CHECK}*/output.log |
michael@0 | 470 | |
michael@0 | 471 | if [ -n "${MACHINES_TO_CHECK}" ] ; then |
michael@0 | 472 | find ${MACHINES_TO_CHECK}* -name core -print 2>/dev/null | |
michael@0 | 473 | grep -v bct |
michael@0 | 474 | else |
michael@0 | 475 | find . -name core -print 2>/dev/null | |
michael@0 | 476 | grep -v bct |
michael@0 | 477 | fi |
michael@0 | 478 | } |
michael@0 | 479 | |
michael@0 | 480 | tbx_missing_platforms () |
michael@0 | 481 | { |
michael@0 | 482 | QA_MISSING="QA report missing" |
michael@0 | 483 | MACHINE="0" |
michael@0 | 484 | |
michael@0 | 485 | if [ "$QA_OS_STRING" = "WINNT4.0" ] ; then |
michael@0 | 486 | QA_OS_STRING="Windows-NT-4.0" |
michael@0 | 487 | fi |
michael@0 | 488 | for BUILDPLATFORM in `grep $QA_OS_STRING $TESTSCRIPTDIR/platformlist.tbx` |
michael@0 | 489 | do |
michael@0 | 490 | if [ "$BUILDPLATFORM" != "$QA_OS_STRING" ] ; then |
michael@0 | 491 | Debug "BUILDPLATFORM = $BUILDPLATFORM QA_OS_STRING = $QA_OS_STRING" |
michael@0 | 492 | grep $BUILDPLATFORM ${MACHINES_TO_CHECK}*/results.html \ |
michael@0 | 493 | >/dev/null || { |
michael@0 | 494 | setQAsysvars |
michael@0 | 495 | html_line missing >>$TMP_HTML_FILE |
michael@0 | 496 | } |
michael@0 | 497 | fi |
michael@0 | 498 | done |
michael@0 | 499 | } |
michael@0 | 500 | |
michael@0 | 501 | ############################ platform _list ########################### |
michael@0 | 502 | # local shell function, generate pass/fail information for each Platform |
michael@0 | 503 | ######################################################################## |
michael@0 | 504 | platformlist() |
michael@0 | 505 | { |
michael@0 | 506 | grep Platform ${MACHINES_TO_CHECK}*/results.html | |
michael@0 | 507 | sed -e 's/.results.html:<H4>Platform: /---/' \ |
michael@0 | 508 | -e 's/<BR>//' >$TMPFILE |
michael@0 | 509 | # this is done a little complicated to avoid starting a subshell in |
michael@0 | 510 | # a while read that gets the input from a pipeline, and variables set |
michael@0 | 511 | #in or underneath this function get unset after done... |
michael@0 | 512 | for MB in `cat $TMPFILE` ; do |
michael@0 | 513 | MACHINE=`echo $MB | sed -e "s/---.*//"` |
michael@0 | 514 | BUILDPLATFORM=`echo $MB | sed -e "s/.*---//"` |
michael@0 | 515 | grep "${MACHINE}[^0-9]" $ERRORLIST >/dev/null |
michael@0 | 516 | ret=$? |
michael@0 | 517 | setQAsysvars |
michael@0 | 518 | if [ $ret -eq 0 ] |
michael@0 | 519 | then |
michael@0 | 520 | echo "Failed $MACHINE $BUILDPLATFORM" >>$RFILE |
michael@0 | 521 | html_line failed >>$TMP_HTML_FILE |
michael@0 | 522 | else |
michael@0 | 523 | echo "Passed $MACHINE $BUILDPLATFORM" >>$RFILE |
michael@0 | 524 | html_line passed >>$TMP_HTML_FILE |
michael@0 | 525 | fi |
michael@0 | 526 | done |
michael@0 | 527 | } |
michael@0 | 528 | |
michael@0 | 529 | ############################ missing_platforms ########################### |
michael@0 | 530 | # local shell function, finds out if we ran on all required platforms |
michael@0 | 531 | ######################################################################## |
michael@0 | 532 | missing_platforms() |
michael@0 | 533 | { |
michael@0 | 534 | QA_MISSING="QA report missing" |
michael@0 | 535 | MACHINE="0" |
michael@0 | 536 | SYSNAME="0" |
michael@0 | 537 | QA_SYS_OS="0" |
michael@0 | 538 | |
michael@0 | 539 | for BUILDPLATFORM in `cat $TESTSCRIPTDIR/platformlist` |
michael@0 | 540 | do |
michael@0 | 541 | grep $BUILDPLATFORM $PLATFORMLIST > /dev/null || { |
michael@0 | 542 | setQAsysvars |
michael@0 | 543 | html_line missing >>$TMP_HTML_FILE |
michael@0 | 544 | } |
michael@0 | 545 | done |
michael@0 | 546 | } |
michael@0 | 547 | |
michael@0 | 548 | ############################ incomplete_results ########################### |
michael@0 | 549 | # local shell function, finds out if all qa runs were complete |
michael@0 | 550 | ######################################################################## |
michael@0 | 551 | incomplete_results () |
michael@0 | 552 | { |
michael@0 | 553 | |
michael@0 | 554 | for w in `ls ${MACHINES_TO_CHECK}*/results.html` |
michael@0 | 555 | do |
michael@0 | 556 | grep bgcolor=red $w || { |
michael@0 | 557 | PASSED_LINES="" |
michael@0 | 558 | PASSED_LINES=`grep bgcolor=lightGreen $w | wc -l` |
michael@0 | 559 | if [ -n "$PASSED_LINES" -a "$PASSED_LINES" -lt "$TOTAL_TESTS" ] ; then |
michael@0 | 560 | BUILDPLATFORM=`grep Platform $w | sed -e 's/<H4>Platform:/ /' -e 's/<BR>//'` |
michael@0 | 561 | MACHINE=`echo $w | sed -e "s/.results.html//"` |
michael@0 | 562 | #MACHINE=`echo $w | sed -e "s/\.[0-9]*.results.html//"` |
michael@0 | 563 | setQAsysvars |
michael@0 | 564 | html_line incomplete >>$TMP_HTML_FILE |
michael@0 | 565 | elif [ "$PASSED_LINES" -gt "$TOTAL_TESTS" ] ; then |
michael@0 | 566 | echo "WARNING - more tests than expected on $w ($PASSED_LINES)" >>$WARNINGLIST |
michael@0 | 567 | fi |
michael@0 | 568 | } |
michael@0 | 569 | done |
michael@0 | 570 | } |
michael@0 | 571 | |
michael@0 | 572 | qa_stat_table() |
michael@0 | 573 | { |
michael@0 | 574 | echo ' ' |
michael@0 | 575 | echo '<br> ' |
michael@0 | 576 | echo '<center>' |
michael@0 | 577 | echo '<h1>' |
michael@0 | 578 | echo '<a NAME="'$1'"></a>'$1'</h1></center>' |
michael@0 | 579 | echo ' ' |
michael@0 | 580 | echo '<table BORDER WIDTH="100%" NOSAVE >' |
michael@0 | 581 | echo '<tr NOSAVE>' |
michael@0 | 582 | } |
michael@0 | 583 | |
michael@0 | 584 | ############################### psaperf ######################## |
michael@0 | 585 | # local shell function, copies results of the daily performance test |
michael@0 | 586 | # into a table in the QA report |
michael@0 | 587 | ######################################################################## |
michael@0 | 588 | rsaperf() |
michael@0 | 589 | { |
michael@0 | 590 | grep RSAPERF */output.log | grep -v "_DBG" > $PERFLIST |
michael@0 | 591 | |
michael@0 | 592 | qa_stat_table "Performance list" |
michael@0 | 593 | |
michael@0 | 594 | echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>' |
michael@0 | 595 | echo '<td><b><font size=+1>Systemname</font></b></td>' |
michael@0 | 596 | echo '<td><b><font size=+1># of iterations</font></b></td>' |
michael@0 | 597 | echo '<td><b><font size=+1>average for one op</font></b></td>' |
michael@0 | 598 | echo '<td><b><font size=+1>Total</font></b></td>' |
michael@0 | 599 | echo '<td><b><font size=+1>QA time / #</font></b></td>' |
michael@0 | 600 | echo '</tr>' |
michael@0 | 601 | cat $PERFLIST | |
michael@0 | 602 | while read MACHINE BUILDPLATFORM no_iter t1 t2 total total_unit t3 \ |
michael@0 | 603 | t4 t5 average average_unit |
michael@0 | 604 | do |
michael@0 | 605 | #caution subshell, variables local to this loop |
michael@0 | 606 | BUILD_SYS=`echo $BUILDPLATFORM | sed -e 's/\.OBJ//' \ |
michael@0 | 607 | -e 's/_DBG/ Debug/' \ |
michael@0 | 608 | -e 's/_OPT/ Optimized/' -e 's/_64/ 64bit/' -e 's/_glibc_PTH//' \ |
michael@0 | 609 | -e 's/_/ /'` |
michael@0 | 610 | TESTNUMBER=`echo $MACHINE | sed -e 's/[^\.]*\.//' -e 's/\/.*//'` |
michael@0 | 611 | MACHINE=`echo $MACHINE | sed -e 's/\..*//'` |
michael@0 | 612 | TESTDATE=`ls -ld ${MACHINE}.${TESTNUMBER} | awk '{ print $6, $7, $8 }'` |
michael@0 | 613 | echo '<tr>' |
michael@0 | 614 | echo '<td>'$BUILD_SYS'</td>' |
michael@0 | 615 | echo '' |
michael@0 | 616 | echo '<td>'$MACHINE'</td>' |
michael@0 | 617 | echo '' |
michael@0 | 618 | echo '<td>'$no_iter'</td>' |
michael@0 | 619 | echo '' |
michael@0 | 620 | echo '<td>'$average' '$average_unit'</td>' |
michael@0 | 621 | echo '' |
michael@0 | 622 | echo '<td>'$total' '$total_unit'</td>' |
michael@0 | 623 | echo '' |
michael@0 | 624 | echo '<td>'$TESTDATE $TESTNUMBER'</td>' |
michael@0 | 625 | echo '' |
michael@0 | 626 | echo '</tr>' |
michael@0 | 627 | done |
michael@0 | 628 | echo '</table>' |
michael@0 | 629 | } |
michael@0 | 630 | |
michael@0 | 631 | ############################### qa_stat_cleanup ######################## |
michael@0 | 632 | # local shell function, finishes html file, sets variables for global Exit |
michael@0 | 633 | ######################################################################## |
michael@0 | 634 | qa_stat_cleanup() |
michael@0 | 635 | { |
michael@0 | 636 | |
michael@0 | 637 | html_footer >>$TMP_HTML_FILE |
michael@0 | 638 | |
michael@0 | 639 | O_DEBUG=OFF |
michael@0 | 640 | |
michael@0 | 641 | EARLY_EXIT=FALSE |
michael@0 | 642 | cp $TMP_HTML_FILE $HTML_FILE |
michael@0 | 643 | FILENAME=$HTML_FILE #we might want to mail it... |
michael@0 | 644 | Exit |
michael@0 | 645 | } |
michael@0 | 646 | |
michael@0 | 647 | |
michael@0 | 648 | ############################### bc_test ######################## |
michael@0 | 649 | # local shell function, evaluates the results of the backward u |
michael@0 | 650 | # compatibility tests |
michael@0 | 651 | ######################################################################## |
michael@0 | 652 | bc_header() |
michael@0 | 653 | { |
michael@0 | 654 | CURRENT_TABLE="BC" #so html_line can determine which fields to write |
michael@0 | 655 | |
michael@0 | 656 | qa_stat_table "Backward Compatibility Test" |
michael@0 | 657 | echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>' |
michael@0 | 658 | echo '<td><b><font size=+1>QA-OS</font></b></td>' |
michael@0 | 659 | echo '<td><b><font size=+1>Systemname</font></b></td>' |
michael@0 | 660 | echo '<td><b><font size=+1>P/F</font></b></td>' |
michael@0 | 661 | #echo '<td><b><font size=+1>All Current</font></b></td>' |
michael@0 | 662 | #echo '<td><b><font size=+1>backward comp. test</font></b></td>' |
michael@0 | 663 | echo '<td><b><font size=+1>result</font></b></td>' |
michael@0 | 664 | echo '<td><b><font size=+1>output</font></b></td>' |
michael@0 | 665 | echo '<td><b><font size=+1>QA time / #</font></b></td>' |
michael@0 | 666 | echo '</tr>' |
michael@0 | 667 | |
michael@0 | 668 | } |
michael@0 | 669 | |
michael@0 | 670 | old_bc_test() |
michael@0 | 671 | { |
michael@0 | 672 | CURRENT_TABLE="BC" #so html_line can determine which fields to write |
michael@0 | 673 | |
michael@0 | 674 | qa_stat_table "Backward Compatibility Test" |
michael@0 | 675 | echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>' |
michael@0 | 676 | echo '<td><b><font size=+1>QA-OS</font></b></td>' |
michael@0 | 677 | echo '<td><b><font size=+1>Systemname</font></b></td>' |
michael@0 | 678 | echo '<td><b><font size=+1>P/F</font></b></td>' |
michael@0 | 679 | #echo '<td><b><font size=+1>All Current</font></b></td>' |
michael@0 | 680 | #echo '<td><b><font size=+1>backward comp. test</font></b></td>' |
michael@0 | 681 | echo '<td><b><font size=+1>result</font></b></td>' |
michael@0 | 682 | echo '<td><b><font size=+1>output</font></b></td>' |
michael@0 | 683 | echo '<td><b><font size=+1>QA time / #</font></b></td>' |
michael@0 | 684 | echo '</tr>' |
michael@0 | 685 | |
michael@0 | 686 | for w in `ls */results.html` |
michael@0 | 687 | do |
michael@0 | 688 | TMP_RESULT="`dirname $w`/results.tmp" |
michael@0 | 689 | TMP_BC_RESULT="`dirname bct/$w`/results.tmp" |
michael@0 | 690 | rm $TMP_RESULT $TMP_BC_RESULT 2>/dev/null |
michael@0 | 691 | cat $w | sed -e 's/<[^>]*>//g' -e 's/ /_/g' \ |
michael@0 | 692 | -e 's/signtool_-[vw]/signtool_-vw/' | |
michael@0 | 693 | grep '_[PF]a[si][sl]ed' >$TMP_RESULT |
michael@0 | 694 | cat bct/$w | sed -e 's/<[^>]*>//g' -e 's/ /_/g' \ |
michael@0 | 695 | -e 's/signtool_-[vw]/signtool_-vw/' | |
michael@0 | 696 | grep '_[PF]a[si][sl]ed' >$TMP_BC_RESULT |
michael@0 | 697 | diff $TMP_RESULT $TMP_BC_RESULT 2>>$BCMISSINGLIST | |
michael@0 | 698 | grep -v "Create_objsign_cert_.signtool_-G.*Passed" | |
michael@0 | 699 | grep -v "porting_Alice.s_email_cert" | |
michael@0 | 700 | grep -v "^[0-9,cad]*$" | grep -v "^---$" | grep -v "^---.$" | |
michael@0 | 701 | grep -v "Can.t_run_pk12util_tests_for_NSS_3.2" >/dev/null && ( |
michael@0 | 702 | echo "$w differs" >> $BCMISSINGLIST |
michael@0 | 703 | echo "=========================================" |
michael@0 | 704 | echo "diff $w bct/$w" |
michael@0 | 705 | echo "=========================================" |
michael@0 | 706 | diff $TMP_RESULT $TMP_BC_RESULT 2>&1 | |
michael@0 | 707 | grep -v "Create_objsign_cert_.signtool_-G.*Passed" | |
michael@0 | 708 | grep -v "porting_Alice.s_email_cert" | |
michael@0 | 709 | grep -v "Can.t_run_pk12util_tests_for_NSS_3.2" |
michael@0 | 710 | ) 2>&1 >>$BCERRORLIST |
michael@0 | 711 | |
michael@0 | 712 | #diff -b $w bct/$w 2>>$BCMISSINGLIST | |
michael@0 | 713 | #grep -v "Create objsign cert .signtool -G.*Passed" | |
michael@0 | 714 | #grep -v "Listing signed files in jar .signtool -v.*Passed" | |
michael@0 | 715 | #grep -v "Listing signed files in jar .signtool -w.*Passed" | |
michael@0 | 716 | #grep -v "backward compatibility" | |
michael@0 | 717 | #grep -v "Can.t run pk12util tests for NSS 3.2" | |
michael@0 | 718 | #grep -v "porting Alice.s email cert " | |
michael@0 | 719 | #grep -v "^---$" | grep -v "^[<> ] $" | |
michael@0 | 720 | #grep -v "^---.$" | grep -v "^[<> ] .$" | |
michael@0 | 721 | #grep -v '< </BODY></HTML>' | |
michael@0 | 722 | #grep -v "^[0-9,cad]*$" 2>>$BCMISSINGLIST >/dev/null && ( |
michael@0 | 723 | #echo "$w differs" >> $BCMISSINGLIST |
michael@0 | 724 | #echo "=========================================" |
michael@0 | 725 | #echo "diff $w bct/$w" |
michael@0 | 726 | #echo "=========================================" |
michael@0 | 727 | #diff -b $w bct/$w 2>&1 | |
michael@0 | 728 | #grep -v "Listing signed files in jar .signtool -v.*Passed" | |
michael@0 | 729 | #grep -v "Listing signed files in jar .signtool -w.*Passed" | |
michael@0 | 730 | #grep -v "backward compatibility" | |
michael@0 | 731 | #grep -v "Can.t run pk12util tests for NSS 3.2" | |
michael@0 | 732 | #grep -v "porting Alice.s email cert " | |
michael@0 | 733 | #grep -v "^---$" | grep -v "^[<> ] $" | |
michael@0 | 734 | #grep -v "^---.$" | grep -v "^[<> ] .$" | |
michael@0 | 735 | #grep -v '< </BODY></HTML>' | |
michael@0 | 736 | #grep -v "^[0-9,cad]*$" \ |
michael@0 | 737 | #) 2>&1 >>$BCERRORLIST |
michael@0 | 738 | rm $TMP_RESULT $TMP_BC_RESULT 2>/dev/null |
michael@0 | 739 | done |
michael@0 | 740 | rm $ERRORLIST |
michael@0 | 741 | cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \ |
michael@0 | 742 | -e "s/.results.html.*/\/results.html/" | |
michael@0 | 743 | sort -u > $ERRORLIST |
michael@0 | 744 | |
michael@0 | 745 | platformlist |
michael@0 | 746 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 747 | |
michael@0 | 748 | head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/" |
michael@0 | 749 | } |
michael@0 | 750 | |
michael@0 | 751 | bc_test() |
michael@0 | 752 | { |
michael@0 | 753 | CURRENT_TABLE="BC" #so html_line can determine which fields to write |
michael@0 | 754 | |
michael@0 | 755 | qa_stat_table "Backward Compatibility Test" |
michael@0 | 756 | echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>' |
michael@0 | 757 | echo '<td><b><font size=+1>QA-OS</font></b></td>' |
michael@0 | 758 | echo '<td><b><font size=+1>Systemname</font></b></td>' |
michael@0 | 759 | echo '<td><b><font size=+1>P/F</font></b></td>' |
michael@0 | 760 | #echo '<td><b><font size=+1>All Current</font></b></td>' |
michael@0 | 761 | #echo '<td><b><font size=+1>backward comp. test</font></b></td>' |
michael@0 | 762 | echo '<td><b><font size=+1>result</font></b></td>' |
michael@0 | 763 | echo '<td><b><font size=+1>output</font></b></td>' |
michael@0 | 764 | echo '<td><b><font size=+1>QA time / #</font></b></td>' |
michael@0 | 765 | echo '</tr>' |
michael@0 | 766 | |
michael@0 | 767 | set -x |
michael@0 | 768 | for w in `ls */results.html` |
michael@0 | 769 | do |
michael@0 | 770 | BCT_DIR=`dirname "bct/$w"` |
michael@0 | 771 | BCT_RESULT="bct/$w" |
michael@0 | 772 | BCT_LOG="$BCT_DIR/output.log" |
michael@0 | 773 | grep "bgcolor=red" $BCT_RESULT | |
michael@0 | 774 | sed -e 's/.results.html:<TR><TD>/ /' -e 's/<[^>]*>/ /g' |
michael@0 | 775 | grep 'cache hits; .* cache misses, .* cache not reusable' \ |
michael@0 | 776 | $BCT_LOG | |
michael@0 | 777 | grep -v selfserv | |
michael@0 | 778 | grep -v '0 cache hits; 1 cache misses, 0 cache not reusable' | |
michael@0 | 779 | grep -v '0 cache hits; 0 cache misses, 0 cache not reusable' | |
michael@0 | 780 | grep -v ' cache hits; 1 cache misses, 0 cache not reusable' |
michael@0 | 781 | grep -vi "write to SSL socket" $BCT_LOG | |
michael@0 | 782 | grep -vi "HDX PR_Read returned error" | |
michael@0 | 783 | grep -vi "no error" | |
michael@0 | 784 | grep -vi "12285" | |
michael@0 | 785 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP error |
michael@0 | 786 | grep -vi "write to SSL socket" $BCT_LOG | |
michael@0 | 787 | grep -vi "peer cannot verify" | |
michael@0 | 788 | grep -vi "TCP Connection aborted" | |
michael@0 | 789 | grep -vi "error" | |
michael@0 | 790 | grep -vi "fatal" | |
michael@0 | 791 | grep -vi "TCP connection reset" | |
michael@0 | 792 | grep $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i failed $BCT_LOG |
michael@0 | 793 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "segmentation violation" $BCT_LOG |
michael@0 | 794 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "memory fault" $BCT_LOG |
michael@0 | 795 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "bus error" $BCT_LOG |
michael@0 | 796 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "core dumped" $BCT_LOG |
michael@0 | 797 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP fatal $BCT_LOG |
michael@0 | 798 | grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i "PKCS12 decode not verified" $BCT_LOG |
michael@0 | 799 | find ${BTC_DIR} -name core -print |
michael@0 | 800 | |
michael@0 | 801 | done 2>&1 >>$BCERRORLIST |
michael@0 | 802 | rm $ERRORLIST |
michael@0 | 803 | cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \ |
michael@0 | 804 | -e "s/.results.html.*/\/results.html/" | |
michael@0 | 805 | sort -u > $ERRORLIST |
michael@0 | 806 | |
michael@0 | 807 | platformlist |
michael@0 | 808 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 809 | |
michael@0 | 810 | head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/" |
michael@0 | 811 | } |
michael@0 | 812 | |
michael@0 | 813 | |
michael@0 | 814 | ############################### bc_test ######################## |
michael@0 | 815 | # local shell function, evaluates the results of the backward u |
michael@0 | 816 | # compatibility tests |
michael@0 | 817 | # move the whole function to old to tests a new solution |
michael@0 | 818 | ######################################################################## |
michael@0 | 819 | bc_test_old() |
michael@0 | 820 | { |
michael@0 | 821 | CURRENT_TABLE="BC" #so html_line can determine which fields to write |
michael@0 | 822 | |
michael@0 | 823 | qa_stat_table "Backward Compatibility Test" |
michael@0 | 824 | echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>' |
michael@0 | 825 | echo '<td><b><font size=+1>QA-OS</font></b></td>' |
michael@0 | 826 | echo '<td><b><font size=+1>Systemname</font></b></td>' |
michael@0 | 827 | echo '<td><b><font size=+1>P/F</font></b></td>' |
michael@0 | 828 | #echo '<td><b><font size=+1>All Current</font></b></td>' |
michael@0 | 829 | #echo '<td><b><font size=+1>backward comp. test</font></b></td>' |
michael@0 | 830 | echo '<td><b><font size=+1>result</font></b></td>' |
michael@0 | 831 | echo '<td><b><font size=+1>output</font></b></td>' |
michael@0 | 832 | echo '<td><b><font size=+1>QA time / #</font></b></td>' |
michael@0 | 833 | echo '</tr>' |
michael@0 | 834 | |
michael@0 | 835 | for w in `ls */results.html` |
michael@0 | 836 | do |
michael@0 | 837 | diff -b $w bct/$w 2>>$BCMISSINGLIST | |
michael@0 | 838 | grep -v "Create objsign cert .signtool -G.*Passed" | |
michael@0 | 839 | grep -v "Listing signed files in jar .signtool -v.*Passed" | |
michael@0 | 840 | grep -v "Listing signed files in jar .signtool -w.*Passed" | |
michael@0 | 841 | grep -v "backward compatibility" | |
michael@0 | 842 | grep -v "Can.t run pk12util tests for NSS 3.2" | |
michael@0 | 843 | grep -v "porting Alice.s email cert " | |
michael@0 | 844 | grep -v "^---$" | grep -v "^[<> ] $" | |
michael@0 | 845 | grep -v "^---.$" | grep -v "^[<> ] .$" | |
michael@0 | 846 | grep -v '< </BODY></HTML>' | |
michael@0 | 847 | grep -v "^[0-9,cad]*$" 2>>$BCMISSINGLIST >/dev/null && ( |
michael@0 | 848 | echo "$w differs" >> $BCMISSINGLIST |
michael@0 | 849 | echo "=========================================" |
michael@0 | 850 | echo "diff $w bct/$w" |
michael@0 | 851 | echo "=========================================" |
michael@0 | 852 | diff -b $w bct/$w 2>&1 | |
michael@0 | 853 | grep -v "Listing signed files in jar .signtool -v.*Passed" | |
michael@0 | 854 | grep -v "Listing signed files in jar .signtool -w.*Passed" | |
michael@0 | 855 | grep -v "backward compatibility" | |
michael@0 | 856 | grep -v "Can.t run pk12util tests for NSS 3.2" | |
michael@0 | 857 | grep -v "porting Alice.s email cert " | |
michael@0 | 858 | grep -v "^---$" | grep -v "^[<> ] $" | |
michael@0 | 859 | grep -v "^---.$" | grep -v "^[<> ] .$" | |
michael@0 | 860 | grep -v '< </BODY></HTML>' | |
michael@0 | 861 | grep -v "^[0-9,cad]*$" \ |
michael@0 | 862 | ) 2>&1 >>$BCERRORLIST |
michael@0 | 863 | done |
michael@0 | 864 | rm $ERRORLIST |
michael@0 | 865 | cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \ |
michael@0 | 866 | -e "s/.results.html.*/\/results.html/" | |
michael@0 | 867 | sort -u > $ERRORLIST |
michael@0 | 868 | |
michael@0 | 869 | platformlist |
michael@0 | 870 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 871 | |
michael@0 | 872 | head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/" |
michael@0 | 873 | |
michael@0 | 874 | } |
michael@0 | 875 | |
michael@0 | 876 | ############################### tbx_main ######################## |
michael@0 | 877 | # local shell function, tinderbox variation of the qa status script |
michael@0 | 878 | ######################################################################## |
michael@0 | 879 | tbx_main() |
michael@0 | 880 | { |
michael@0 | 881 | TBX_EXIT=47 |
michael@0 | 882 | qa_stat_get_sysinfo # find out the OS we are running and all required tests |
michael@0 | 883 | # on this OS |
michael@0 | 884 | |
michael@0 | 885 | MACHINES_TO_CHECK=$HOST #`uname -n` only search the local tests for errors |
michael@0 | 886 | qa_errorlist > $ERRORLIST # |
michael@0 | 887 | platformlist |
michael@0 | 888 | #tbx_missing_platforms #temp. taken out until we find a better way to |
michael@0 | 889 | #determine if all necessary QA ran - right now we run different |
michael@0 | 890 | #tinderboxes on one machine |
michael@0 | 891 | incomplete_results |
michael@0 | 892 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 893 | echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE |
michael@0 | 894 | cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE |
michael@0 | 895 | |
michael@0 | 896 | } |
michael@0 | 897 | |
michael@0 | 898 | ############################### qa_stat_main ######################## |
michael@0 | 899 | # local shell function, main flow of the qa status script |
michael@0 | 900 | ######################################################################## |
michael@0 | 901 | qa_stat_main() |
michael@0 | 902 | { |
michael@0 | 903 | find_qa_systems 2>/dev/null |
michael@0 | 904 | MACHINES_TO_CHECK="" # check all founf qa runs |
michael@0 | 905 | qa_errorlist > $ERRORLIST |
michael@0 | 906 | platformlist |
michael@0 | 907 | missing_platforms |
michael@0 | 908 | incomplete_results |
michael@0 | 909 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 910 | echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE |
michael@0 | 911 | cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE |
michael@0 | 912 | cat $WARNINGLIST 2>/dev/null | sed -e "s/^/<br>/" >>$TMP_HTML_FILE 2>/dev/null |
michael@0 | 913 | rsaperf >>$TMP_HTML_FILE |
michael@0 | 914 | bc_header >>$TMP_HTML_FILE |
michael@0 | 915 | MACHINES_TO_CHECK="bct/" |
michael@0 | 916 | TOTAL_TESTS=$BCT_TOTAL_TESTS |
michael@0 | 917 | BEFORE_CONTEXT_GREP="" #WORKAROUND - errors in one outputlog within the first |
michael@0 | 918 | AFTER_CONTEXT_GREP="" # or last lines will show up in the next/previos file |
michael@0 | 919 | qa_errorlist > $ERRORLIST |
michael@0 | 920 | platformlist |
michael@0 | 921 | missing_platforms |
michael@0 | 922 | incomplete_results |
michael@0 | 923 | echo '</table>' >>$TMP_HTML_FILE |
michael@0 | 924 | echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE |
michael@0 | 925 | cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE |
michael@0 | 926 | cat $WARNINGLIST 2>/dev/null | sed -e "s/^/<br>/" >>$TMP_HTML_FILE 2>/dev/null |
michael@0 | 927 | #bc_test >>$TMP_HTML_FILE |
michael@0 | 928 | } |
michael@0 | 929 | |
michael@0 | 930 | CURRENT_TABLE="Standard" |
michael@0 | 931 | qa_stat_init |
michael@0 | 932 | |
michael@0 | 933 | if [ "$O_TBX" = "ON" -o "$O_LOCAL" = "ON" ] ; then |
michael@0 | 934 | tbx_main |
michael@0 | 935 | else |
michael@0 | 936 | qa_stat_main |
michael@0 | 937 | fi |
michael@0 | 938 | |
michael@0 | 939 | qa_stat_cleanup |