#! /bin/sh # # Combine the various reports into a single html file # vfile=`dirname $0`/VERSIONS-COVERAGE if [ ! -r ${vfile} ] ; then echo VERSIONS-COVERAGE file not found exit 1 fi source ${vfile} if [ ! -d ${BASEDIR} ] ; then echo Have you set the BASEDIR in VERSIONS correctly? exit 1 fi progname=${0##*/} # fast basename hack for ksh, bash USAGE=\ "usage: $progname [ -opts ] -v -- verbose (default=no) -p -- generate plots (default=yes) -r VERSION -- RTEMS Version (default=CVS) " # log an error to stderr prerr() { echo "$*" >&2 } fatal() { prerr "$USAGE" [ "$1" ] && (prerr ; prerr $*); exit 1 } toggle() { case $1 in no) echo "yes" ;; yes) echo "no" ;; *) fatal "Unknown value to toggle ($1)" ;; esac } do_plots="yes" verbose="no" RTEMS_VERSION="CVS Head" while getopts vpr: OPT do case "$OPT" in r) RTEMS_VERSION="${OPTARG}";; p) do_plots=no ;; v) verbose=`toggle ${verbose}` ;; *) fatal;; esac done shiftcount=`expr $OPTIND - 1` shift $shiftcount if [ $# -ne 1 ] ; then fatal Usage: $0 directory fi if [ ! -d ${1} ] ; then fatal ${1} is not a directory fi print_index() { cat < RTEMS EOF echo ${RTEMS_VERSION} cat <<EOF Coverage Reports
RTEMS EOF echo ${RTEMS_VERSION}" Coverage Results
" echo "
"`date`"
" cat << EOF

For more information on coverage analysis in general visit Coverage Analysis Theory.

For information on how the RTEMS Project views coverage analysis, visit RTEMS Coverage Testing.

BSPs with Coverage Results