Changeset ee0913a in rtems-testing


Ignore:
Timestamp:
Mar 11, 2010, 3:58:10 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
0b15e02
Parents:
bc226ea
Message:

2010-03-11 Joel Sherrill <joel.sherrilL@…>

  • CoverageReaderQEMU.cc: Some trace files are larger than 2 GB so use stat64.
  • ExecutableInfo?.cc: Disable message about unable to find symbol information. It is just too noisy to be useful anymore.
  • covoar.cc: Add disabled code to print list of executable/coverage files being processed.
  • do_coverage: Add option to save tarballs. Update to support running all BSPs we currently support coverage on.
  • generate_coverage_html: Disable removing entries when more than 20.
  • run_coverage: Update to reflect new way of doing things.
  • coverage_cron: New file. Will be run once per week.
Location:
rtems-coverage
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    rbc226ea ree0913a  
     12010-03-11      Joel Sherrill <joel.sherrilL@oarcorp.com>
     2
     3        * CoverageReaderQEMU.cc: Some trace files are larger than 2 GB
     4        so use stat64.
     5        * ExecutableInfo.cc: Disable message about unable to find symbol
     6        information.  It is just too noisy to be useful anymore.
     7        * covoar.cc: Add disabled code to print list of executable/coverage
     8        files being processed.
     9        * do_coverage: Add option to save tarballs. Update to support
     10        running all BSPs we currently support coverage on.
     11        * generate_coverage_html: Disable removing entries when more
     12        than 20.
     13        * run_coverage: Update to reflect new way of doing things.
     14        * coverage_cron: New file.  Will be run once per week.
     15
    1162010-03-08      Joel Sherrill <joel.sherrill@oarcorp.com>
    217
  • rtems-coverage/CoverageReaderQEMU.cc

    rbc226ea ree0913a  
    4040    struct trace_header header;
    4141    uintptr_t           i;
    42     struct stat         statbuf;
     42    struct stat64       statbuf;
    4343    int                 status;
    4444    FILE*               traceFile;
     
    4747    // Verify that the coverage file has a non-zero size.
    4848    //
    49     status = stat( file, &statbuf );
     49    // NOTE: We must use stat64 because some of the coverage files are HUGE!
     50    status = stat64( file, &statbuf );
    5051    if (status == -1) {
    5152      fprintf( stderr, "Unable to stat %s\n", file );
  • rtems-coverage/ExecutableInfo.cc

    rbc226ea ree0913a  
    9191      info = theSymbolTable->getInfo( symbol );
    9292      if (!info) {
     93        /* A little too verbose :-D */
     94        #if 0
    9395        if (Verbose)
    9496          fprintf(
     
    9799            symbol.c_str()
    98100          );
     101        #endif
    99102        continue;
    100103      }
  • rtems-coverage/covoar.cc

    rbc226ea ree0913a  
    146146      coverageFileName = executableInfo->getFileName();
    147147      coverageFileName.replace(
    148         coverageFileName.length() - executableExtensionLength,
     148        coverageFileName.length() - executableExtensionLength + 1,
    149149        executableExtensionLength,
    150150        coverageFileExtension
     
    168168    fprintf( stderr, "Target          : %s\n", PrintableString(target) );
    169169    fprintf( stderr, "\n" );
     170#if 0
     171    // Process each executable/coverage file pair.
     172    eitr = executablesToAnalyze.begin();
     173    for (citr = coverageFileNames.begin();
     174         citr != coverageFileNames.end();
     175         citr++) {
     176
     177        fprintf(
     178          stderr,
     179          "Coverage file %s for executable %s\n",
     180          (*citr).c_str(),
     181          ((*eitr)->getFileName()).c_str()
     182        );
     183
     184        if (!singleExecutable)
     185          eitr++;
     186    }
     187#endif
    170188  }
    171189
     
    252270        (*citr).c_str(),
    253271        ((*eitr)->getFileName()).c_str()
    254     );
     272      );
    255273
    256274    // along with its coverage file.
  • rtems-coverage/do_coverage

    rbc226ea ree0913a  
    3737        -r        -- run the tests (default=no)
    3838        -R        -- generate reports (default=no)
    39         -f        -- publish the results to ftp site (default=no)
     39        -t        -- publish the results to ftp site (default=no)
     40        -f        -- save the results locally (default=no)
    4041
    4142Notes:  + There are currently NO checks at each step to determine if
     
    9394do_reports="no"
    9495do_publish="no"
     96do_save_tarballs="no"
    9597BSP="not_set"
    9698
    97 while getopts vB:PSmAucbCrRf OPT
     99while getopts vB:PSmAucbCrRft OPT
    98100do
    99101    case "$OPT" in
     
    121123        R) do_reports=`toggle ${do_reports}` ;;
    122124        f) do_publish=`toggle ${do_publish}` ;;
     125        t) do_save_tarballs=`toggle ${do_save_tarballs}` ;;
    123126        *) fatal;;
    124127    esac
     
    149152
    150153RTEMSEXT=ralf
     154COVEXT=cov
    151155case ${BSP} in
    152156  pc386)
     
    155159    RTEMS_EXTRA_ARGS="USE_COM1_AS_CONSOLE=1"
    156160    RTEMS_EXTRA_ARGS="${RTEMS_EXTRA_ARGS} BSP_PRESS_KEY_FOR_RESET=0"
     161    RTEMSEXT=exe
    157162    ;;
    158163  uC5282)
    159164    CPU=m68k
    160165    COVERAGE_FORMAT=QEMU
     166    RTEMSEXT=exe
     167    COVEXT=tra
    161168    ;;
    162169  qemuppc)
     
    187194print_verbose()
    188195{
    189   echo "BSP:                " ${BSP}
    190   echo "Target:             " ${TARGET}
    191   echo "do_all:             " ${do_all}
    192   echo "do_covmerge         " ${do_covmerge}
    193   echo "do_posix:           " ${do_posix}
    194   echo "do_optimize_size:   " ${do_optimize_size}
    195   echo "do_rtems_update:    " ${do_rtems_update}
    196   echo "do_rtems_configure: " ${do_rtems_configure}
    197   echo "do_rtems_build:     " ${do_rtems_build}
    198   echo "do_copy_tests:      " ${do_copy_tests}
    199   echo "do_run_tests:       " ${do_run_tests}
    200   echo "do_reports:         " ${do_reports}
    201   echo "do_publish:         " ${do_publish}
    202   echo "Clean Before:       " ${do_clean}
     196  echo "BSP:                  " ${BSP}
     197  echo "Target:               " ${TARGET}
     198  echo "do_all:               " ${do_all}
     199  echo "do_covmerge           " ${do_covmerge}
     200  echo "do_posix:             " ${do_posix}
     201  echo "do_optimize_size:     " ${do_optimize_size}
     202  echo "do_rtems_update:      " ${do_rtems_update}
     203  echo "do_rtems_configure:   " ${do_rtems_configure}
     204  echo "do_rtems_build:       " ${do_rtems_build}
     205  echo "do_copy_tests:        " ${do_copy_tests}
     206  echo "do_run_tests:         " ${do_run_tests}
     207  echo "do_reports:           " ${do_reports}
     208  echo "do_publish:           " ${do_publish}
     209  echo "do_save_tarballs:     " ${do_save_tarballs}
     210  echo "Clean Before:         " ${do_clean}
     211  echo "Executable Extension  " ${RTEMSEXT}
     212  echo "Coverage Extension    " ${COVEXT}
     213
    203214}
    204215
     
    258269fi
    259270
     271year=`date +%Y`
    260272day=`date +%Y%m%d`
    261273hour=`date +%H`
     
    311323    echo "Developmental Code : " ${do_developmental} ; \
    312324  ) >summary.txt
    313   ${COVBASE}/covoar \
     325  ${COVBASE}/covoar -v \
    314326    -T ${TARGET} \
    315327    -f ${COVERAGE_FORMAT} \
    316328    -E ${COVBASE}/Explanations.txt \
    317     -e ralf -c ralf.cov \
    318     *.ralf >> summary.txt
     329    -e ${RTEMSEXT} -c ${RTEMSEXT}.${COVEXT} \
     330    *.exe >> summary.txt
    319331  check_status $? "covoar failed"
    320332
     
    467479  fi
    468480
    469   if [ ${do_developmental} = "yes" ] ; then
    470     EXPERIMENTAL_ARG="experimental"
    471   else
    472     EXPERIMENTAL_ARG="yes"
    473   fi
    474 
    475481  ${RTEMSDIR}/configure NDEBUG=1 \
    476482    RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH=1 \
     
    480486    --target=${TARGET} --enable-rtemsbsp=${BSP} \
    481487    --enable-maintainer-mode \
    482     --enable-coverage=${EXPERIMENTAL_ARG} \
    483488    --disable-itron --${posix_en}able-posix --enable-tests \
    484     --disable-tcpip --disable-ada --disable-cxx \
     489    --disable-networking --disable-ada --disable-cxx \
    485490    --prefix=${BASEDIR}/coverage/install >c.log 2>&1
    486491  check_status $? "configuring RTEMS for ${BSP}"
     
    572577
    573578# If requested, publish the coverage reports
    574 if [ ${do_publish} = "yes" ] ; then
     579if [ ${do_publish} = "yes" -o ${do_save_tarballs} = "yes" ] ; then
    575580  if [ -d ${BASEDIR}/${BSP}-tests ] ; then
    576581    cd ${BASEDIR}/${BSP}-tests/
    577     cp ${BSP}${EXTENSION}[dD]-${day}-${hour}${minute}.tar.bz2 ${FTPDIR}
    578     check_status $? "cp ${BSP} results to ftp site failed"
    579     ${COVBASE}/generate_coverage_html ${FTPDIR}
     582    if [ ${do_publish} = "yes" ] ; then
     583      cp ${BSP}${EXTENSION}[dD]-${day}-${hour}${minute}.tar.bz2 ${FTPDIR}
     584      check_status $? "cp ${BSP} results to ftp site failed"
     585      ${COVBASE}/generate_coverage_html ${FTPDIR}
     586    fi
     587    if [ ${do_save_tarballs} = "yes" ] ; then
     588      if [ ! -d ../tarballs/${year} ] ; then
     589         echo "Creating ../tarballs/${year}"
     590         mkdir ../tarballs/${year}
     591         check_status $? "Failed to mkdir ../tarballs/${year}"
     592      fi
     593      cp ${BSP}${EXTENSION}[dD]-${day}-${hour}${minute}.tar.bz2 \
     594         ../tarballs/${year}
     595      check_status $? "cp ${BSP} results to save directory"
     596    fi
    580597  else
    581     echo "No results to publish"
     598    echo "No results to publish or save"
    582599  fi
    583600else
  • rtems-coverage/generate_coverage_html

    rbc226ea ree0913a  
    243243BSPs=`genBSPList`
    244244
    245 cleanup
     245# Let them grow for a while
     246# cleanup
    246247
    247248doit >index.html
  • rtems-coverage/run_coverage

    rbc226ea ree0913a  
    11#! /bin/bash
    22#
    3 #  Script to help running coverage from cron
     3#  Script to help running coverage profiles
    44#
    55#  $Id$
     
    2222
    2323USAGE=\
    24 "usage: $progname [ -v ] cmd [ more cmds]
     24"usage: $progname [ -opts ] cmd [ more cmds]
     25        -t        -- publish the results to ftp site (default=no)
     26        -f        -- save the results locally (default=no)
    2527        -v         -- verbose
    2628
     
    6971  bsp=${1}
    7072  shift
    71   time ${COVBASE}/do_coverage -A -u -m -f ${*} -B ${bsp}
     73  time ${COVBASE}/do_coverage -A -u -m ${SAVE} ${PUBLISH} ${*} -B ${bsp}
    7274  rm -rf b-* *-tests
    7375}
     
    8890
    8991verbose="no"
     92do_publish="no"
     93do_save_tarballs="no"
    9094
    91 while getopts v OPT
     95while getopts ftv OPT
    9296do
    9397
    9498    case "$OPT" in
     99      f) do_publish=`toggle ${do_publish}` ;;
     100      t) do_save_tarballs=`toggle ${do_save_tarballs}` ;;
    95101      v) verbose=`toggle ${verbose}` ;;
    96102      *) fatal;;
    97103    esac
    98104done
     105
     106# Set the publish and save options
     107if [ ${do_publish} = "yes" ] ; then
     108  PUBLISH="-f"
     109fi
     110if [ ${do_save_tarballs} = "yes" ] ; then
     111  SAVE="-t"
     112fi
    99113
    100114shiftcount=`expr $OPTIND - 1`
     
    147161      bsp=`echo $cmd | sed -e 's/_baseline$//'`
    148162      do_one ${bsp} -S          # -Os / POSIX enabled  / regression
     163      do_one ${bsp} -S -P       # -Os / POSIX disabled / regression
    149164      do_one ${bsp}             # -O2 / POSIX enabled  / regression
    150       do_one ${bsp} -S -P       # -Os / POSIX disabled / regression
    151       do_one ${bsp} -S -D       # -Os / POSIX enabled  / developmental
    152165      ;;
    153166    *)
Note: See TracChangeset for help on using the changeset viewer.