Changeset 8a315c2 in rtems-testing


Ignore:
Timestamp:
Sep 15, 2009, 9:50:05 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
cf57801
Parents:
df52a66
Message:

2009-09-15 Joel Sherrill <joel.sherrill@…>

  • covmerge.cc: Percentages are 0-100 not 0-1.
  • do_coverage: Rerun when coverage file has zero length. Generate row.html for web report.
  • generate_coverage_html, style.css: New files.
Location:
rtems-coverage
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    rdf52a66 r8a315c2  
     12009-09-15      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * covmerge.cc: Percentages are 0-100 not 0-1.
     4        * do_coverage: Rerun when coverage file has zero length.
     5        Generate row.html for web report.
     6        * generate_coverage_html, style.css: New files.
     7
    182009-09-15      Joel Sherrill <joel.sherrill@OARcorp.com>
    29
  • rtems-coverage/covmerge.cc

    rdf52a66 r8a315c2  
    623623    percentage = (double) notExecuted;
    624624    percentage /= (double) (highAddress - lowAddress);
     625    percentage *= 100.0;
    625626    printf( "Bytes Analyzed          : %d\n", highAddress - lowAddress );
    626627    printf( "Bytes Not Executed      : %d\n", notExecuted );
    627     printf( "Percentage Executed     : %5.4g\n", 1.00 - percentage  );
     628    printf( "Percentage Executed     : %5.4g\n", 100.0 - percentage  );
    628629    printf( "Percentage Not Executed : %5.4g\n", percentage  );
    629630  }
  • rtems-coverage/do_coverage

    rdf52a66 r8a315c2  
    226226fi
    227227
     228day=`date +%Y%m%d`
     229hour=`date +%H`
     230minute=`date +%M`
     231results_dir=${BSP}${EXTENSION}-${day}-${hour}${minute}
     232
    228233echo "Testing ${TARGET}/${BSP} at optimization (${c_opt})"
     234
     235# print a data element in table
     236print_element()
     237{
     238  echo "  <TD>"${*}"</TD>"
     239}
     240
     241# generate table row of results in html
     242generate_html()
     243{
     244  echo "<TR>"
     245    print_element ${day}
     246    print_element ${hour}:${minute}
     247    print_element ${c_opt}
     248    print_element ${do_posix}
     249    print_element ${do_developmental}
     250    print_element `grep "uncovered range" summary.txt | cut -d ' ' -f1`
     251    print_element `grep "age Not Exec" summary.txt | cut -d ':' -f2`
     252    print_element `grep "age Exec" summary.txt | cut -d ':' -f2`
     253    print_element `grep "Bytes Not Exec" summary.txt | cut -d ':' -f2`
     254    print_element `grep "Bytes Analyzed" summary.txt | cut -d ':' -f2`
     255    print_element "<A HREF=\"${results_dir}\">untarred</A> " \
     256                  "<A HREF=\"${results_dir}.tar.bz2\">tarball</A> "
     257  echo "</TR>"
     258}
    229259
    230260# generate the coverage report set
     
    268298      -E ${COVBASE}/Explanations.txt -f ${COVERAGE_FORMAT} \
    269299      -T ${TARGET} -e hello.exe -m merged.cov *.cov; \
    270     echo "====== 15 Largest Range Sizes ======" ; \
    271     grep ^Size report.txt | cut -d':' -f2 | sort -n | uniq -c | tail -15 ;
     300    echo "====== Largest Range Sizes (Size and Count)======" ; \
     301    grep ^Size report.txt | cut -d':' -f2 | sort -n | uniq -c | \
     302       tail -15 | sed -e 's/ *\([0-9]*\) *\([0-9]*\)/\2 \1/' | sort -n -r | \
     303       while read l; do printf "%6d %6d\n" $l; done ; \
    272304    echo "=====================================" ) >summary.txt
    273305
     306  generate_html >row.html
     307
    274308  cat summary.txt
    275309
    276310  # Now create the archive of information
    277   dated=${BSP}${EXTENSION}-`date +%Y%m%d-%H%M$`
    278   rm -rf ${dated}
    279   mkdir ${dated}
     311  rm -rf ${results_dir}
     312  mkdir ${results_dir}
    280313  cp summary.txt report.txt sizes.txt configuration.txt \
    281      annotated.dmp hello.num ${dated}
    282   cp ${COVBASE}/Explanations.txt.NotFound ${dated}
    283   echo "Results saved in ${dated}.tar.bz2"
    284   tar cjf ${dated}.tar.bz2 ${dated}
    285   rm -rf ${dated}
     314     annotated.dmp hello.num row.html ${results_dir}
     315  cp ${COVBASE}/Explanations.txt.NotFound ${results_dir}
     316  echo "Results saved in ${results_dir}.tar.bz2"
     317  tar cjf ${results_dir}.tar.bz2 ${results_dir}
     318  rm -rf ${results_dir}
    286319}
    287320
     
    440473
    441474  time ${RUNNER} -c *.exe
     475
     476  # some simulators sometimes produce an empty coverage file.  Fix that.
     477  while [ `wc -c *.cov| grep ^0 | wc -l` -ne 0 ]
     478  do
     479    for f in *.cov
     480    do
     481      sz=`wc -c $f | cut -d' ' -f1`
     482      if [ ${sz} -eq 0 ] ; then
     483        exe=`echo ${f} | sed -e 's/\.cov$//'`
     484        echo "Rerunning ${exe}"
     485        ${RUNNER} -c ${exe}
     486      fi
     487    done
     488  done
    442489else
    443490  echo "Skipping Running tests..."
Note: See TracChangeset for help on using the changeset viewer.