Changeset f1698c78 in rtems-testing


Ignore:
Timestamp:
Jan 26, 2011, 6:26:00 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
5fd483f
Parents:
898a5e8
Message:

2011-01-26 Joel Sherrill <joel.sherrilL@…>

  • do_coverage, generate_coverage_html, run_coverage: Contents of coverage data is now split into a collection of BSP specific directories. There were over 2000 entries in the main directory of the site before doing this. Also reworked the timeplot page to include the legend before each graph.
Location:
rtems-coverage
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    r898a5e8 rf1698c78  
     12011-01-26      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * do_coverage, generate_coverage_html, run_coverage: Contents of
     4        coverage data is now split into a collection of BSP specific
     5        directories. There were over 2000 entries in the main directory of
     6        the site before doing this. Also reworked the timeplot page to
     7        include the legend before each graph.
     8
    192011-01-21      Joel Sherrill <joel.sherrilL@OARcorp.com>
    210
  • rtems-coverage/do_coverage

    r898a5e8 rf1698c78  
    725725    fi
    726726
    727     generate_symbols | remove_unwanted_symbols \
     727    generate_symbols | sort -u | remove_unwanted_symbols \
    728728      >${BASEDIR}/${BSP}-tests/rtems.syms
    729729    syms=`cat ${BASEDIR}/${BSP}-tests/rtems.syms | wc -l`
  • rtems-coverage/generate_coverage_html

    r898a5e8 rf1698c78  
    111111for bsp in $BSPs
    112112do
    113   cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
     113  cpu=`grep "^Target" ${bsp}/${bsp}-*/configuration.txt | \
    114114        sed -e 's/^.*Target: *//' | cut -d'-' -f1 | sort -u`
    115   echo "<li><a href=\"${bsp}.html\">${cpu}/${bsp}</li>"
     115  echo "<li><a href=\"${bsp}/${bsp}.html\">${cpu}/${bsp}</li>"
    116116done
    117117cat <<EOF
     
    315315}
    316316
    317 cd $1
    318 
    319 if [ `ls -1 *.tar.bz2 2>/dev/null | wc -l` -eq 0 ]; then
    320   echo "No tarballs.  Is $1 really a coverage publishing directory?"
    321   exit 1
    322 fi
    323 
    324 for d in `ls -1 *.tar.bz2 | sed -e 's/.tar.bz2$//'`
    325 do
    326   if [ ! -d ${d} ] ; then
    327     tar xjf ${d}.tar.bz2
    328   fi
    329 done
    330 
    331 if [ ! -d rtems ] ; then
    332   mkdir rtems
    333 fi
    334 
    335 cp ${COVBASE}/style.css rtems/style.css
    336 
    337317genBSPList()
    338318{
    339   find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | \
    340     sed -e '/rtems/d' -e '/plot_data/d' -e '/graphs/d' | \
    341     while read bsp
     319  find * -type d -name "*-O[s2][pP][dD]-2???[012]???-????" | \
     320    cut -d'-' -f1 | uniq | \
     321    while read dir
    342322    do
    343       cpu=`grep ^Target ${bsp}-*/configuration.txt | tail -1 | \
     323      bsp=`echo ${dir} | sed -e 's/.*\/.*-//'`
     324      cpu=`grep ^Target ${dir}-*/configuration.txt | tail -1 | \
    344325        sed -e 's/^.*://' -e 's/^.*: *\([a-z]*\)-rtems.*$/\1/'`
    345326      echo ${cpu}/${bsp}
     
    386367{
    387368  # Now merge the data
    388   datfiles=`ls -1 ${OUT}/${bsp}-*${DEV}-${FIELD}.dat`
     369  datfiles=`ls -1 ${OUTDAT}/${bsp}-*${DEV}-${FIELD}.dat`
    389370  first=`cat ${datfiles} | sort -t' ' -k1.3 -n | head -n 1 | cut -d' ' -f1`
    390371  last=`cat ${datfiles} | sort -t' ' -k1.3 -n | tail -n 1 | cut -d' ' -f1`
     
    470451  echo "set key left box"
    471452
    472   echo "plot \"${OUT}/${bsp}-Osp${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
     453  echo "plot \"${OUTDAT}/${bsp}-Osp${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
    473454  echo "  title \"Osp${DEV}\" with lines lw 2, \\"
    474   echo "     \"${OUT}/${bsp}-OsP${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
     455  echo "     \"${OUTDAT}/${bsp}-OsP${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
    475456  echo "  title \"OsP${DEV}\" with lines lw 2, \\"
    476   echo "     \"${OUT}/${bsp}-O2p${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
     457  echo "     \"${OUTDAT}/${bsp}-O2p${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
    477458  echo "  title \"O2p${DEV}\" with lines lw 2, \\"
    478   echo "     \"${OUT}/${bsp}-O2P${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
     459  echo "     \"${OUTDAT}/${bsp}-O2P${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
    479460  echo "  title \"O2P${DEV}\" with lines lw 2"
    480461}
     
    482463gen_data()
    483464{
    484   for s in `ls -1 ${bsp}-${CONF}-*/summary.txt | sort `
     465  for s in `ls -1 ${bsp}/${bsp}-${CONF}-*/summary.txt | sort `
    485466  do
    486467    timestamp=`echo $s | cut -d'-' -f3-4 | cut -d'/' -f1`
     
    507488{
    508489BSP=$1
     490
     491LEGEND_TABLE_BODY="\
     492<table>\
     493<tr>\
     494  <td style="color:#ff0000">O2pd</td>\
     495  <td style="color:#D0A825">O2pD</td>\
     496  <td style="color:#336699">O2Pd</td>\
     497  <td style="color:#99FF00">O2PD</td>\
     498  <td style="color:#336666">Ospd</td>\
     499  <td style="color:#33CC33">OspD</td>\
     500  <td style="color:#990099">OsPd</td>\
     501  <td style="color:#ff0099">OsPD</td>\
     502</tr>\
     503</table>"
    509504
    510505cat <<EOF
     
    579574  </head>
    580575  <body onload="onLoad();" onresize="onResize();">
     576    <h1>${BSP} Timeplot Graphs</h1>
    581577    <li><a href="#uncovered_percent">Uncovered Percentage Graph</a></li>
    582578    <li><a href="#total_bytes">Total Bytes Analyzed Graph</a></li>
     
    584580    <li><a href="#uncovered_bytes">Uncovered Bytes Graph</a></li>
    585581
    586     <ul id="legend">
    587       <li style="color:#ff0000">O2pd</li>
    588       <li style="color:#D0A825">O2pD</li>
    589       <li style="color:#336699">O2Pd</li>
    590       <li style="color:#99FF00">O2PD</li>
    591       <li style="color:#336666">Ospd</li>
    592       <li style="color:#33CC33">OspD</li>
    593       <li style="color:#990099">OsPd</li>
    594       <li style="color:#ff0099">OsPD</li>
    595     </ul>
    596 
    597 
    598582    <h2 id="uncovered_percent">Uncovered Percentage</h2>
    599     <a href="#legend">Legend</a>
     583    ${LEGEND_TABLE_BODY}
    600584    <div id="uncovered_percent-timeplot" style="height: 500px;"></div>
     585
    601586    <h2 id="total_bytes">Total Bytes Analyzed</h2>
    602     <a href="#legend">Legend</a>
     587    ${LEGEND_TABLE_BODY}
    603588    <div id="total_bytes-timeplot" style="height: 500px;"></div>
    604589    <h2 id="ranges">Uncovered Ranges</h2>
    605     <a href="#legend">Legend</a>
     590
     591    ${LEGEND_TABLE_BODY}
    606592    <div id="ranges-timeplot" style="height: 500px;"></div>
     593
    607594    <h2 id="uncovered_bytes">Uncovered bytes</h2>
    608     <a href="#legend">Legend</a>
     595    ${LEGEND_TABLE_BODY}
    609596    <div id="uncovered_bytes-timeplot" style="height: 500px;"></div>
    610597  </body>
     
    613600}
    614601
     602#
     603# Now start the non-method code
     604#
     605
     606cd $1
     607
     608good_dir="no"
     609for d in `ls -1 *.tar.bz2 */*.tar.bz2 2>/dev/null | sed -e 's/.tar.bz2$//'`
     610do
     611  good_dir="yes"
     612  if [ ! -d ${d} ] ; then
     613    tar xjf ${d}.tar.bz2
     614  fi
     615done
     616
     617if [ ${good_dir} = "no" ]; then
     618  echo "No tarballs.  Is $1 really a coverage publishing directory?"
     619  exit 1
     620fi
     621
     622# Put the style sheets in place
     623if [ ! -d rtems ] ; then
     624  mkdir rtems
     625fi
     626cp ${COVBASE}/style.css rtems/style.css
     627
     628# Find the BSPs and make their directories
     629echo "Generating BSP list"
    615630#BSPs=`find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | grep -v rtems`
    616631BSPs=`genBSPList`
    617 
     632echo BSPs=${BSPs}
     633
     634echo "Ensuring BSP specific content is in BSP subdirectory"
     635for bsp in ${BSPs}
     636do
     637  test -d ${bsp}           || mkdir ${bsp}
     638  test -d ${bsp}/rtems     || mkdir ${bsp}/rtems
     639  test -d ${bsp}/plot_data || mkdir ${bsp}/plot_data
     640  test -d ${bsp}/graphs    || mkdir ${bsp}/graphs
     641  cp ${COVBASE}/style.css ${bsp}/rtems/style.css
     642  mv ${bsp}-* ${bsp} 2>/dev/null
     643done
    618644
    619645# Let them grow for a while
    620646# cleanup
    621647
     648echo "Generating master index.html"
    622649print_index >index.html
    623650
    624 # now generate a page per BSP
     651# now generate a page per BSP with plots and graphs
     652
    625653for bsp in ${BSPs}
    626654do
    627655  echo "Generating BSP Page for ${bsp}..."
     656  cd $1/${bsp}
    628657  do_perBSPPage ${bsp} >${bsp}.html
    629 done
    630 
    631 # Now generate the plots
    632 cd $1
    633 
    634 OUTFIG=graphs
    635 OUT=plot_data
    636 rm -rf ${OUT}
    637 test -d ${OUT} || mkdir ${OUT}
    638 test -d ${OUTFIG} || mkdir ${OUTFIG}
    639 
    640 for bsp in ${BSPs}
    641 do
     658
     659  cd $1
     660  OUTFIG=${bsp}/graphs
     661  OUTDAT=${bsp}/plot_data
    642662  echo "Generating Static Plots for ${bsp}..."
    643663  for FIELD in ranges total_bytes uncovered_bytes \
     
    658678      for CONF in Osp${DEV} OsP${DEV} O2p${DEV} O2P${DEV}
    659679      do
    660         gen_data ${bsp} ${CONF} >${OUT}/${bsp}-${CONF}-${FIELD}.dat
     680        gen_data ${bsp} ${CONF} >${OUTDAT}/${bsp}-${CONF}-${FIELD}.dat
    661681      done
    662682
    663       pltfile=${OUT}/${bsp}-${FIELD}-${DEV}.plt
     683      pltfile=${OUTDAT}/${bsp}-${FIELD}-${DEV}.plt
    664684      gen_plot >${pltfile}
    665       #echo gnuplot ${pltfile}
    666685      gnuplot ${pltfile}
    667686
  • rtems-coverage/run_coverage

    r898a5e8 rf1698c78  
    181181    *_baseline)
    182182      bsp=`echo $cmd | sed -e 's/_baseline$//'`
    183       # XXX development off?
    184       do_one ${bsp} -S          # -Os / POSIX enabled  / regression
    185       do_one ${bsp} -S -P       # -Os / POSIX disabled / regression
    186       do_one ${bsp}             # -O2 / POSIX enabled  / regression
    187       do_one ${bsp}    -P       # -O2 / POSIX disabled  / regression
     183      # Each run does both developmental and core.  So this is 8 configurations
     184      do_one ${bsp} -S          # -Os / POSIX enabled
     185      do_one ${bsp} -S -P       # -Os / POSIX disabled
     186      do_one ${bsp}             # -O2 / POSIX enabled
     187      do_one ${bsp}    -P       # -O2 / POSIX disabled
    188188      ;;
    189189    *)
Note: See TracChangeset for help on using the changeset viewer.