Changeset 3332fd9 in rtems-testing


Ignore:
Timestamp:
Sep 14, 2009, 4:18:30 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
df52a66
Parents:
0ad89d3
Message:

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

  • do_coverage: Merge gen_report into do_coverage. Also add extension to results tarball to indicate contents.
  • gen_report: Removed.
Location:
rtems-coverage
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    r0ad89d3 r3332fd9  
     12009-09-14      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * do_coverage: Merge gen_report into do_coverage. Also add extension to
     4        results tarball to indicate contents.
     5        * gen_report: Removed.
     6
    172009-09-14      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • rtems-coverage/do_coverage

    r0ad89d3 r3332fd9  
    11#! /bin/sh
    22#
    3 #  Simple script to help automate coverage testing
     3#  Script to perform coverage testing
    44#
    55#  $Id$
     
    2626        -B BSP    -- Specify BSP to test
    2727        -P        -- Enable POSIX API (default=yes)
    28         -E        -- Enable Experimental Coverage Area (default=no)
     28        -D        -- Enable Developmental Coverage (default=no)
    2929        -S        -- Optimize for size (default=no)
    3030        -m        -- Update and build covMerge (default=no)
     
    8080do_all="no"
    8181do_posix="yes"
    82 do_experimental="no"
     82do_developmental="no"
    8383do_optimize_size="no"
    8484do_covmerge="no"
     
    9191BSP="not_set"
    9292
    93 while getopts vB:PESmAucbCrR OPT
     93while getopts vB:PDSmAucbCrR OPT
    9494do
    9595    case "$OPT" in
     
    109109        m) do_covmerge=`toggle ${do_covmerge}` ;;
    110110        P) do_posix=`toggle ${do_posix}` ;;
    111         E) do_experimental=`toggle ${do_experimental}` ;;
     111        D) do_developmental=`toggle ${do_developmental}` ;;
    112112        S) do_optimize_size=`toggle ${do_optimize_size}` ;;
    113113        u) do_rtems_update=`toggle ${do_rtems_update}` ;;
     
    166166  echo "do_covmerge         " ${do_covmerge}
    167167  echo "do_posix:           " ${do_posix}
    168   echo "do_experimental:    " ${do_experimental}
     168  echo "do_developmental:   " ${do_developmental}
    169169  echo "do_optimize_size:   " ${do_optimize_size}
    170170  echo "do_rtems_update:    " ${do_rtems_update}
     
    202202check_status $? "Path appears to be broken"
    203203
     204# Start real action
     205NM=${TARGET}-nm
     206type ${NM}
     207check_status $? "Cannot find ${NM} on PATH"
     208
    204209if [ ${do_optimize_size} = yes ] ; then
    205210 c_opt=-Os
     
    208213fi
    209214
     215EXTENSION=${c_opt}
     216if [ ${do_posix} = yes ] ; then
     217  EXTENSION=${EXTENSION}P
     218else
     219  EXTENSION=${EXTENSION}p
     220fi
     221
     222if [ ${do_developmental} = yes ] ; then
     223  EXTENSION=${EXTENSION}D
     224else
     225  EXTENSION=${EXTENSION}d
     226fi
     227
    210228echo "Testing ${TARGET}/${BSP} at optimization (${c_opt})"
     229
     230# generate the coverage report set
     231generate_report()
     232{
     233  if [ $# -ne 3 ] ; then
     234    echo Usage: ${0} TARGET BSP COVERAGE_FORMAT
     235    exit 1
     236  fi
     237
     238  TARGET=${1}
     239  BSP=${2}
     240  COVERAGE_FORMAT=${3}
     241
     242  cd ${BASEDIR}/${BSP}-tests/
     243  check_status $? "cd ${BSP}-tests"
     244
     245  ${NM} -g -n hello.exe >hello.num
     246
     247  # Basic validity checking
     248  tlow=`grep "T ${lowsym}$" hello.num | cut -d' ' -f1`
     249  if [ X${tlow} = X ] ; then
     250    echo "low symbol (${lowsym}) not found"
     251  fi
     252  thigh=`grep "T ${highsym}$" hello.num | cut -d' ' -f1`
     253  if [ X${thigh} = X ] ; then
     254    echo "high symbol (${highsym}) not found"
     255  fi
     256
     257  if [ X${tlow} = X -o X${thigh} = X ] ; then
     258    echo "Did you patch RTEMS for coverage testing?"
     259    exit 1
     260  fi
     261
     262  rm -f merged.cov report.txt
     263
     264  ( \
     265    check_endof; \
     266    ${COVBASE}/covmerge -l 0x${tlow} -h 0x${thigh} -r report.txt \
     267      -s sizes.txt \
     268      -E ${COVBASE}/Explanations.txt -f ${COVERAGE_FORMAT} \
     269      -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 ;
     272    echo "=====================================" ) >summary.txt
     273
     274  cat summary.txt
     275
     276  # Now create the archive of information
     277  dated=${BSP}-`date +%Y%m%d-%H%M${EXTENSION}`
     278  rm -rf ${dated}
     279  mkdir ${dated}
     280  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}
     286}
    211287
    212288# Now we are ready to start doing real work
     
    292368  fi
    293369
    294   if [ ${do_experimental} = "yes" ] ; then
     370  if [ ${do_developmental} = "yes" ] ; then
    295371    EXPERIMENTAL_ARG="experimental"
    296372  else
     
    375451  check_status $? "cd ${BSP}-tests"
    376452
    377   ${COVBASE}/gen_report ${TARGET} ${BSP} ${COVERAGE_FORMAT}
     453  generate_report ${TARGET} ${BSP} ${COVERAGE_FORMAT}
    378454else
    379455  echo "Skipping Generating report..."
Note: See TracChangeset for help on using the changeset viewer.