X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=lcov_reports.sh;h=e2b48e3cade1f7c88ffacb85eeb6b63239075f04;hb=b7c5fbb0932062ca9d22c9a35bc59d0b50752ff7;hp=89ea89df72f17dec74779efd43028eca11c41040;hpb=3b2022a46ef6d7c12d7a8574499148e371f8b825;p=modules%2Fshaper.git diff --git a/lcov_reports.sh b/lcov_reports.sh old mode 100644 new mode 100755 index 89ea89df7..e2b48e3ca --- a/lcov_reports.sh +++ b/lcov_reports.sh @@ -4,7 +4,7 @@ source env.sh cd ${BUILD_DIR} -lcov --capture --directory /data/mpv/build --no-external --base-directory=/data/mpv/sources --output-file coverage.info.noext -q +lcov --capture --directory ${BUILD_DIR} --no-external --base-directory ${SOURCES_DIR} --output-file coverage.info.noext -q # make a working copy of report cp -f coverage.info.noext covfile @@ -14,23 +14,19 @@ lcov -r covfile ${MASK} --output-file covfile_res -q mv -f covfile_res covfile done +ALL='BuildPlugin CollectionPlugin ConstructionPlugin ExchangePlugin FiltersPlugin FeaturesPlugin GDMLPlugin PrimitivesPlugin InitializationPlugin ParametersPlugin PartSetPlugin SketchPlugin' +ALL+=' GDMLAPI PrimitivesAPI BuilderAPI CollectionAPI ConnectorAPI ConstructionAPI ModelAPI ExchangeAPI FiltersAPI FeaturesAPI ModelHighAPI ParametersAPI PartSetAPI SketchAPI BuildAPI GeomDataAPI GeomAPI GeomAlgoAPI' +ALL+=' Config Events GeomValidators Model_ ModelGeomAlgo Selector SketchSolver GeomData' # prepare API report cp -f covfile covAPI -# remove plugins -for MASK in 'Build' 'Collection' 'Construction' 'Exchange' 'Features' 'GDML' 'Primitives' 'Initialization' 'Parameters' 'PartSet' 'Sketch'; do -lcov -r covAPI *${MASK}Plugin* --output-file covAPI_res -q -mv -f covAPI_res covAPI -done -# remove low level API -for MASK in 'Geom' 'GeomAlgo' 'GeomData' 'Model'; do -lcov -r covAPI *${MASK}API* --output-file covAPI_res -q -mv -f covAPI_res covAPI -done -# remove others -for MASK in 'Config' 'Events' 'GeomData' 'GeomValidators' 'Model_' 'ModelGeomAlgo' 'SketchSolver'; do -lcov -r covAPI *${MASK}* --output-file covAPI_res -q -mv -f covAPI_res covAPI +# remove all plugins data except the needed +NEED='BuildAPI CollectionAPI ConnectorAPI ConstructionAPI ExchangeAPI FiltersAPI FeaturesAPI ModelHighAPI ParametersAPI PartSetAPI PrimitivesAPI SketchAPI' +for MASK in $ALL; do + if ! [[ " $NEED " =~ " $MASK " ]]; then + lcov -r covAPI *${MASK}* --output-file covAPI_res -q + mv -f covAPI_res covAPI + fi done rm -rf lcov_htmlAPI genhtml covAPI --output-directory lcov_htmlAPI -q @@ -38,36 +34,38 @@ genhtml covAPI --output-directory lcov_htmlAPI -q # prepare Direct report cp -f covfile covDirect -# remove plugins -for MASK in 'Build' 'Collection' 'Construction' 'Exchange' 'Features' 'GDML' 'Primitives' 'Initialization' 'Parameters' 'PartSet' 'Sketch'; do -str=$startmask$MASK$endmask -lcov -r covDirect *${MASK}Plugin* --output-file covDirect_res -q -mv -f covDirect_res covDirect +# remove all plugins data except the needed +NEED='GeomAlgoAPI GeomAPI' +for MASK in $ALL; do + if ! [[ " $NEED " =~ " $MASK " ]]; then + lcov -r covDirect *${MASK}* --output-file covDirect_res -q + mv -f covDirect_res covDirect + fi done -# remove low level API -for MASK in 'GDML' 'Primitives' 'Builder' 'Collection' 'Connector' 'Construction' 'Model' 'Exchange' 'Features' 'ModelHigh' 'Parameters' 'PartSet' 'Sketch' 'Build' 'GeomData'; do -lcov -r covDirect *${MASK}API* --output-file covDirect_res -q +# exclude GeomAPI_AISObject as GUI-related object +lcov -r covDirect GeomAPI_AISObject* --output-file covDirect_res -q mv -f covDirect_res covDirect -done -# remove others -for MASK in 'Config' 'Events' 'GeomValidators' 'Model_' 'ModelGeomAlgo' 'SketchSolver' 'GeomData'; do -lcov -r covDirect *${MASK}* --output-file covDirect_res -q +# exclude coverage of algorithms related to GDML plugin +lcov -r covDirect GeomAlgoAPI_ConeSegment* --output-file covDirect_res -q +mv -f covDirect_res covDirect +lcov -r covDirect GeomAlgoAPI_Ellipsoid* --output-file covDirect_res -q mv -f covDirect_res covDirect -done rm -rf lcov_htmlDirect genhtml covDirect --output-directory lcov_htmlDirect -q # prepare Else report cp -f covfile covElse -# remove low level API -for MASK in 'Geom' 'GeomAlgo' 'GDML' 'Primitives' 'Builder' 'Collection' 'Connector' 'Construction' 'Exchange' 'Features' 'ModelHigh' 'Parameters' 'PartSet' 'Sketch' 'Build'; do -lcov -r covElse *${MASK}API* --output-file covElse_res -q -mv -f covElse_res covElse +# remove all plugins data except the needed +NEED='BuildPlugin CollectionPlugin Config ConstructionPlugin Events ExchangePlugin FiltersPlugin FeaturesPlugin GeomData GeomDataAPI GeomValidators InitializationPlugin Model_ ModelAPI ModelGeomAlgo ParametersPlugin PartSetPlugin PrimitivesPlugin Selector SketchPlugin SketchSolver' +for MASK in $ALL; do + if ! [[ " $NEED " =~ " $MASK " ]]; then + lcov -r covElse *${MASK}* --output-file covElse_res -q + mv -f covElse_res covElse + fi done rm -rf lcov_htmlElse genhtml covElse --output-directory lcov_htmlElse -q - # go back cd ${SOURCES_DIR}