Configuring VectorCAST to Work When Running Multiple Processes

Question:
How can I configure VectorCAST/Cover to work when I am running multiple processes at the same time?
Answer:

VectorCAST supports gathering coverage data for multiple (single-threaded) processes that are spawned by your main executable. This allows the user to have more than one instrumented executable running at the same time and to get different TESTINSS.DAT filenames. 
 

In order to configure this, depending on the operating system that you are running on and the compiler that you are using, there are the following three different defines that can be set to support this feature:

  • VCAST_APPEND_WIN32_PID
  • VCAST_APPEND_POSIX_PID
  • VCAST_APPEND_SECONDS_SINCE_EPOCH

If you are running on Windows, then compile the c_cover_io.c or .cpp file with the VCAST_APPEND_WIN32_PID define. Execute your application as usual. VectorCAST creates one TESTINSS-<PID>.DAT file for each process, identified by the process ID <PID>.
 

If you are running on a Unix platform, then you will need to compile the c_cover_io.c or .cpp file with the VCAST_APPEND_POSIX_PID define.  VectorCAST will create a TESTINSS-<PID>.DAT file for each process, identified by the process ID <PID>.
 

If your compiler does not support the above two API calls, you will need to define VCAST_APPEND_SECONDS_SINCE_EPOCH when compiling the c_cover_io.c or .cpp file. As with the other two variable defines, VectorCAST will in this case also create one TESTINSS-<PID>.DAT file for each process, identified by the process ID <PID>.



Article ID: 1477
Last updated: 2019-10-30
Revision: 2
VectorCAST -> Application or System Testing -> Configuring VectorCAST to Work When Running Multiple Processes
https://kb.vector.com/entry/1477/