Changeset 1574


Ignore:
Timestamp:
08/05/09 10:40:38 (16 years ago)
Author:
Mathieu Morlighem
Message:

minor

Location:
issm/trunk/cron
Files:
2 edited

Legend:

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

    r1570 r1574  
    4444export HOST_NAME=`hostname`;
    4545export ISSM_RELEASE="issm"
     46export OS
    4647
    4748#create ISSM variables
  • issm/trunk/cron/report.sh

    r1568 r1574  
    2626fi
    2727
    28 
    2928#build report.html
    30 cat <<END > report.html
     29
     30#first: header
     31cat << END > header.html
    3132<html>
    3233<title>ISSM - Nightly run Report</title>
     
    9394<div class="issmh1">ISSM Nightly run report</div>
    9495<br>
     96END
     97
     98#then: summary
     99cat << END > summary.html
    95100<div class="issmcomment">
    96101date: $TODAY<br>
     
    105110then
    106111        #installation failed, end of report
    107         echo "<span style=\"color:#FF0000\">installation failed</span>"
     112        echo "<span style=\"color:#FF0000\">installation failed</span></div>"
     113        rm check.log errors.log success.log tests.log
     114else
     115        if [ $IS_END==0 ];
     116        then
     117                echo "<span style=\"color:#FF0000\">stopped before the end</span>"
     118        else
     119                echo "all test desks have been run"
     120        fi
     121        echo "<br>"
     122        echo "number of errors: $(wc -l errors.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}';  rm errors.log)<br>"
     123        echo "number of success: $(wc -l success.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}';rm success.log tests.log)</div>"
    108124        echo "<br>"
    109125        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
    117 else
    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
    124 fi
    125 rm check.log)
    126 <br>
    127 number of errors: $(wc -l errors.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}';  rm errors.log)<br>
    128 number of success: $(wc -l success.log | awk '{printf("%s",$1);}')/$(wc -l tests.log | awk '{printf("%s",$1);}';rm success.log tests.log)</div>
    129 <br>
    130 <hr width="900px">
    131 
     126        rm check.log
     127fi)
     128END
     129
     130#report content
     131if [ $IS_END != 0 ];
     132then
     133        cat << END > content.html
    132134$(for  package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do
    133135
     
    189191
    190192done)
    191 
    192 <br>
     193<br>
     194END
     195else
     196        for  package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do
     197                rm $package.log
     198        done
     199fi
     200
     201#last footer
     202cat << END > footer.html
    193203<br>
    194204<div class="issmfooter"><a href="http://issm.jpl.nasa.gov" title="ISSM website" target="_blank">ISSM</a> nightly run report</div>
     
    196206</html>
    197207END
     208
     209#concatenate files
     210if [ $IS_END != 0 ];
     211then
     212        cat header.html summary.html content.html footer.html > report.html
     213        rm  header.html summary.html content.html footer.html
     214else
     215        cat header.html summary.html footer.html > report.html
     216        rm  header.html summary.html footer.html
     217fi
Note: See TracChangeset for help on using the changeset viewer.