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