Changeset 1636


Ignore:
Timestamp:
08/11/09 08:01:06 (16 years ago)
Author:
Mathieu Morlighem
Message:

minor

File:
1 edited

Legend:

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

    r1635 r1636  
    1919        IS_INSTALL=1
    2020fi
    21 if [ `wc -l check.log | awk '{printf("%s",$1);}'`  = "0" ]
     21if [ $(wc -l nightly.log | awk '{printf("%s",$1);}')  -eq 0 ]
     22then
     23        IS_RUN=0
     24else
     25        IS_RUN=1
     26fi
     27if [ $(wc -l check.log | awk '{printf("%s",$1);}')  -eq 0 ]
    2228then
    2329        IS_END=0
     
    7884        #installation successful. Did we go to the end?
    7985
    80         if [ $(echo $IS_END) = 0 ];
    81         then
    82                 echo "<td $TABLE_FONT>status: <span style=\"color:#FFA500\">stopped before the end</span></td>"
     86        if [ $(echo $IS_RUN) -eq 0 ];
     87        then
     88                #run failed, end of report
     89                echo "<td $TABLE_FONT>status: <span style=\"color:#FF0000\">installation successful but tests runs failed</span></td>"
     90                echo "<td $TABLE_FONT>execution elapsed time: $ELAPSED_RUN</td>"
     91                echo "</tr>"
     92                echo "</table>"
     93                rm check.log errors.log success.log tests.log
     94
    8395        else
    84                 echo "<td $TABLE_FONT>status: <span style=\"color:#008000\">all test desks have been run</span></td>"
    85         fi
    86         echo "<td $TABLE_FONT>execution elapsed time: $ELAPSED_RUN</td>"
    87         echo "</tr>"
    88         echo "<tr>"
    89         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>"
    90         echo "<td $TABLE_FONT>  </td>"
    91         echo "</tr>"
    92         echo "<tr>"
    93         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>"
    94         echo "<td $TABLE_FONT>  </td>"
    95         echo "</tr>"
    96         echo "</table>"
    97 
    98         #draw a line and clean up
    99         echo "<br><hr width=\"900px\">"
    100         rm check.log
     96
     97                if [ $(echo $IS_END) -eq 0 ];
     98                then
     99                        echo "<td $TABLE_FONT>status: <span style=\"color:#FFA500\">stopped before the end</span></td>"
     100                else
     101                        echo "<td $TABLE_FONT>status: <span style=\"color:#008000\">all test desks have been run</span></td>"
     102                fi
     103                echo "<td $TABLE_FONT>execution elapsed time: $ELAPSED_RUN</td>"
     104                echo "</tr>"
     105                echo "<tr>"
     106                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>"
     107                echo "<td $TABLE_FONT>  </td>"
     108                echo "</tr>"
     109                echo "<tr>"
     110                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>"
     111                echo "<td $TABLE_FONT>  </td>"
     112                echo "</tr>"
     113                echo "</table>"
     114
     115                #draw a line and clean up
     116                echo "<br><hr width=\"900px\">"
     117                rm check.log
     118        fi
    101119fi)
    102120END
     
    185203
    186204#concatenate files
    187 if [ $(echo $IS_INSTALL) = 1 ];
    188 then
    189         cat summary.html content.html footer.html > report.html
    190         rm  summary.html content.html footer.html
     205if [ $IS_INSTALL -eq 1 ];
     206then
     207        if [ $IS_END -eq 1 ];
     208                cat summary.html content.html footer.html > report.html
     209                rm  summary.html content.html footer.html
     210        else
     211                cat summary.html footer.html > report.html
     212                rm  summary.html footer.html
     213        fi
    191214else
    192215        cat summary.html footer.html > report.html
Note: See TracChangeset for help on using the changeset viewer.