Using a User-Defined Execute Command

Question:
I am trying to get the VectorCAST test harness to run on a new target that is not supported by an existing VectorCAST compiler template. Is it possible for me to customize the Execute Command option to do a complex series of actions?
Answer:

Yes. When you execute a test in VectorCAST/C++, VectorCAST will take the command string that exists in the Execute Command option and pass it the name of the executable file. It will do this with the working directory being set to the current test environment that is open. So, to provide your own "custom" processing, you can set the Execute Command to something like this:
 

cmd /c c:\test\c\target_tests\vcast_execute_command.bat
 

In the file vcast_execute_command.bat, you can do something as complicated as you need to in order to download the executable to the target.

 
Note:

The the name of the executable test harness will be available in the .bat file as argument #1, so you can use %1 for this name, as in the following example:


echo "the command passed in is: "

echo %1

%1

echo "Done!"



Article ID: 1514
Last updated: 2019-11-13
Revision: 5
VectorCAST -> Basics and (Un)Installation -> Using a User-Defined Execute Command
https://kb.vector.com/entry/1514/