Skip to content

How UTopia generate code coverage? #31

@AxelHowe

Description

@AxelHowe

Hello,

I encountered an issue while trying to reproduce evaluation

I want to check the code coverage and I'm not sure if my approach is correct.

I followed the steps below, using assimp as an example:

python3 -m helper.make assimp
python3 -m helper.build assimp

I executed the fuzz driver VTAdjacencyTest_unreferencedVerticesSet_Test to obtain default.profraw

cd exp/assimp/output/profiles/
./VTAdjacencyTest_unreferencedVerticesSet_Test
llvm-profdata-10 merge -sparse default.profraw -o test.profdata
llvm-cov-10 report ./VTAdjacencyTest_unreferencedVerticesSet_Test -instr-profile=test.profdata

The report shows that the code coverage is 0%.

I tested other projects in the same way and got the same result.

Filename                                                              Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
code/AssetLib/3DS/3DSConverter.cpp                                        281               281     0.00%          10                10     0.00%         681               681     0.00%
code/AssetLib/3DS/3DSExporter.cpp                                         146               146     0.00%          19                19     0.00%         448               448     0.00%
code/AssetLib/3DS/3DSHelper.h                                              21                21     0.00%          18                18     0.00%          89                89     0.00%
code/AssetLib/3DS/3DSLoader.cpp                                           572               572     0.00%          27                27     0.00%        1171              1171     0.00%
code/AssetLib/3MF/D3MFExporter.cpp                                        114               114     0.00%          20                20     0.00%         311               311     0.00%

... 

include/assimp/commonMetaData.h                                             0                 0         -           0                 0         -           0                 0         -
include/assimp/version.h                                                    0                 0         -           0                 0         -           0                 0         -
test/unit/ImportExport/MDL/MDLHL1TestFiles.h                                0                 0         -           0                 0         -           0                 0         -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                   96166             96166     0.00%        8372              8372     0.00%      150380            150380     0.00%

I would like to know how UTopia calculates code coverage.

Thank you for your response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions