You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

 

 

How to Run the Script Test System

This tutorial walks through how to run the script-based test system to test GMAT.

Getting the Files

The script-based test system is considered internal to the GMAT project, and is checked into our internal repository:

Check out this entire directory to your local machine. You will need to log in using your NDC credentials.
Some tests use additional data files that are located elsewhere in the same repository:

Check out the data files to your local machine as well.The location doesn't matter, it can be in a different place than the test system files checked out earlier.

Setting up the Environment

You will need to have the copy of GMAT that you are testing located somewhere on your machine. It is preferable if this is a fresh copy not being used for anything else; the test system moves certain output files and deletes other ones.
Add the following lines to your gmat_startup_file.txt, where <testsys>is the location of the test system you checked out earlier:

GMAT_FUNCTION_PATH = <testsys>/input/Functions/GMAT/
MATLAB_FUNCTION_PATH = <testsys>/input/Functions/MATLAB/

Next, add the data files checked out above to the data folder of your copy of GMAT. This is most easily done by just dragging the top-level folders to the GMAT datafolder and letting the operating system merge the folders.

Configuring the Run

The test system is configured by editing a run definition file (or an equivalent Matlab structure).
Create your own run definition file by copying the supplied bin/rundef.example.m to a new name.
The syntax of this file is explained by comments in the file itself, and by the Run Definition Syntax wiki page. You will need to change at least the RunDef.GmatExe field, and probably others as well.
Edit your run definition file to reflect the run you want to perform.You will most likely change the following fields:

BuildThe name of this run (i.e. 20110101 or MyTestRun)
GmatExeThe location of your GMAT executable
ComparisonsChoose truth comparisons only, or regressions as well
RegressionBuildFolder name for regression comparisons
ReportersChoose screen only, or text file/email as well
Cases Categories Folders RequirementsSelect a subset of tests to run (comment them out to run everything)
Running the Tests

Running the test system itself is simple, once everything is configured.
Open Matlab and change the working directory to <testsys>/bin.
Run the command gmattest('<run definition file>'), where <run definition file> is the path to the run definition file you configured above. Paths can be absolute or relative to the working directory.
At this point, the system will run and report progress to the screen. A full run with all tests included may take several hours.
If you want to repeat a portion of the run without rerunning all the tests, there are other commands available for running only a portion of the system:

gmattest run <run definition file>Run everything (alternative to the command above)
gmattest runtests <run definition file>Run the tests only, then stop
gmattest runcomparators <run definition file>Run the truth/regression comparisons only
gmattest runreporters <run definition file>Run the screen/file/email reporting only
  • No labels