Defining Third-Party CM Tool Interfaces : Script-Based Interface to CM Tools : Creating CM Operation Scripts

Creating CM Operation Scripts

As stated previously, the scripts that implement individual CM operations can be:

When Rational Statemate issues a request to the operating system to execute a specific script, it passes parameters containing the information needed to perform the task. The script reads the parameters from the argument vector. For example, this Perl statement stores the parameters in a list variable:

 
#!/usr/bin/perl -w
($working_dir, $bank_dir, $tmp_result_file) = @ARGV;

 

It is recommended that you write the parameters to the standard output to assist in debugging. For example:

 
$func = "init";
$echo = "$func : $working_dir,
$bank_dir, $tmp_result_file\n";
print $echo;
 

Then, the script calls the CM tool to perform the operation.

When the CM tool finishes, the script returns the result of the CM tool operation (and in some cases data) to Rational Statemate by creating a temporary file. Rational Statemate deletes the temporary file after reading it.