Changeset 2182
- Timestamp:
- 09/09/09 18:27:19 (16 years ago)
- Location:
- issm/trunk/cron
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/nightlyrun.sh
r2180 r2182 160 160 161 161 #removed unused lines to deal with a smaller file 162 cat nightlylong.log | egrep ' difference: |NIGHTLYRUNTERMINATEDCORRECTLY' > nightly.log162 cat nightlylong.log | egrep 'ERROR|SUCCESS|FAILURE' > nightly.log 163 163 #rm nightlylong.log 164 164 -
issm/trunk/cron/report.sh
r2105 r2182 3 3 4 4 #Process log 5 cat nightly.log | grep 'package: macayeal' | grep -v "not supported yet" > macayeal.log 6 cat nightly.log | grep 'package: ice' | grep -v "not supported yet" > ice.log 7 cat nightly.log | grep 'package: cielo_serial' | grep -v "not supported yet" > cielo_serial.log 8 cat nightly.log | grep 'package: cielo_parallel'| grep -v "not supported yet" > cielo_parallel.log 9 cat nightly.log | grep 'NIGHTLYRUNTERMINATEDCORRECTLY' > check.log 10 cat nightly.log | grep 'ERROR' | grep -v "PETSC ERROR" > errors.log 11 cat nightly.log | grep 'SUCCESS' > success.log 12 cat errors.log success.log > tests.log 5 cat nightly.log | grep 'ERROR' | grep -v "PETSC ERROR" > errors.log 6 cat nightly.log | grep 'SUCCESS' > success.log 7 cat nightly.log | grep 'FAILURE' > failures.log 13 8 14 9 #create some variables … … 24 19 else 25 20 IS_RUN=1 26 fi27 if [ $(wc -l check.log | awk '{printf("%s",$1);}') -eq 0 ]28 then29 IS_END=030 else31 IS_END=132 21 fi 33 22 … … 76 65 <tr> 77 66 $(#print status 78 if [ $(echo $IS_INSTALL) =0 ];67 if [ $(echo $IS_INSTALL) -eq 0 ]; 79 68 then 80 69 #installation failed, end of report … … 83 72 echo "</tr>" 84 73 echo "</table>" 85 rm check.log errors.log success.log tests.log74 rm errors.log success.log 86 75 else 87 76 #installation successful. Did we go to the end? … … 94 83 echo "</tr>" 95 84 echo "</table>" 96 rm check.log errors.log success.log tests.log85 rm errors.log success.log failures.log 97 86 98 87 else 99 88 100 if [ $(echo $IS_END) -eq 0 ]; 101 then 102 echo "<td $TABLE_FONT>status: <span style=\"color:#FFA500\">stopped before the end</span></td>" 103 else 104 echo "<td $TABLE_FONT>status: <span style=\"color:#008000\">all test desks have been run</span></td>" 105 fi 89 echo "<td $TABLE_FONT>status: <span style=\"color:#008000\">all test desks have been run</span></td>" 106 90 echo "<td $TABLE_FONT>execution elapsed time: $ELAPSED_RUN</td>" 107 91 echo "</tr>" 108 92 echo "<tr>" 109 echo "<td $TABLE_FONT>number of errors: $(wc -l errors.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}'; rm errors.log)</td>"93 echo "<td $TABLE_FONT>number of errors: $(wc -l errors.log | awk '{printf("%s",$1);}')/$(wc -l nightly.log | awk '{printf("%s",$1);}'; rm errors.log)</td>" 110 94 echo "<td $TABLE_FONT> </td>" 111 95 echo "</tr>" 112 96 echo "<tr>" 113 echo "<td $TABLE_FONT>number of success: $(wc -l success.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}'; rm success.log tests.log)</td>"97 echo "<td $TABLE_FONT>number of success: $(wc -l success.log | awk '{printf("%s",$1);}')/$(wc -l nightly.log | awk '{printf("%s",$1);}'; rm success.log)</td>" 114 98 echo "<td $TABLE_FONT> </td>" 115 99 echo "</tr>" … … 118 102 #draw a line and clean up 119 103 echo "<br><hr width=\"900px\">" 120 rm check.log121 104 fi 122 105 fi) … … 135 118 then 136 119 cat << END > content.html 137 $(for package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do 120 <table $(echo $H2_STYLE)><tr><td $(echo $H2_FONT)>List of tests</td></tr></table> 121 <table $(echo $BODY_STYLE) cellspacing="-1"> 122 <tr> 123 <th $(echo $BODY_FONT)>Result</th> 124 <th $(echo $BODY_FONT)>Tolerance</th> 125 <th $(echo $BODY_FONT)>Test name</th> 126 <th $(echo $BODY_FONT)>Analysis type</th> 127 <th $(echo $BODY_FONT)>Sub type</th> 128 <th $(echo $BODY_FONT)>Qmu</th> 129 <th $(echo $BODY_FONT)>control</th> 130 <th $(echo $BODY_FONT)>Control fit</th> 131 <th $(echo $BODY_FONT)>Parallel</th> 132 </tr> 133 $( COUNTER=0 134 MAX=`wc -l nightly.log | awk '{printf("%s",$1);}'` 135 while [ $COUNTER -lt $MAX ]; do 136 let COUNTER=COUNTER+1 138 137 139 #enter title 140 if [ $package == "macayeal" ]; 141 then 142 echo "<table $H2_STYLE><tr><td $H2_FONT>Macayeal package</td></tr></table>" 138 echo "<tr>" 139 140 #see wether it is success or error (get color: red or green) 141 RESULT="$(cat nightly.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("%s\n",$2);}';)" 142 if [ "$RESULT" = "SUCCESS" ]; 143 then 144 color="bgcolor=#ddffdd"; 145 else 146 if [ "$RESULT" = "ERROR" ]; 147 then 148 color="bgcolor=#ffdddd"; 149 else 150 color="bgcolor=#ddddff"; 151 fi 143 152 fi 144 if [ $package == "ice" ]; 145 then 146 echo "<table $H2_STYLE><tr><td $H2_FONT>Ice package</td></tr></table>" 147 fi 148 if [ $package == "cielo_serial" ]; 149 then 150 echo "<table $H2_STYLE><tr><td $H2_FONT>Cielo serial package</td></tr></table>" 151 fi 152 if [ $package == "cielo_parallel" ]; 153 then 154 echo "<table $H2_STYLE><tr><td $H2_FONT>Cielo parallel package</td></tr></table>" 155 fi 153 FONT=$(echo "$BODY_FONT $color") 156 154 157 #check that at least one Test exists 158 if [ `wc -l $package.log | awk '{printf("%s",$1);}'` = "0" ]; then 155 #build html corresponding line 156 cat nightly.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk -v FONT="$FONT" ' 157 /line'$COUNTER'o/ { printf("<td %s>%s</td><td %s>%s%s%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td>",FONT,$2,FONT,$4,$5,$6,FONT,$8,FONT,$10,FONT,$12,FONT,$14,FONT,$16,FONT,$18,FONT,$20);} 158 '; 159 159 160 #No Test: use a table to fix entourage bug. 161 echo "<table $NOTEST_STYLE><tr><td $NOTEST_FONT>No test found.</td></tr></table>" 162 163 else 164 165 echo "<table $BODY_STYLE cellspacing=\"-1\">" 166 echo "<tr> <th $BODY_FONT>Result</th> <th $BODY_FONT>Tolerance</th> <th $BODY_FONT>Test</th> <th $BODY_FONT>Solution</th> <th $BODY_FONT>Field</th> </tr>" 167 168 # go through the lines of $package.log 169 COUNTER=0 170 MAX=`wc -l $package.log | awk '{printf("%s",$1);}'` 171 while [ $COUNTER -lt $MAX ]; do 172 let COUNTER=COUNTER+1 173 174 echo "<tr>" 175 176 #see wether it is success or error (get color: red or green) 177 if [ "`cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk '/line'$COUNTER'o/ {printf("%s\n",$2);}';`" == "SUCCESS" ]; 178 then 179 color="bgcolor=#ddffdd"; 180 else 181 color="bgcolor=#ffdddd"; 182 fi 183 FONT=$(echo "$BODY_FONT $color") 184 185 #build html corresponding line 186 cat $package.log | awk '{ printf "line%so %s\n", NR, $0 }' | awk -v FONT="$FONT" ' 187 /line'$COUNTER'o/ { printf("<td %s>%s</td><td %s> %s%s%s</td><td %s> %s</td><td %s> %s</td><td %s> %s</td>",FONT,$2,FONT,$4,$5,$6,FONT,$8,FONT,$10,FONT,$14);} 188 '; 189 echo "</tr>" 190 done 191 192 echo "</table>" 193 fi 194 195 #remove log file 196 rm $package.log 160 echo "</tr>" 197 161 198 162 done) 163 </table> 199 164 <br> 200 165 END 201 166 else 202 167 mktemp content.html 203 for package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do204 rm $package.log205 done206 168 fi 207 169 … … 214 176 215 177 #concatenate files 216 if [ $IS_RUN -eq 0 ] || [ $IS_END -eq 0 ];178 if [ $IS_RUN -eq 0 ]; 217 179 then 218 180 cat summary.html matlaberror.html content.html footer.html > report.html
Note:
See TracChangeset
for help on using the changeset viewer.