Please enable JavaScript to view this site.

Coverage Validator Help

Navigation: Command Line Interface

Filter and Hook options

Scroll Prev Top Next More

 

File extension hooking

 

-fileExt

 

Specify a file extension to be instrumented.

 

This is the same as listing a file extension on the Hooked Source File Types page in the Filters section of the settings dialog.

 

Example:

 

-fileExt cpp

 

 

Source code exclusion

 

Source code exclusion lets you control sections of a source file to be excluded by using pragmas (keyword directives) to mark the a region of code.

 

The pragmas can surround complete classes, functions or just single lines of code.

 

 

-codeExcludeDisable

-codeExcludeEnable

 

Disables or enables source code exclusion.

 

 

-startPragma

 

Sets the start pragma for use with multi-line code exclusion.

 

Example:

 

-startPragma CVPragmaMultiLineStart

 

 

-endPragma

 

Sets the end pragma for use with multi-line code exclusion.

 

Example:

 

-endPragma CVPragmaMultiLineEnd

 

 

-linePragma

 

Sets the line pragma for use with single line code exclusion.

 

Example:

 

-linePragma CVPragmaSingleLineIgnore

 

 

Source statistics per-DLL

 

Depending on how you build your software it's possible that some of your source files are present in more than one module (DLL / EXE) in your application.

 

These settings are equivalent to those for multiple source code file inclusion on the Statistics tab in the Data Collection section of the settings dialog for more details.

 

The options are:

 

-statisticsConsiderDLLForSource

 

Code coverage data is collected for each source on a per-DLL basis.

 

 

-statisticsIgnoreDLLForSource

 

Code coverage data is collected for each source regardless of which DLL the source code is compiled into.

 

 

Class and function hooks

 

You can indicate class and function names that are to be hooked or not hooked.

 

This is done either directly on the command line or from a file via -classAndFunctionFile

 

 

-classAndFunction

 

Specify classes and methods to be hooked or not hooked, depending on the use of the next two options.

 

Examples:
 

-classAndFunction MyClass::MyMethod

-classAndFunction MyClass::

-classAndFunction MyFunction

 

 

-classAndFunctionHook

 

Only the classes and methods specified by -classAndFunction will be hooked.

 

 

-classAndFunctionDoNotHook

 

The classes and methods specified by -classAndFunction will not be hooked.

 

 

-classAndFunctionAll

 

All classes and methods will be hooked.

 

 

-classAndFunctionNone

 

Discard any previous command line options specified for the class and method filter.

 

 

-classAndFunctionFile

 

Points to a file specifying the class and function to be hooked for the test.

 

If the filename contains spaces, the filename should be quoted.

 

note The settings dialog Class and Function Filter tab provides options for creating a ready made class and function hook file by using the Export... button on the dialog.

 

Examples:
 

-classAndFunctionFile c:\settings\testMacroClassAndMethods.cvxc

-classAndFunctionFile "c:\reg tests settings\testMacroClassAndMethods.cvxc"

 

 

 

 

Source file hooks

 

-sourceFileFilterHookFile

 

Points to a file specifying the source files to be hooked for the test.

 

If the filename contains spaces, the filename should be quoted.

 

note The settings dialog Source Files Filter tab provides options for creating a ready made source file filter hook file by using the Export... button on the dialog.

 

Examples:
 

-sourceFileFilterHookFile c:\settings\testMacroFiles.cvxft

-sourceFileFilterHookFile "c:\reg tests settings\testMacroFiles.cvxft"