2
########################################################################
4
# /u/sonmi/bin/qa_stat - /u/svbld/bin/init/nss/qa_stat
6
# this script is supposed to automatically run QA for NSS on all required
11
# nssversion (supported: 30b, 31, tip)
12
# builddate (default - today)
16
# -y answer all questions with y - use at your own risk...ignores warnings
17
# -s silent (only usefull with -y)
18
# -h, -? - you guessed right - displays this text
20
# -f <filename> - write the (error)output to filename
21
# -m <mailinglist> - send filename to mailinglist (csl) only useful
23
# -cron equivalient to -y -s -d -f $RESULTDIR/$HOST.qa_stat
25
########################################################################
29
TBX_EXIT=49 # in case we are running on a tinderbox build, any
30
# early exit needs to return an error
31
if [ -z "$O_TBX" -o "$O_TBX" = "OFF" ] ; then
32
if [ -z "$O_LOCAL" -o "$O_LOCAL" = "OFF" ] ; then
36
Debug "Sourced header O_TBX=$O_TBX O_LOCAL=$O_LOCAL"
40
URL="cindercone.red.iplanet.com"
44
HTML_ERRORCOLOR=\"#FF0000\"
47
HTML_MISSINGCOLOR=\"#FFFFCC\"
48
HTML_MISSINGMSG=Missing
50
HTML_INCOMPLETECOLOR=$HTML_MISSINGCOLOR
51
HTML_INCOMPLETEMSG=Incomplete
53
HTML_PASSEDCOLOR=\"#66FF99\"
56
# this file is used to deal with hanging rsh - a new shell is started
57
# for each rsh, and a function is called after it is finished - they
58
# communicate with this file
62
TMPFILES="$TMPFILES $WARNINGLIST $RSH_FILE "
63
RSH_WAIT_TIME=80 #maximum time allowed for the 2 rsh to finish...
67
#TOTAL_TESTS=123 #3.3.2
68
BCT_TOTAL_TESTS=122 #3.2.2
71
Debug "NTDIST $NTDIST"
72
Debug "UXDIST $UXDIST"
73
Debug "TESTSCRIPTDIR $TESTSCRIPTDIR"
74
Debug "RESULTDIR $RESULTDIR"
76
############################### watch_rsh ##############################
77
# local shell function, deals with a hanging rsh (kills it...)
78
# this function is started as a backgroundprocess before the rsh is started,
79
# and writes info to the RSH_FILE, after the rsh is finished it writes finish
80
# info to the same file (this time called as a function, forground).
81
# the backgroundprocess stays around for RSH_WAIT_TIME, if then the finish
82
# information is not there attempts to kill the rsh
84
# watch_rsh start qa_computername &
85
# watch_rsh stop qa_computername
87
########################################################################
92
echo "$2 started" >>$RSH_FILE
94
O_ALWAYS_YES=ON # may modify global flags because this is a
95
# forked off bg process - kill_by_name otherwise
96
# will ask the user if it really should be killed
97
grep "$2 finished" $RSH_FILE >/dev/null || kill_by_name "rsh $2"
101
echo "$2 finished" >>$RSH_FILE
106
############################### find_qa_systems ########################
107
# local shell function, tries to determine the QA operating system
108
# works remotely, and for Windows machines
109
########################################################################
112
for QA_SYS in `ls $RESULTDIR | grep '\.1$' | sed -e "s/\..*//" | sort -u`
120
grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa >/dev/null && NO_RSH=TRUE
122
if [ "$NO_RSH" = "TRUE" ]
125
QA_OS=`grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \
126
-e "s/.*-OS-LINE: /${QA_SYS}/"`
127
QA_OS_STRING=`echo $QA_OS | sed -e "s/^[_ ]//" -e "s/ /_/g"`
128
echo $QA_OS_STRING >>$PLATFORMLIST
129
if [ "$O_SILENT" != ON ] ; then
133
#grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \
134
#-e "s/.*-OS-LINE: /${QA_SYS}_/" >>$PLATFORMLIST
135
#if [ "$O_SILENT" != ON ] ; then
136
#grep OS-LINE ${RESULTDIR}/${QA_SYS}.nssqa | sort -u | sed \
137
#-e "s/.*-OS-LINE:/${QA_SYS}/"
141
watch_rsh start $REM_SYSNAME &
142
qa_stat_get_sysinfo $QA_SYS
143
watch_rsh stop $REM_SYSNAME
144
echo $QA_OS_STRING >>$PLATFORMLIST
145
# use later for missing list
151
################################### qa_stat_init ##########################
152
# local shell function, sets the name of the resultfile to:
153
# <filename> if option -f <filename>
154
# $RESULTDIR/result if write permission
155
# (mozilla/tests_results/security/result)
156
# $HOME/resultNSS${NSSVER}-${BUILDDATE} if no write permission in $RESULTDIR
157
########################################################################
160
if [ $O_FILE = ON -a $O_CRON = OFF ] # if -f was specified write there
164
RFILE=${RESULTDIR}/result.$$
165
if [ ! -w $RESULTDIR ]
167
RFILE=$HOME/resultNSS${NSSVER}-${BUILDDATE}.$$
168
Debug "Using alternate resultfile $RFILE"
169
#elif [ $O_CRON = ON ]
171
##find ${RESULTDIR} -exec chmod a+rw {} \; #FIXME - umask
172
##doesn't seem to work - this is a tmp workaround
175
if [ ! -x $RESULTDIR -o ! -r $RESULTDIR -o ! -w $RESULTDIR ]
177
glob_usage "$RESULTDIR does not have the right permissions `ls -l $RESULTDIR`"
183
glob_usage "$RESULTDIR does not exist"
188
PLATFORMLIST=${RFILE}.P
190
TMP_HTML_FILE=${RFILE}.html
191
HTML_FILE=${RESULTDIR}/result.html
192
WARNINGLIST=${RFILE}.W
193
BCMISSINGLIST=${RFILE}.BCM
194
BCERRORLIST=${RFILE}.BCE
198
TMPFILES="$TMPFILES $TMPFILE"
199
TMPFILES="$TMPFILES $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \
200
$BCMISSINGLIST $BCERRORLIST $ML_FILE" #FIXME uncomment
202
FILENAME=$RFILE #we might want to mail it...later switch to html file
205
rm $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \
206
$BCMISSINGLIST $BCERRORLIST $TMP_HTML_FILE 2>/dev/null
207
touch $ERRORLIST $PLATFORMLIST $PERFLIST $WARNINGLIST \
208
$BCMISSINGLIST $BCERRORLIST $TMP_HTML_FILE 2>/dev/null
210
if [ $O_WIN = "ON" -a "$O_TBX" = "ON" ] ; then
211
HTML_PATH="http://${URL}${UX_D0}/nss${NSSVER}/tinderbox/tests_results/security/`basename $RESULTDIR`"
213
HTML_PATH="http://${URL}${RESULTDIR}"
215
HREF_TMP_HTML_FILE="${HTML_PATH}/`basename $HTML_FILE`"
217
write_qa_header_html >$TMP_HTML_FILE
220
################################# html_footer #########################
221
# local shell function, writes end of the html body
222
#######################################################################
223
write_qa_header_html()
225
echo 'Subject: QA Report ' $NSSVER $BUILDDATE '
226
From: sonmi@iplanet.com
227
Reply-To: sonmi@iplanet.com
228
Content-Type: text/html; charset=us-ascii
229
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
232
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
233
<meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; U; SunOS 5.8 sun4u) [N
241
<a href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=NSS">Tinderbox</a
243
<a href="http://cindercone.red.iplanet.com/share/builds/mccrel3/nss/nsstip/tinderbox/tests_results/security/">Tinderbox QA result</a><br>
244
<a href="ftp://ftp.mozilla.org/pub/security/nss/daily_qa">Mozilla Daily NSS QA result</a></h2>
251
<a NAME="Top"></a><b><font size=+2>QA Results</font></b></h1></center>
254
<table BORDER WIDTH="100%" NOSAVE >
256
<td> <b><font size=+1>Build-OS and version</font></b></td>
257
<td><b><font size=+1>QA-OS</font></b></td>
258
<td><b><font size=+1>Systemname</font></b></td>
259
<td><b><font size=+1>P/F</font></b></td>
260
<td><b><font size=+1>result</font></b></td>
261
<td><b><font size=+1>output</font></b></td>
262
<td><b><font size=+1>errors</font></b></td>
263
<td><b><font size=+1>QA time / #</font></b></td>
268
################################# html_footer #########################
269
# local shell function, writes end of the html body
270
#######################################################################
277
################################# setQAsysvars #########################
278
# local shell function, sets system specific variables
279
########################################################################
282
if [ "$MACHINE" != "0" ]
284
MACHINE=`echo $MACHINE | sed -e 's/^bct.//g'`
285
TESTDATE=`ls -ld $MACHINE | awk '{ print $6, $7, $8 }'`
286
TESTNUMBER=`echo $MACHINE | sed -e 's/.*\.//'`
287
SYSNAME=`echo $MACHINE | sed -e 's/\..*//'`
288
Debug "SYSNAME= $SYSNAME"
290
if [ "$O_TBX" = "ON" -o "$O_LOCAL" = "ON" ] ; then
293
QA_SYS_OS=`grep $SYSNAME $PLATFORMLIST |
295
sort | uniq | sed -e "s/$SYSNAME//" \
296
-e "s/^_//" | sort | uniq`
298
Debug "QA_SYS_OS= $QA_SYS_OS"
300
BUILD_SYS=`echo $BUILDPLATFORM | sed -e 's/\.OBJ//' -e 's/_DBG/ Debug/' \
301
-e 's/_OPT/ Optimized/' -e 's/_64/ 64bit/' -e 's/_glibc_PTH//' \
303
Debug "BUILD_SYS=$BUILD_SYS"
304
if [ -f "${RESULTDIR}/${MACHINE}/results.html" ] ; then
305
RESULT="${HTML_PATH}/${MACHINE}/results.html"
309
if [ -f "${RESULTDIR}/bct/${MACHINE}/results.html" ] ; then
310
BCB_RESULT="${HTML_PATH}/bct/${MACHINE}/results.html"
315
if [ -f "${RESULTDIR}/${MACHINE}/output.log" ] ; then
316
LOG="${HTML_PATH}/${MACHINE}/output.log"
320
if [ -f "${RESULTDIR}/bct/${MACHINE}/output.log" ] ; then
321
BCB_LOG="${HTML_PATH}/bct/${MACHINE}/output.log"
327
################################# html_line() #########################
328
# local shell function, writes a line in the html table
329
########################################################################
333
echo '<td NOSAVE>'$BUILD_SYS'</td>'
335
if [ "$QA_SYS_OS" != "0" ] ; then
336
echo '<td NOSAVE>'$QA_SYS_OS'</td>'
341
if [ "$SYSNAME" != "0" ] ; then
342
echo '<td>'$SYSNAME'</td>'
346
#echo '<td>'$SYSNAME $TESTNUMBER $TESTDATE'</td>'
348
# hopefully we never run more different tests on a tinderbox build...
349
# on win some shells can not handle exit codes greater then 52 (64???)
350
# so for very early exits the codes are set 50-45, for failures later
351
# in the process the higher the number, the more failures
352
if [ "$O_TBX" = "ON" -a "$TBX_EXIT" -gt 45 ] ; then
355
if [ "$1" = "failed" ]
357
TBX_EXIT=`expr $TBX_EXIT + 1`
358
echo '<td BGCOLOR='$HTML_ERRORCOLOR' NOSAVE><b>'$HTML_ERRORMSG'</b></td>'
359
elif [ "$1" = "passed" ]
361
echo '<td BGCOLOR='$HTML_PASSEDCOLOR' NOSAVE>'$HTML_PASSEDMSG'</td>'
362
elif [ "$1" = "incomplete" ]
364
TBX_EXIT=`expr $TBX_EXIT + 1`
365
echo '<td BGCOLOR='$HTML_INCOMPLETECOLOR' NOSAVE>'$HTML_INCOMPLETEMSG'</td>'
367
TBX_EXIT=`expr $TBX_EXIT + 1`
368
echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
370
if [ "$CURRENT_TABLE" != "BC" ] ; then
371
if [ "$RESULT" = "0" ] ; then
372
echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
374
echo '<td> <a href="'$RESULT'">result</a> </td>'
376
if [ "$LOG" = "0" ] ; then
377
echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
379
echo '<td> <a href="'$LOG'">log</a> </td>'
381
if [ "$1" = "failed" ] ; then
382
echo '<td> <a href="'${HREF_TMP_HTML_FILE}'#errorlist">error</a> </td>'
387
#<td><b><font size=+1>errors</font></b></td>
388
#<td><b><font size=+1>P/F</font></b></td>
389
#<td><b><font size=+1>P/F</font></b></td>
391
#echo '<td><b><font size=+1>All Current</font></b></td>'
392
#echo '<td><b><font size=+1>old dlls</font></b></td>'
393
#echo '<td><b><font size=+1>old executables</font></b></td>'
394
#if [ "$RESULT" != "0" -a "$LOG" != "0" ] ; then
395
#echo '<td><a href="'$RESULT'">result</a>, <a href="'$LOG'">log</td>'
396
#elif [ "$RESULT" = "0" -a "$LOG" != "0" ] ; then
397
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$LOG'">log</a></td>'
398
#elif [ "$RESULT" != "0" -a "$LOG" = "0" ] ; then
399
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$RESULT'">result</a></td>'
401
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
403
#if [ "$BCB_RESULT" != "0" -a "$BCB_LOG" != "0" ] ; then
404
#echo '<td><a href="'$BCB_RESULT'">result</a>, <a href="'$BCB_LOG'"> log</td>'
405
#elif [ "$BCB_RESULT" = "0" -a "$BCB_LOG" != "0" ] ; then
406
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$BCB_LOG'">log</a></td>'
407
#elif [ "$BCB_RESULT" != "0" -a "$BCB_LOG" = "0" ] ; then
408
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE><a href="'$BCB_RESULT'">result</a></td>'
410
#echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
412
if [ "$BCB_RESULT" = "0" ] ; then
413
echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
415
echo '<td> <a href="'$BCB_RESULT'">result</a> </td>'
417
if [ "$BCB_LOG" = "0" ] ; then
418
echo '<td BGCOLOR='$HTML_MISSINGCOLOR' NOSAVE>'$HTML_MISSINGMSG'</td>'
420
echo '<td> <a href="'$BCB_LOG'">log</a> </td>'
423
echo '<td>'$TESTDATE $TESTNUMBER'</td>'
427
################################# qa_errorlist #########################
428
# local shell function, finds problems in the previously run QA
429
# linux:the gnu grep, on Linux can output 10 lines above and 3 lines below
431
########################################################################
434
grep "bgcolor=red" ${MACHINES_TO_CHECK}*/results.html |
435
sed -e 's/.results.html:<TR><TD>/ /' -e 's/<[^>]*>/ /g'
436
grep 'cache hits; .* cache misses, .* cache not reusable' \
437
${MACHINES_TO_CHECK}*/output.log |
439
grep -v '0 cache hits; 0 cache misses, 0 cache not reusable' |
440
grep -v ' cache hits; 1 cache misses, 0 cache not reusable'
441
for logfile in ${MACHINES_TO_CHECK}*/output.log; do
442
grep -vi "write to SSL socket" $logfile |
443
grep -vi "HDX PR_Read returned error" |
444
grep -vi "no error" |
446
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP error
447
#grep -vi "5938" | needed for -v option
448
#grep -vi "HDX PR_Read hit EOF" |
449
grep -vi "write to SSL socket" $logfile |
450
grep -vi "peer cannot verify" |
453
grep -vi "TCP Connection aborted" |
454
grep -vi "TCP connection reset" |
455
grep $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i failed
457
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "segmentation violation" \
458
${MACHINES_TO_CHECK}*/output.log
459
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "memory fault" \
460
${MACHINES_TO_CHECK}*/output.log
461
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "bus error" \
462
${MACHINES_TO_CHECK}*/output.log
463
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "core dumped" \
464
${MACHINES_TO_CHECK}*/output.log
465
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP fatal \
466
${MACHINES_TO_CHECK}*/output.log
467
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i\
468
"PKCS12 decode not verified" ${MACHINES_TO_CHECK}*/output.log
470
if [ -n "${MACHINES_TO_CHECK}" ] ; then
471
find ${MACHINES_TO_CHECK}* -name core -print 2>/dev/null |
474
find . -name core -print 2>/dev/null |
479
tbx_missing_platforms ()
481
QA_MISSING="QA report missing"
484
if [ "$QA_OS_STRING" = "WINNT4.0" ] ; then
485
QA_OS_STRING="Windows-NT-4.0"
487
for BUILDPLATFORM in `grep $QA_OS_STRING $TESTSCRIPTDIR/platformlist.tbx`
489
if [ "$BUILDPLATFORM" != "$QA_OS_STRING" ] ; then
490
Debug "BUILDPLATFORM = $BUILDPLATFORM QA_OS_STRING = $QA_OS_STRING"
491
grep $BUILDPLATFORM ${MACHINES_TO_CHECK}*/results.html \
494
html_line missing >>$TMP_HTML_FILE
500
############################ platform _list ###########################
501
# local shell function, generate pass/fail information for each Platform
502
########################################################################
505
grep Platform ${MACHINES_TO_CHECK}*/results.html |
506
sed -e 's/.results.html:<H4>Platform: /---/' \
507
-e 's/<BR>//' >$TMPFILE
508
# this is done a little complicated to avoid starting a subshell in
509
# a while read that gets the input from a pipeline, and variables set
510
#in or underneath this function get unset after done...
511
for MB in `cat $TMPFILE` ; do
512
MACHINE=`echo $MB | sed -e "s/---.*//"`
513
BUILDPLATFORM=`echo $MB | sed -e "s/.*---//"`
514
grep "${MACHINE}[^0-9]" $ERRORLIST >/dev/null
519
echo "Failed $MACHINE $BUILDPLATFORM" >>$RFILE
520
html_line failed >>$TMP_HTML_FILE
522
echo "Passed $MACHINE $BUILDPLATFORM" >>$RFILE
523
html_line passed >>$TMP_HTML_FILE
528
############################ missing_platforms ###########################
529
# local shell function, finds out if we ran on all required platforms
530
########################################################################
533
QA_MISSING="QA report missing"
538
for BUILDPLATFORM in `cat $TESTSCRIPTDIR/platformlist`
540
grep $BUILDPLATFORM $PLATFORMLIST > /dev/null || {
542
html_line missing >>$TMP_HTML_FILE
547
############################ incomplete_results ###########################
548
# local shell function, finds out if all qa runs were complete
549
########################################################################
550
incomplete_results ()
553
for w in `ls ${MACHINES_TO_CHECK}*/results.html`
555
grep bgcolor=red $w || {
557
PASSED_LINES=`grep bgcolor=lightGreen $w | wc -l`
558
if [ -n "$PASSED_LINES" -a "$PASSED_LINES" -lt "$TOTAL_TESTS" ] ; then
559
BUILDPLATFORM=`grep Platform $w | sed -e 's/<H4>Platform:/ /' -e 's/<BR>//'`
560
MACHINE=`echo $w | sed -e "s/.results.html//"`
561
#MACHINE=`echo $w | sed -e "s/\.[0-9]*.results.html//"`
563
html_line incomplete >>$TMP_HTML_FILE
564
elif [ "$PASSED_LINES" -gt "$TOTAL_TESTS" ] ; then
565
echo "WARNING - more tests than expected on $w ($PASSED_LINES)" >>$WARNINGLIST
577
echo '<a NAME="'$1'"></a>'$1'</h1></center>'
579
echo '<table BORDER WIDTH="100%" NOSAVE >'
583
############################### psaperf ########################
584
# local shell function, copies results of the daily performance test
585
# into a table in the QA report
586
########################################################################
589
grep RSAPERF */output.log | grep -v "_DBG" > $PERFLIST
591
qa_stat_table "Performance list"
593
echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>'
594
echo '<td><b><font size=+1>Systemname</font></b></td>'
595
echo '<td><b><font size=+1># of iterations</font></b></td>'
596
echo '<td><b><font size=+1>average for one op</font></b></td>'
597
echo '<td><b><font size=+1>Total</font></b></td>'
598
echo '<td><b><font size=+1>QA time / #</font></b></td>'
601
while read MACHINE BUILDPLATFORM no_iter t1 t2 total total_unit t3 \
602
t4 t5 average average_unit
604
#caution subshell, variables local to this loop
605
BUILD_SYS=`echo $BUILDPLATFORM | sed -e 's/\.OBJ//' \
606
-e 's/_DBG/ Debug/' \
607
-e 's/_OPT/ Optimized/' -e 's/_64/ 64bit/' -e 's/_glibc_PTH//' \
609
TESTNUMBER=`echo $MACHINE | sed -e 's/[^\.]*\.//' -e 's/\/.*//'`
610
MACHINE=`echo $MACHINE | sed -e 's/\..*//'`
611
TESTDATE=`ls -ld ${MACHINE}.${TESTNUMBER} | awk '{ print $6, $7, $8 }'`
613
echo '<td>'$BUILD_SYS'</td>'
615
echo '<td>'$MACHINE'</td>'
617
echo '<td>'$no_iter'</td>'
619
echo '<td>'$average' '$average_unit'</td>'
621
echo '<td>'$total' '$total_unit'</td>'
623
echo '<td>'$TESTDATE $TESTNUMBER'</td>'
630
############################### qa_stat_cleanup ########################
631
# local shell function, finishes html file, sets variables for global Exit
632
########################################################################
636
html_footer >>$TMP_HTML_FILE
641
cp $TMP_HTML_FILE $HTML_FILE
642
FILENAME=$HTML_FILE #we might want to mail it...
647
############################### bc_test ########################
648
# local shell function, evaluates the results of the backward u
649
# compatibility tests
650
########################################################################
653
CURRENT_TABLE="BC" #so html_line can determine which fields to write
655
qa_stat_table "Backward Compatibility Test"
656
echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>'
657
echo '<td><b><font size=+1>QA-OS</font></b></td>'
658
echo '<td><b><font size=+1>Systemname</font></b></td>'
659
echo '<td><b><font size=+1>P/F</font></b></td>'
660
#echo '<td><b><font size=+1>All Current</font></b></td>'
661
#echo '<td><b><font size=+1>backward comp. test</font></b></td>'
662
echo '<td><b><font size=+1>result</font></b></td>'
663
echo '<td><b><font size=+1>output</font></b></td>'
664
echo '<td><b><font size=+1>QA time / #</font></b></td>'
671
CURRENT_TABLE="BC" #so html_line can determine which fields to write
673
qa_stat_table "Backward Compatibility Test"
674
echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>'
675
echo '<td><b><font size=+1>QA-OS</font></b></td>'
676
echo '<td><b><font size=+1>Systemname</font></b></td>'
677
echo '<td><b><font size=+1>P/F</font></b></td>'
678
#echo '<td><b><font size=+1>All Current</font></b></td>'
679
#echo '<td><b><font size=+1>backward comp. test</font></b></td>'
680
echo '<td><b><font size=+1>result</font></b></td>'
681
echo '<td><b><font size=+1>output</font></b></td>'
682
echo '<td><b><font size=+1>QA time / #</font></b></td>'
685
for w in `ls */results.html`
687
TMP_RESULT="`dirname $w`/results.tmp"
688
TMP_BC_RESULT="`dirname bct/$w`/results.tmp"
689
rm $TMP_RESULT $TMP_BC_RESULT 2>/dev/null
690
cat $w | sed -e 's/<[^>]*>//g' -e 's/ /_/g' \
691
-e 's/signtool_-[vw]/signtool_-vw/' |
692
grep '_[PF]a[si][sl]ed' >$TMP_RESULT
693
cat bct/$w | sed -e 's/<[^>]*>//g' -e 's/ /_/g' \
694
-e 's/signtool_-[vw]/signtool_-vw/' |
695
grep '_[PF]a[si][sl]ed' >$TMP_BC_RESULT
696
diff $TMP_RESULT $TMP_BC_RESULT 2>>$BCMISSINGLIST |
697
grep -v "Create_objsign_cert_.signtool_-G.*Passed" |
698
grep -v "porting_Alice.s_email_cert" |
699
grep -v "^[0-9,cad]*$" | grep -v "^---$" | grep -v "^---.$" |
700
grep -v "Can.t_run_pk12util_tests_for_NSS_3.2" >/dev/null && (
701
echo "$w differs" >> $BCMISSINGLIST
702
echo "========================================="
703
echo "diff $w bct/$w"
704
echo "========================================="
705
diff $TMP_RESULT $TMP_BC_RESULT 2>&1 |
706
grep -v "Create_objsign_cert_.signtool_-G.*Passed" |
707
grep -v "porting_Alice.s_email_cert" |
708
grep -v "Can.t_run_pk12util_tests_for_NSS_3.2"
709
) 2>&1 >>$BCERRORLIST
711
#diff -b $w bct/$w 2>>$BCMISSINGLIST |
712
#grep -v "Create objsign cert .signtool -G.*Passed" |
713
#grep -v "Listing signed files in jar .signtool -v.*Passed" |
714
#grep -v "Listing signed files in jar .signtool -w.*Passed" |
715
#grep -v "backward compatibility" |
716
#grep -v "Can.t run pk12util tests for NSS 3.2" |
717
#grep -v "porting Alice.s email cert " |
718
#grep -v "^---$" | grep -v "^[<> ] $" |
719
#grep -v "^---.$" | grep -v "^[<> ] .$" |
720
#grep -v '< </BODY></HTML>' |
721
#grep -v "^[0-9,cad]*$" 2>>$BCMISSINGLIST >/dev/null && (
722
#echo "$w differs" >> $BCMISSINGLIST
723
#echo "========================================="
724
#echo "diff $w bct/$w"
725
#echo "========================================="
726
#diff -b $w bct/$w 2>&1 |
727
#grep -v "Listing signed files in jar .signtool -v.*Passed" |
728
#grep -v "Listing signed files in jar .signtool -w.*Passed" |
729
#grep -v "backward compatibility" |
730
#grep -v "Can.t run pk12util tests for NSS 3.2" |
731
#grep -v "porting Alice.s email cert " |
732
#grep -v "^---$" | grep -v "^[<> ] $" |
733
#grep -v "^---.$" | grep -v "^[<> ] .$" |
734
#grep -v '< </BODY></HTML>' |
735
#grep -v "^[0-9,cad]*$" \
736
#) 2>&1 >>$BCERRORLIST
737
rm $TMP_RESULT $TMP_BC_RESULT 2>/dev/null
740
cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \
741
-e "s/.results.html.*/\/results.html/" |
745
echo '</table>' >>$TMP_HTML_FILE
747
head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/"
752
CURRENT_TABLE="BC" #so html_line can determine which fields to write
754
qa_stat_table "Backward Compatibility Test"
755
echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>'
756
echo '<td><b><font size=+1>QA-OS</font></b></td>'
757
echo '<td><b><font size=+1>Systemname</font></b></td>'
758
echo '<td><b><font size=+1>P/F</font></b></td>'
759
#echo '<td><b><font size=+1>All Current</font></b></td>'
760
#echo '<td><b><font size=+1>backward comp. test</font></b></td>'
761
echo '<td><b><font size=+1>result</font></b></td>'
762
echo '<td><b><font size=+1>output</font></b></td>'
763
echo '<td><b><font size=+1>QA time / #</font></b></td>'
767
for w in `ls */results.html`
769
BCT_DIR=`dirname "bct/$w"`
771
BCT_LOG="$BCT_DIR/output.log"
772
grep "bgcolor=red" $BCT_RESULT |
773
sed -e 's/.results.html:<TR><TD>/ /' -e 's/<[^>]*>/ /g'
774
grep 'cache hits; .* cache misses, .* cache not reusable' \
777
grep -v '0 cache hits; 1 cache misses, 0 cache not reusable' |
778
grep -v '0 cache hits; 0 cache misses, 0 cache not reusable' |
779
grep -v ' cache hits; 1 cache misses, 0 cache not reusable'
780
grep -vi "write to SSL socket" $BCT_LOG |
781
grep -vi "HDX PR_Read returned error" |
782
grep -vi "no error" |
784
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP error
785
grep -vi "write to SSL socket" $BCT_LOG |
786
grep -vi "peer cannot verify" |
787
grep -vi "TCP Connection aborted" |
790
grep -vi "TCP connection reset" |
791
grep $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i failed $BCT_LOG
792
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "segmentation violation" $BCT_LOG
793
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "memory fault" $BCT_LOG
794
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "bus error" $BCT_LOG
795
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP "core dumped" $BCT_LOG
796
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP fatal $BCT_LOG
797
grep -i $BEFORE_CONTEXT_GREP $AFTER_CONTEXT_GREP -i "PKCS12 decode not verified" $BCT_LOG
798
find ${BTC_DIR} -name core -print
800
done 2>&1 >>$BCERRORLIST
802
cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \
803
-e "s/.results.html.*/\/results.html/" |
807
echo '</table>' >>$TMP_HTML_FILE
809
head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/"
813
############################### bc_test ########################
814
# local shell function, evaluates the results of the backward u
815
# compatibility tests
816
# move the whole function to old to tests a new solution
817
########################################################################
820
CURRENT_TABLE="BC" #so html_line can determine which fields to write
822
qa_stat_table "Backward Compatibility Test"
823
echo '<td NOSAVE><b><font size=+1>Build-OS and version</font></b></td>'
824
echo '<td><b><font size=+1>QA-OS</font></b></td>'
825
echo '<td><b><font size=+1>Systemname</font></b></td>'
826
echo '<td><b><font size=+1>P/F</font></b></td>'
827
#echo '<td><b><font size=+1>All Current</font></b></td>'
828
#echo '<td><b><font size=+1>backward comp. test</font></b></td>'
829
echo '<td><b><font size=+1>result</font></b></td>'
830
echo '<td><b><font size=+1>output</font></b></td>'
831
echo '<td><b><font size=+1>QA time / #</font></b></td>'
834
for w in `ls */results.html`
836
diff -b $w bct/$w 2>>$BCMISSINGLIST |
837
grep -v "Create objsign cert .signtool -G.*Passed" |
838
grep -v "Listing signed files in jar .signtool -v.*Passed" |
839
grep -v "Listing signed files in jar .signtool -w.*Passed" |
840
grep -v "backward compatibility" |
841
grep -v "Can.t run pk12util tests for NSS 3.2" |
842
grep -v "porting Alice.s email cert " |
843
grep -v "^---$" | grep -v "^[<> ] $" |
844
grep -v "^---.$" | grep -v "^[<> ] .$" |
845
grep -v '< </BODY></HTML>' |
846
grep -v "^[0-9,cad]*$" 2>>$BCMISSINGLIST >/dev/null && (
847
echo "$w differs" >> $BCMISSINGLIST
848
echo "========================================="
849
echo "diff $w bct/$w"
850
echo "========================================="
851
diff -b $w bct/$w 2>&1 |
852
grep -v "Listing signed files in jar .signtool -v.*Passed" |
853
grep -v "Listing signed files in jar .signtool -w.*Passed" |
854
grep -v "backward compatibility" |
855
grep -v "Can.t run pk12util tests for NSS 3.2" |
856
grep -v "porting Alice.s email cert " |
857
grep -v "^---$" | grep -v "^[<> ] $" |
858
grep -v "^---.$" | grep -v "^[<> ] .$" |
859
grep -v '< </BODY></HTML>' |
860
grep -v "^[0-9,cad]*$" \
861
) 2>&1 >>$BCERRORLIST
864
cat $BCMISSINGLIST | sed -e "s/^diff: bc_...s.//" \
865
-e "s/.results.html.*/\/results.html/" |
869
echo '</table>' >>$TMP_HTML_FILE
871
head -200 $BCERRORLIST | sed -e 's/<[^>]*>//g' -e "s/^/<br>/"
875
############################### tbx_main ########################
876
# local shell function, tinderbox variation of the qa status script
877
########################################################################
881
qa_stat_get_sysinfo # find out the OS we are running and all required tests
884
MACHINES_TO_CHECK=$HOST #`uname -n` only search the local tests for errors
885
qa_errorlist > $ERRORLIST #
887
#tbx_missing_platforms #temp. taken out until we find a better way to
888
#determine if all necessary QA ran - right now we run different
889
#tinderboxes on one machine
891
echo '</table>' >>$TMP_HTML_FILE
892
echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE
893
cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE
897
############################### qa_stat_main ########################
898
# local shell function, main flow of the qa status script
899
########################################################################
902
find_qa_systems 2>/dev/null
903
MACHINES_TO_CHECK="" # check all founf qa runs
904
qa_errorlist > $ERRORLIST
908
echo '</table>' >>$TMP_HTML_FILE
909
echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE
910
cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE
911
cat $WARNINGLIST 2>/dev/null | sed -e "s/^/<br>/" >>$TMP_HTML_FILE 2>/dev/null
912
rsaperf >>$TMP_HTML_FILE
913
bc_header >>$TMP_HTML_FILE
914
MACHINES_TO_CHECK="bct/"
915
TOTAL_TESTS=$BCT_TOTAL_TESTS
916
BEFORE_CONTEXT_GREP="" #WORKAROUND - errors in one outputlog within the first
917
AFTER_CONTEXT_GREP="" # or last lines will show up in the next/previos file
918
qa_errorlist > $ERRORLIST
922
echo '</table>' >>$TMP_HTML_FILE
923
echo '<a NAME="errorlist"></a>' >> $TMP_HTML_FILE
924
cat $ERRORLIST | sed -e "s/^/<br>/" >>$TMP_HTML_FILE
925
cat $WARNINGLIST 2>/dev/null | sed -e "s/^/<br>/" >>$TMP_HTML_FILE 2>/dev/null
926
#bc_test >>$TMP_HTML_FILE
929
CURRENT_TABLE="Standard"
932
if [ "$O_TBX" = "ON" -o "$O_LOCAL" = "ON" ] ; then