In case of failure to import the coverage of COVER

  • Check that the compile flags used in COVER and CT 2024.12 are the same.
    • The preprocessed files are used to measure coverages. Different compile flags may result in different preporcessed files.
      1. In this case, set the compile flags of COVER and CT identically.
      2. Then, execute the tests so that coverage can be measured by COVER.
      3. After exporting the coverage data from COVER, perform the import coverage function in CT to bring in the coverage data from COVER.

void testFunction(){
    int a;
    int b;
//In the case of adding CT_FLAG macro in CT 2024.12 and not adding it in COVER, or vice versa.
#ifdef CT_FLAG
     callFunction();
#endif
}

  • Check that the bodyhash of the same function in both COVER and CT 2024.12 is identical.
    • Importing coverage may fail if the bodyhash value of the same function is differently calculated in COVER and CT 2024.12. In this case, add EXCLUDE_BODYHASH_CVG_IMPORT=true option to ut.ini file, so that you can import coverage even if the bodyhash values are different.
      • ut.ini path : project_path\.csdata\ut.ini

In case of being unable to import ‘function and coverage information’ included in a specific source file

An error message stating “Failed to import coverage information for some functions” may appear during the coverage import process, and there are cases where all “function and coverage information” included in a specific source file cannot be imported. In this case, the issue can be resolved by checking the following two items.

  • Verify whether the source file name of the project exported from COVER matches the source file name of the project imported into CT 2024.12. If they are different, modify them to be identical.
    1. Rename the source file name in CT 2024.12 to match the source file name in COVER, and then reanalyze.
    2. Importing COVER Coverage
  • If the source file includes the .C extension, additional configuration is required. After CT 2024.12 and COVER are modified to treat the file as the same language, the coverage from COVER can be imported.
    • Modify the source file extension.
      1. Rename the file extension from .C to .c and reanalyze.
      2. Importing COVER Coverage
    • Modify the [Source File Extensions] settings in CT 2024.12.
      1. Go to [Project Properties] -> [Source File Types] -> [C/C++ File List], remove *.C, and reanalyze.
      2. Go to [Project Properties] -> [Source File Types] -> [C/C++ File List], click [Add], and select the *.C extension as a C source file type
      3. [OK] and [Apply and Close]
      4. Project Reanalyze
      5. Importing COVER Coverage

After importing the coverage of COVER, when the coverage values are different

If the coverage displayed on COVER and CT 2024.12 differs after importing coverage, the following should be considered:

  • When the denominators of coverage are different
    • If the denominators differ, check the denominators for each file to identify the targets where the coverage differs.
    • If the coverage measurement targets of COVER and CT 2024.12 are different, exclude the non-target functions from measurement to align the denominators.
  • When the denominators are the same but the coverage results differ
    • If the denominators are the same but the coverage results differ, it means that certain functions’ coverage has not been imported.
    • Collect the coverage file (.csd) and project log files, and contact the contact details at the bottom of the manual’s [Troubleshooting] page for technical support.

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.