Changeset 1568


Ignore:
Timestamp:
08/05/09 09:46:30 (16 years ago)
Author:
Mathieu Morlighem
Message:

better report

File:
1 edited

Legend:

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

    r1566 r1568  
    22#generate html report from nightly.log output file
    33
    4 #Process log for errors
     4#Process log
    55cat nightly.log | grep 'package: macayeal'      | grep -v "not supported yet" > macayeal.log
    66cat nightly.log | grep 'package: ice'           | grep -v "not supported yet" > ice.log
     
    1111cat nightly.log | grep SUCCESS > success.log
    1212cat errors.log success.log > tests.log
     13
     14#create some variables
     15if [ `wc -l check.log | awk '{printf("%s",$1);}'`  = "0" ]
     16then
     17        IS_END=0
     18else
     19        IS_END=1
     20fi
     21if [ `wc -l tests.log | awk '{printf("%s",$1);}'`  = "0" ]
     22then
     23        IS_INSTALL=0
     24else
     25        IS_INSTALL=1
     26fi
     27
    1328
    1429#build report.html
     
    8196date: $TODAY<br>
    8297host: $HOST_NAME<br>
    83 platform: $ISSM_ARCH<br>
     98OS:   $OS<br>
    8499release: $ISSM_RELEASE<br>
    85100total elapsed time: $ELAPSED_TOTAL<br>
     
    87102runs elapsed time: $ELAPSED_RUN<br>
    88103<br>
    89 status: $(if [ `wc -l check.log | awk '{printf("%s",$1);}'`  = "0" ];
     104status: $(if [ $IS_INSTALL==0 ];
    90105then
    91         echo "<span style=\"color:#FF0000\">stopped before the end</span>"
     106        #installation failed, end of report
     107        echo "<span style=\"color:#FF0000\">installation failed</span>"
     108        echo "<br>"
     109        echo "<hr width=\"900px\">"
     110        echo "</div>"
     111        echo "<br>"
     112        echo "<br>"
     113        echo "<div class=\"issmfooter\"><a href=\"http://issm.jpl.nasa.gov\" title=\"ISSM website\" target=\"_blank\">ISSM</a> nightly run report</div>"
     114        echo "</body>"
     115        echo "</html>"
     116        exit 1
    92117else
    93         echo "all test desks have been run"
     118        if [ $IS_END==0 ];
     119        then
     120                echo "<span style=\"color:#FF0000\">stopped before the end</span></div>"
     121        else
     122                echo "all test desks have been run"
     123        fi
    94124fi
    95125rm check.log)
Note: See TracChangeset for help on using the changeset viewer.