Changeset 19ac0d8 in rtems-testing


Ignore:
Timestamp:
May 10, 2010, 9:39:29 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
1466def
Parents:
ef308ab
Message:

2010-05-10 Joel Sherrill <joel.sherrilL@…>

  • generate_coverage_html: Generate separate html files for each BSP.
Location:
rtems-coverage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    ref308ab r19ac0d8  
     12010-05-10      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * generate_coverage_html: Generate separate html files for each BSP.
     4
    152010-05-10      Joel Sherrill <joel.sherrilL@OARcorp.com>
    26
  • rtems-coverage/generate_coverage_html

    ref308ab r19ac0d8  
    7272
    7373
    74 print_doc_top()
     74print_index()
    7575{
    7676cat <<EOF
     
    9595
    9696cat << EOF
    97 <div class="info">For more information on coverage analysis in general visit
    98 <a href="http://www.rtems.org/wiki/index.php/Coverage_Analysis_Theory">
    99 Coverage Analysis Theory</a>.  For information on how the RTEMS Project
    100 views coverage analysis, visit
    101 <a href="http://www.rtems.org/wiki/index.php/RTEMS_Coverage_Analysis">
    102 RTEMS Coverage Testing</a>.
    103 </div>
    10497</div>
    10598</HEAD>
    10699<body>
    107100<br>
    108 <br>
     101<p class="body">For more information on coverage analysis in general visit
     102<a href="http://www.rtems.org/wiki/index.php/Coverage_Analysis_Theory">
     103Coverage Analysis Theory</a>.</p>
     104<p class="body">For information on how the RTEMS Project
     105views coverage analysis, visit
     106<a href="http://www.rtems.org/wiki/index.php/RTEMS_Coverage_Analysis">
     107RTEMS Coverage Testing</a>.</p>
    109108<strong>BSPs with Coverage Results</strong>
    110109<ul>
     
    114113  cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
    115114        sed -e 's/^.*Target: *//' | sort -u | cut -d'-' -f1`
    116   echo "<li><a href=\"#${bsp}\">${cpu}/${bsp}</li>"
     115  echo "<li><a href=\"${bsp}.html\">${cpu}/${bsp}</li>"
    117116done
    118117cat <<EOF
    119118</ul>
    120 <br>
     119EOF
     120}
     121
     122print_doc_top()
     123{
     124cat <<EOF
     125<HTML>
     126<HEAD>
     127<TITLE>RTEMS
     128EOF
     129
     130echo "${RTEMS_VERSION} Coverage Reports for ${1} </TITLE>"
     131cat <<EOF
     132<meta http-equiv="Content-Language" content="English" />
     133<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
     134<link rel="stylesheet" type="text/css" href="rtems/style.css" media="screen" />
     135<div class="heading">
     136<div class="heading-title">RTEMS
     137EOF
     138
     139echo ${RTEMS_VERSION}" Coverage Results for ${1}</div>"
     140echo "<div class=\"datetime\">"`date`"</div>"
     141
     142cat << EOF
     143</div>
     144</HEAD>
     145<body>
    121146<br>
    122147<table class="stats-table" $cellspacing="1" cellpadding="2">
     
    139164doit()
    140165{
    141   print_doc_top
    142 
    143   # now cat rows
    144   for bsp in ${BSPs}
     166  BSP=${1}
     167  cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
     168        sed -e 's/^.*Target: *//' | sort -u | cut -d'-' -f1`
     169
     170  print_doc_top ${cpu}/${BSP}
     171
     172  echo "<table class=\"stats-table\" cellspacing=\"1\" cellpadding=\"2\">"
     173  # echo "<tr class=\"stats-table-target\">"
     174  # echo "<td colspan=\"10\">"
     175  # echo "<strong>${cpu}/${bsp}</strong>"
     176  # echo "</td>"
     177  # echo "</tr>"
     178  echo "<tr class=\"stats-table-top\">"
     179  ### generate header
     180  print_heading Day
     181  print_heading Time
     182  print_heading Optimization
     183  print_heading POSIX Enabled
     184  print_heading Developmental Enabled
     185  print_heading Uncovered Ranges
     186  # skip Uncovered Percentage
     187  print_heading Covered Percentage
     188  print_heading Uncovered Bytes
     189  print_heading Total Bytes
     190  print_heading Results
     191
     192  #cat ${bsp}-*-*-*/row.html | sed -e 's/<TD>/<TD><CENTER>/g' \
     193  #   -e 's/<\/TD>/<\/CENTER><\/TD>/g'
     194
     195  # 1   2      3      4
     196  #bsp-opt-yyyymmdd-hhmm.tar.bz2
     197  # sort 1,2 alphabetically, sort 3,4 reverse "version"
     198  first="yes"
     199  for build in O2pd O2pD O2Pd O2PD Ospd OspD OsPd OsPD
    145200  do
    146     cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
    147           sed -e 's/^.*Target: *//' | sort -u | cut -d'-' -f1`
    148     echo "<table class=\"stats-table\" cellspacing=\"1\" cellpadding=\"2\">"
    149     echo "<tr class=\"stats-table-target\">"
    150     echo "<a name=\"${bsp}\">"
    151     echo "<td colspan=\"10\"> "
    152     echo "<strong>${cpu}/${bsp}</strong>"
    153     echo "</td>"
    154     echo "</a>"
    155     echo "</tr>"
    156     echo "<tr class=\"stats-table-top\">"
    157     ### generate header
    158     print_heading Day
    159     print_heading Time
    160     print_heading Optimization
    161     print_heading POSIX Enabled
    162     print_heading Developmental Enabled
    163     print_heading Uncovered Ranges
    164     # skip Uncovered Percentage
    165     print_heading Covered Percentage
    166     print_heading Uncovered Bytes
    167     print_heading Total Bytes
    168     print_heading Results
    169 
    170     #cat ${bsp}-*-*-*/row.html | sed -e 's/<TD>/<TD><CENTER>/g' \
    171     #   -e 's/<\/TD>/<\/CENTER><\/TD>/g'
    172 
    173     # 1   2      3      4
    174     #bsp-opt-yyyymmdd-hhmm.tar.bz2
    175     # sort 1,2 alphabetically, sort 3,4 reverse "version"
    176     ls -1 ${bsp}-*-*-*/row.html | sort -t -  -k 1,2 -k 3,4Vr | while read row
     201    if [ ${first} = "no" ] ; then
     202      echo "<tr class=\"stats-table-target\">"
     203      echo "<td colspan=\"10\">"
     204      echo "<strong></br></strong>"
     205      echo "</td>"
     206      echo "</tr>"
     207    fi
     208    first=no
     209    ls -1 ${bsp}-${build}-*-*/row.html | sort -t -  -k 1,2 -k 3,4Vr | \
     210    while read row
    177211    do
    178212     sed \
     
    246280# cleanup
    247281
    248 doit >index.html
     282print_index >index.html
     283
     284# now generate a page per BSP
     285for bsp in ${BSPs}
     286do
     287  doit ${bsp} >${bsp}.html
     288done
     289
    249290exit 0
Note: See TracChangeset for help on using the changeset viewer.