Salome HOME
Allow sketch work with trimmed curve-arcs
[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 ${BUILD_DIR} --no-external --base-directory ${SOURCES_DIR} --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 # RefAttrList is unused type of attribute for now
13 for MASK in '*wrap*' 'moc_*' 'XAO_*' 'SketcherPrs_*' 'GeomAlgoImpl_*' 'ModuleBase_*' '*Widget*' '*Splitter*' '*RefAttrList*'; do
14 lcov -r covfile ${MASK} --output-file covfile_res -q
15 mv -f covfile_res covfile
16 done
17
18 ALL='BuildPlugin CollectionPlugin ConstructionPlugin ExchangePlugin FeaturesPlugin GDMLPlugin PrimitivesPlugin InitializationPlugin ParametersPlugin PartSetPlugin SketchPlugin'
19 ALL+=' GDMLAPI PrimitivesAPI BuilderAPI CollectionAPI ConnectorAPI ConstructionAPI ModelAPI ExchangeAPI FeaturesAPI ModelHighAPI ParametersAPI PartSetAPI SketchAPI BuildAPI GeomDataAPI GeomAPI GeomAlgoAPI'
20 ALL+=' Config Events GeomValidators Model_ ModelGeomAlgo Selector SketchSolver GeomData'
21
22 # prepare API report
23 cp -f covfile covAPI
24 # remove all plugins data except the needed
25 NEED='BuildAPI CollectionAPI ConnectorAPI ConstructionAPI ExchangeAPI FeaturesAPI GDMLAPI ModelHighAPI ParametersAPI PartSetAPI PrimitivesAPI SketchAPI'
26 for MASK in $ALL; do
27   if ! [[ " $NEED " =~ " $MASK " ]]; then
28     lcov -r covAPI *${MASK}* --output-file covAPI_res -q
29     mv -f covAPI_res covAPI
30   fi
31 done
32 rm -rf lcov_htmlAPI
33 genhtml covAPI --output-directory lcov_htmlAPI -q
34
35
36 # prepare Direct report
37 cp -f covfile covDirect
38 # remove all plugins data except the needed
39 NEED='GeomAlgoAPI GeomAPI'
40 for MASK in $ALL; do
41   if ! [[ " $NEED " =~ " $MASK " ]]; then
42     lcov -r covDirect *${MASK}* --output-file covDirect_res -q
43     mv -f covDirect_res covDirect
44   fi
45 done
46 rm -rf lcov_htmlDirect
47 genhtml covDirect --output-directory lcov_htmlDirect -q
48
49
50 # prepare Else report
51 cp -f covfile covElse
52 # remove all plugins data except the needed
53 NEED='BuildPlugin CollectionPlugin Config ConstructionPlugin Events ExchangePlugin FeaturesPlugin GDMLPlugin GeomData GeomDataAPI GeomValidators InitializationPlugin Model_ ModelAPI ModelGeomAlgo ParametersPlugin PartSetPlugin PrimitivesPlugin Selector SketchPlugin SketchSolver'
54 for MASK in $ALL; do
55   if ! [[ " $NEED " =~ " $MASK " ]]; then
56     lcov -r covElse *${MASK}* --output-file covElse_res -q
57     mv -f covElse_res covElse
58   fi
59 done
60 rm -rf lcov_htmlElse
61 genhtml covElse --output-directory lcov_htmlElse -q
62
63 # go back
64 cd ${SOURCES_DIR}