This topic defines the variables that can be used in C/C++test.
The following variables can be used for general purposes, for example, to configure report, e-mail, Parasoft DTP, or license settings. The session tag value must not contain any ':' characters.
$ example: ${analysis_type}
Outputs a comma separated list of enabled analysis types (for example: Static, Generation, Execution). This variable can only be used in report and email settings.
$ example: ${config_name}
Outputs the name of executed test configuration. This variable can only be used in report and email settings. For example:
example: $dtp_project}
Outputs the name of the project DTP that corresponds with the tested project.
example: ${env_var:HOME}
Outputs the value of the environmental variable specified after the colon.
example: ${general_project}
Outputs the name of the DTP general project that results are linked to.
example: ${project_name}
Outputs the name of the tested project. If more than one project is provided as an input, it first outputs the tested project name, then "...".
example: ${project_loc}
Outputs the location of the tested project.
example: ${solution_name}
Outputs the name of the tested Visual Studio solution. If more than one solution is provided as an input, it first outputs the tested solution name, then "...".
example: ${solution_loc}
Outputs the location of the tested Visual Studio solution.
example: ${time:yyyy-MM-dd-HH.mm}
Outputs the current time. The default is yyyy-MM-dd
. You can customize the format (as in the example above).
$ example: ${tool_name}
Outputs the name of the Parasoft product (for example: C/C++test).
example: ${workspace_name}Outputs the Visual Studio solution name. For example, report.mail.subject=Scanner Results for ${workspace_name}
may evaluate to "Scanner Results for solutionAccoun1.sln".
example: ${resource_loc:<RESOURCE_PATH>}
Outputs the location of the specified project resource. This variable can be used to reference a project resource in any applicable settings, such as the make run directory for projects with linked directories, or the path to a .dsp file for VC6 projects, or similar. Specify logical paths relative the project as it is registered in the workspace.
This variable is automatically initialized to the C/C++test options extractor utility with options; set in the environment when C/C++test runs the Build command. Used in the Build command line when configuring a Makefile-based project (Project> Properties> Parasoft>C++test> Build options). The variable can be used directly in Makefiles and build scripts to replace the compiler/linker (when make or build scripts are run by C/C++test).
Options from original (tested) project collected from monitoring the build or reading project files (Visual Studio or MULTI). Used in compiler / linker options in project / file properties.
Dependent libraries collected from the Visual Studio project/solution definition. Used in compiler / linker options in project / file properties.
|
You can use the following variables to configure the Test suite output file and layout option in the Test Configuration’s Generation> Test suite tab:
${cpptest:testware_loc} - C/C++test temporary files location. Used in:
${cpptest:cfg_dir} - C/C++test configuration files location. Used in:
${cpptest:auto-stubs} - Auto-generated stub files location. This variable points to the value set in the Test Configuration’s Auto-generated stubs> Output location, as shown in the screen shot below. This is basically a shortcut that synchronizes the directory where the stubs are generated and where they are picked up from.
Used in:
Used in: