Changeset 2182


Ignore:
Timestamp:
09/09/09 18:27:19 (16 years ago)
Author:
Mathieu Morlighem
Message:

hope to have fixed nightly run for tonight

Location:
issm/trunk/cron
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/cron/nightlyrun.sh

    r2180 r2182  
    160160
    161161#removed unused lines to deal with a smaller file
    162 cat nightlylong.log | egrep 'difference: |NIGHTLYRUNTERMINATEDCORRECTLY' > nightly.log
     162cat nightlylong.log | egrep 'ERROR|SUCCESS|FAILURE' > nightly.log
    163163#rm nightlylong.log
    164164
  • issm/trunk/cron/report.sh

    r2105 r2182  
    33
    44#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
     5cat nightly.log | grep 'ERROR'   | grep -v "PETSC ERROR" > errors.log
     6cat nightly.log | grep 'SUCCESS'                         > success.log
     7cat nightly.log | grep 'FAILURE'                         > failures.log
    138
    149#create some variables
     
    2419else
    2520        IS_RUN=1
    26 fi
    27 if [ $(wc -l check.log | awk '{printf("%s",$1);}')  -eq 0 ]
    28 then
    29         IS_END=0
    30 else
    31         IS_END=1
    3221fi
    3322
     
    7665<tr>
    7766$(#print status
    78 if [ $(echo $IS_INSTALL) = 0 ];
     67if [ $(echo $IS_INSTALL) -eq 0 ];
    7968then
    8069        #installation failed, end of report
     
    8372        echo "</tr>"
    8473        echo "</table>"
    85         rm check.log errors.log success.log tests.log
     74        rm errors.log success.log
    8675else
    8776        #installation successful. Did we go to the end?
     
    9483                echo "</tr>"
    9584                echo "</table>"
    96                 rm check.log errors.log success.log tests.log
     85                rm errors.log success.log failures.log
    9786
    9887        else
    9988
    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>"
    10690                echo "<td $TABLE_FONT>execution elapsed time: $ELAPSED_RUN</td>"
    10791                echo "</tr>"
    10892                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>"
    11094                echo "<td $TABLE_FONT>  </td>"
    11195                echo "</tr>"
    11296                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>"
    11498                echo "<td $TABLE_FONT>  </td>"
    11599                echo "</tr>"
     
    118102                #draw a line and clean up
    119103                echo "<br><hr width=\"900px\">"
    120                 rm check.log
    121104        fi
    122105fi)
     
    135118then
    136119        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
     134MAX=`wc -l nightly.log | awk '{printf("%s",$1);}'`
     135while [  $COUNTER -lt $MAX ]; do
     136        let COUNTER=COUNTER+1
    138137
    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
    143152        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")
    156154
    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        ';
    159159
    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>"
    197161
    198162done)
     163</table>
    199164<br>
    200165END
    201166else
    202167        mktemp content.html
    203         for  package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do
    204                 rm $package.log
    205         done
    206168fi
    207169
     
    214176
    215177#concatenate files
    216 if [ $IS_RUN -eq 0 ] || [ $IS_END -eq 0 ];
     178if [ $IS_RUN -eq 0 ];
    217179then
    218180        cat summary.html matlaberror.html content.html footer.html > report.html
Note: See TracChangeset for help on using the changeset viewer.