Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / lcov_reports.sh
1 #!/bin/bash -ex
2
3 source env.sh
4
5 cd ${BUILD_DIR}
6
7 lcov --capture --directory /data/mpv/build --no-external --base-directory=/data/mpv/sources --output-file coverage.info.noext -q
8
9 # make a working copy of report
10 cp -f coverage.info.noext covfile
11 # remove all reports of GUI and external parts (for all the next kinds of reports)
12 for MASK in '*wrap*' 'moc_*' 'XAO_*' 'SketcherPrs_*' 'GeomAlgoImpl_*' 'ModuleBase_*' 'Primitives*' '*Widget*' '*Splitter*'; do
13 lcov -r covfile ${MASK} --output-file covfile_res -q
14 mv -f covfile_res covfile
15 done
16
17
18 # prepare API report
19 cp -f covfile covAPI
20 # remove plugins
21 for MASK in 'Build' 'Collection' 'Construction' 'Exchange' 'Features' 'GDML' 'Initialization' 'Parameters' 'PartSet' 'Sketch'; do
22 lcov -r covAPI *${MASK}Plugin* --output-file covAPI_res -q
23 mv -f covAPI_res covAPI
24 done
25 # remove low level API
26 for MASK in 'GDML' 'Geom' 'GeomAlgo' 'GeomData' 'Model'; do
27 lcov -r covAPI *${MASK}API* --output-file covAPI_res -q
28 mv -f covAPI_res covAPI
29 done
30 # remove others
31 for MASK in 'Config' 'Events' 'GeomData' 'GeomValidators' 'Model_' 'ModelGeomAlgo' 'SketchSolver'; do
32 lcov -r covAPI *${MASK}* --output-file covAPI_res -q
33 mv -f covAPI_res covAPI
34 done
35 rm -rf lcov_htmlAPI
36 genhtml covAPI --output-directory lcov_htmlAPI -q
37
38
39 # prepare Direct report
40 cp -f covfile covDirect
41 # remove plugins
42 for MASK in 'Build' 'Collection' 'Construction' 'Exchange' 'Features' 'GDML' 'Initialization' 'Parameters' 'PartSet' 'Sketch'; do
43 str=$startmask$MASK$endmask
44 lcov -r covDirect *${MASK}Plugin* --output-file covDirect_res -q
45 mv -f covDirect_res covDirect
46 done
47 # remove low level API
48 for MASK in 'GDML' 'Builder' 'Collection' 'Connector' 'Construction' 'Model' 'Exchange' 'Features' 'ModelHigh' 'Parameters' 'PartSet' 'Sketch' 'Build' 'GeomData'; do
49 lcov -r covDirect *${MASK}API* --output-file covDirect_res -q
50 mv -f covDirect_res covDirect
51 done
52 # remove others
53 for MASK in 'Config' 'Events' 'GeomValidators' 'Model_' 'ModelGeomAlgo' 'SketchSolver' 'GeomData'; do
54 lcov -r covDirect *${MASK}* --output-file covDirect_res -q
55 mv -f covDirect_res covDirect
56 done
57 rm -rf lcov_htmlDirect
58 genhtml covDirect --output-directory lcov_htmlDirect -q
59
60
61 # prepare Else report
62 cp -f covfile covElse
63 # remove plugins
64 for MASK in 'GDML'; do
65 str=$startmask$MASK$endmask
66 lcov -r covElse *${MASK}Plugin* --output-file covElse_res -q
67 mv -f covElse_res covElse
68 done
69 # remove low level API
70 for MASK in 'Geom' 'GeomAlgo' 'GDML' 'Builder' 'Collection' 'Connector' 'Construction' 'Exchange' 'Features' 'ModelHigh' 'Parameters' 'PartSet' 'Sketch' 'Build'; do
71 lcov -r covElse *${MASK}API* --output-file covElse_res -q
72 mv -f covElse_res covElse
73 done
74 rm -rf lcov_htmlElse
75 genhtml covElse --output-directory lcov_htmlElse -q
76
77
78 # go back
79 cd ${SOURCES_DIR}