1*cdf0e10cSrcweir#!/bin/tcsh -f 2*cdf0e10cSrcweir 3*cdf0e10cSrcweir# This is a helper file, to start a coverage test by hand 4*cdf0e10cSrcweir 5*cdf0e10cSrcweir# ----- INIT ENVIRONMENT ----- 6*cdf0e10cSrcweir# setup a complete build environment, copy from our beanshell environment 7*cdf0e10cSrcweirsetenv SHELL /bin/tcsh 8*cdf0e10cSrcweirsource /net/margritte/usr/qaapi/workspace/qadev/scripts/init/staroffice.cshrc 9*cdf0e10cSrcweir 10*cdf0e10cSrcweir# do a setsolar 11*cdf0e10cSrcweir 12*cdf0e10cSrcweirsetenv SOURCE_ROOT /cws/so-cwsserv06/qadev16 13*cdf0e10cSrcweirsetsolar -cwsname qadev16 -sourceroot -src680 -ver m25 -jdk14 unxlngi5 14*cdf0e10cSrcweir 15*cdf0e10cSrcweir 16*cdf0e10cSrcweir# ----- CLEAN OLD COVERAGE INFOS ----- 17*cdf0e10cSrcweir 18*cdf0e10cSrcweirsetenv SALDIR /cws/so-cwsserv06/qadev16/SRC680/src.m25/sal 19*cdf0e10cSrcweir 20*cdf0e10cSrcweir# this is a patch for sal, to see also "ustr" in string 21*cdf0e10cSrcweircd $SALDIR/rtl/source 22*cdf0e10cSrcweir 23*cdf0e10cSrcweir# strtmpl.c contains code, which is used for strings and ustrings. This file contain lot of makros 24*cdf0e10cSrcweir# which unpacked at compile time. Due to the fact, gcov has some problems with such things, an idea is 25*cdf0e10cSrcweir# to copy strtmpl.c to ustrtmpl.c and replace the include command in ustring.c 26*cdf0e10cSrcweir# this is done be the follows lines. 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir# cat ustring.c | sed -e "s/strtmpl.c/ustrtmpl.c/" > ustring.c.new ; mv -f ustring.c.new ustring.c 29*cdf0e10cSrcweir# cp strtmpl.c ustrtmpl.c 30*cdf0e10cSrcweir 31*cdf0e10cSrcweircd $SALDIR 32*cdf0e10cSrcweir 33*cdf0e10cSrcweirrm -f `find . -type f -name '*.bb' -print` 34*cdf0e10cSrcweirrm -f `find . -type f -name '*.bbg' -print` 35*cdf0e10cSrcweirrm -f `find . -type f -name '*.f' -print` 36*cdf0e10cSrcweirrm -f `find . -type f -name '*.da' -print` 37*cdf0e10cSrcweirrm -f `find . -type f -name '*.gcov' -print` 38*cdf0e10cSrcweir 39*cdf0e10cSrcweirrm -rf unxlngi5 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir# ----- START A NEW BUILD WITH COVERAGE ----- 42*cdf0e10cSrcweirsetenv ENVCFLAGS "-O0 -ftest-coverage -fprofile-arcs" 43*cdf0e10cSrcweirbuild TESTCOVERAGE=t 44*cdf0e10cSrcweirdeliver 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir# ----- START THE TESTS ----- 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir# unsetenv ENVCFLAGS 50*cdf0e10cSrcweircd cd $SALDIR/qa 51*cdf0e10cSrcweir# cd qa/osl/file 52*cdf0e10cSrcweirdmake test 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir# ----- BUILD GCOV (coverage) FILES ----- 56*cdf0e10cSrcweircd cd $SALDIR/qa/helper/gcov 57*cdf0e10cSrcweirstatistics 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir# the statistics file create some *.txt files, the most interesting one is realallchecked.txt, 60*cdf0e10cSrcweir# which contain only the interface functions and it's run through in percent. 61*cdf0e10cSrcweir# the gcov_resultcompare.pl use two of these files to give out a compare. 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir# usage: gcov_resultcompare.pl -o realallchecked.txt -c <other>/realallchecked.txt 64*cdf0e10cSrcweir 65