When using the command line it's convenient to store settings and options in files that can be easily referenced.
Those files include:
•Global settings files
•File locations for source, PDB or MAP files
•DLL hook files
Each of these file types can be saved or exported from Coverage Validator.
The -settings option is used to specify the settings to be used for the test. If the filename contains spaces, the filename should be quoted. This option is the same as -loadSettings and is provided for backwards compatibility.
Global settings are usually stored in the registry, but you can save a specific set of settings for use in coverage tests:
•Settings menu Save settings...
Points to a previously saved settings file to be used for the test.
Examples:
-loadSettings c:\settings\testMacro1.cvs
-loadSettings "c:\coverage test settings\testMacro1.cvs"
The -settings option is identical to -loadSettings and is provided for backwards compatibility
File location files can be easily generated by exporting file locations from the File Locations page of the settings dialog.
Specify a plain text file listing file locations to be used during testing. See the format of the file below.
Each set of file types (one per line) is preceded by a header line in the file.
•[Files] Source files
•[Third] Third party source files
•[PDB] PDB files
•[MAP] MAP files
Example:
-fileLocations c:\coverageTests\testFileLocations1.cvxfl
Example file:
[Files]
c:\work\project1\
[Third]
d:\VisualStudio\VC98\Include
[PDB]
c:\work\project3\debug
c:\work\project3\release
[MAP]
c:\work\project3\debug
c:\work\project3\release
Set class and function names that are to be hooked or not hooked using -classAndFunctionFile in the Filter and Hook options.
Points to a file listing the DLLs to be hooked for the test.
Examples:
-dllHookFile c:\settings\testMacroDLLs.cvx
-dllHookFile "c:\coverage tests settings\testMacroDLLs.cvx"
The first line of text in the DLL hooks file is one of the following:
•Rule:DoNotHook DLLs marked as enabled will not be hooked. All other DLLs will be hooked
•Rule:DoHook DLLs marked as enabled will be hooked. All other DLLs will not be hooked
•Rule:HookAll All DLLs will be hooked regardless of the settings in the list
Capitalization is important.
The remaining lines list one DLL filename or folder path and an enabled state on each line.
Example:
Rule:DoNotHook
nativeExample.exe enable=FALSE
MFC42D.DLL enable=TRUE
MSVCRTD.dll enable=TRUE
KERNEL32.dll enable=TRUE
ole32.dll enable=TRUE
Example:
Rule:DoHook
E:\OM\C\coverageValidator\examples\nativeExample\DebugNonLink enable=TRUE
Example:
Rule:DoHook
"E:\OM\C\coverageValidator\examples\nativeExample with spaces\DebugNonLink" enable=TRUE
Example:
Rule:DoHook
%ENV_VAR%\DebugNonLink enable=TRUE
Here, the environment variable ENV_VAR is used to replace the text %ENV_VAR% in the path definition.
For example, if ENV_VAR was set to e:\dev\ the resulting value would be e:\dev\DebugNonLink
The file can be ANSI or UNICODE text and paths with spaces do not need quotes.