added global code coverage info generation

This commit is contained in:
maroy 2004-08-02 06:26:34 +00:00
parent 39dd3cec21
commit d9c0e838b5
11 changed files with 107 additions and 21 deletions

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.5 $
# Version : $Revision: 1.6 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/Attic/Makefile,v $
#-------------------------------------------------------------------------------
@ -40,10 +40,11 @@ FLAWFINDER = flawfinder
#-------------------------------------------------------------------------------
# Basic directory and file definitions
#-------------------------------------------------------------------------------
BASE_DIR = .
DOC_DIR = ${BASE_DIR}/doc
DOXYGEN_DIR = ${DOC_DIR}/doxygen
ETC_DIR = ${BASE_DIR}/etc
BASE_DIR = .
DOC_DIR = ${BASE_DIR}/doc
DOXYGEN_DIR = ${DOC_DIR}/doxygen
COVERAGE_DIR = ${DOC_DIR}/coverage
ETC_DIR = ${BASE_DIR}/etc
DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config
@ -113,6 +114,7 @@ flawfinder:
clean:
${RMDIR} ${DOXYGEN_DIR}/html
${RMDIR} ${COVERAGE_DIR}/*
setup: tools_setup modules_setup products_setup

View file

@ -0,0 +1,79 @@
#!/bin/sh
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LiveSupport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/bin/gen_coverage_data.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This script generates code coverage data for all modules
#-------------------------------------------------------------------------------
module="LiveSupport"
reldir=`dirname $0`/..
basedir=`cd $reldir; pwd; cd -`
bindir=$basedir/bin
docdir=$basedir/doc
tmpdir=$basedir/tmp
modules_dir=$basedir/modules
products_dir=$basedir/products
usrdir=`cd $basedir/usr; pwd; cd -`
coverage_report_dir=$docdir/coverage
core_coverage_file=$modules_dir/core/tmp/coverage.info
db_coverage_file=$modules_dir/db/tmp/coverage.info
storage_coverage_file=$modules_dir/storage/tmp/coverage.info
scheduler_coverage_file=$products_dir/scheduler/tmp/coverage.info
coverage_file=$tmpdir/coverage.info
lcov=$usrdir/bin/lcov
genhtml=$usrdir/bin/genhtml
#-------------------------------------------------------------------------------
# Execute the coverage tests one by one
#-------------------------------------------------------------------------------
$modules_dir/core/bin/gen_coverage_data.sh
$modules_dir/db/bin/gen_coverage_data.sh
$modules_dir/storage/bin/gen_coverage_data.sh
$products_dir/scheduler/bin/gen_coverage_data.sh
#-------------------------------------------------------------------------------
# Gather all the coverage information into one file
# remove references to the tmp directories, and replace them with the module
# directories themselves. this way the source files are found easlity by lcov
#-------------------------------------------------------------------------------
echo "" > $coverage_file
cat $core_coverage_file | sed -e "s/core\/tmp\//core\//g" >> $coverage_file
cat $db_coverage_file | sed -e "s/db\/tmp\//db\//g" >> $coverage_file
cat $storage_coverage_file | sed -e "s/storage\/tmp\//storage\//g" >> $coverage_file
cat $scheduler_coverage_file | sed -e "s/scheduler\/tmp\//scheduler\//g" >> $coverage_file
rm -rf $coverage_report_dir
mkdir -p $coverage_report_dir
$genhtml -t "$module" -o $coverage_report_dir $coverage_file

View file

@ -22,7 +22,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Version : $Revision: 1.2 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/bin/gen_coverage_data.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
@ -47,6 +47,8 @@ lcov=$usrdir/bin/lcov
genhtml=$usrdir/bin/genhtml
cd $basedir
#-------------------------------------------------------------------------------
# Re-configure with covarege collection enabled, compile and run the tests
#-------------------------------------------------------------------------------
@ -76,4 +78,3 @@ $genhtml -t "$module" -o $coverage_report_dir $coverage_file
#-------------------------------------------------------------------------------
rm -f $tmpdir/include
rm -f $tmpdir/src
rm -f $raw_coverage_file $coverage_file

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.3 $
# Version : $Revision: 1.4 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/etc/Makefile.in,v $
#
# @configure_input@
@ -105,7 +105,7 @@ doc:
clean:
${RM} ${CORE_LIB_OBJS} ${CORE_LIB_FILE}
${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER}
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info
docclean:
${RMDIR} ${DOXYGEN_DIR}/html

View file

@ -22,7 +22,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.2 $
# Version : $Revision: 1.3 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/db/bin/gen_coverage_data.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
@ -47,6 +47,8 @@ lcov=$usrdir/bin/lcov
genhtml=$usrdir/bin/genhtml
cd $basedir
#-------------------------------------------------------------------------------
# Re-configure with covarege collection enabled, compile and run the tests
#-------------------------------------------------------------------------------
@ -76,4 +78,3 @@ $genhtml -t "$module" -o $coverage_report_dir $coverage_file
#-------------------------------------------------------------------------------
rm -f $tmpdir/include
rm -f $tmpdir/src
rm -f $raw_coverage_file $coverage_file

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.3 $
# Version : $Revision: 1.4 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/db/etc/Makefile.in,v $
#
# @configure_input@
@ -117,7 +117,7 @@ doc:
clean:
${RM} ${DB_LIB_OBJS} ${DB_LIB_FILE}
${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER}
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info
docclean:
${RMDIR} ${DOXYGEN_DIR}/html

View file

@ -22,7 +22,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Version : $Revision: 1.2 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/bin/gen_coverage_data.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
@ -47,6 +47,8 @@ lcov=$usrdir/bin/lcov
genhtml=$usrdir/bin/genhtml
cd $basedir
#-------------------------------------------------------------------------------
# Re-configure with covarege collection enabled, compile and run the tests
#-------------------------------------------------------------------------------
@ -76,4 +78,3 @@ $genhtml -t "$module" -o $coverage_report_dir $coverage_file
#-------------------------------------------------------------------------------
rm -f $tmpdir/include
rm -f $tmpdir/src
rm -f $raw_coverage_file $coverage_file

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.3 $
# Version : $Revision: 1.4 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/etc/Makefile.in,v $
#
# @configure_input@
@ -114,7 +114,7 @@ doc:
clean:
${RM} ${STORAGE_LIB_OBJS} ${STORAGE_LIB_FILE}
${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER}
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info
docclean:
${RMDIR} ${DOXYGEN_DIR}/html

View file

@ -22,7 +22,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Version : $Revision: 1.2 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/bin/gen_coverage_data.sh,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
@ -47,6 +47,8 @@ lcov=$usrdir/bin/lcov
genhtml=$usrdir/bin/genhtml
cd $basedir
#-------------------------------------------------------------------------------
# Re-configure with covarege collection enabled, compile and run the tests
#-------------------------------------------------------------------------------
@ -76,4 +78,3 @@ $genhtml -t "$module" -o $coverage_report_dir $coverage_file
#-------------------------------------------------------------------------------
rm -f $tmpdir/include
rm -f $tmpdir/src
rm -f $raw_coverage_file $coverage_file

View file

@ -21,7 +21,7 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.7 $
# Version : $Revision: 1.8 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $
#
# @configure_input@
@ -158,7 +158,7 @@ doc:
clean:
${RM} ${SCHEDULER_EXE_OBJS} ${SCHEDULER_EXE}
${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER}
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da
${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info
docclean:
${RMDIR} ${DOXYGEN_DIR}/html

1
livesupport/tmp/.keepme Normal file
View file

@ -0,0 +1 @@
keep me