This topic explains how to collect code dependency data for your projects with Parasoft C/C++test Standard and export the data as files that can later be imported to Lattix Architect.

 

Requirements

C/C++test requires dedicated license features to be activated to collect and export code dependency data. Contact your Parasoft representative for details.

Exporting Code Dependency Data with C/C++test

To collect and export code dependency data, run C/C++test with the built-in Export Code Dependency Data test configuration. Your command line may resemble the following:

cpptestcli -compiler gcc_9-64 -config "builtin://Export Code Dependency Data" -input cpptestscan.bdf

See Running Static Analysis for details on how create a .bdf file and run analysis in the command line.

The results are saved as XML files in the deps subdirectory of the default report location in your workspace: <WORKSPACE>reports/deps. You can customize the report location with the -report <path> command line option or the report.location=[path] setting; see Customizing Reports for details. C/C++test creates one .xml file per compilation unit. 

Customizing the Scope to Include Header Files

By default, dependency data is collected for source files in the tested project. You can modify the scope of dependency analysis to include header files:

Running Dependency Analysis with Static Analysis

To simultaneously collect code dependency data and perform static code analysis, you need to run C/C++test using a custom test configuration where both the code dependency analyzer and the set of rules you want to enforce are enabled. 

You can create the custom test configuration in one of the following ways:

Importing Code Dependency Data to Lattix Architect

Log into the Lattix Architect documentation for information about importing XML code dependency data files.