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
<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:
|The name of this run (i.e. |
|The location of your GMAT executable|
|Choose truth comparisons only, or regressions as well|
|Folder name for regression comparisons|
|Choose screen only, or text file/email as well|
|Select 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
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:
|Run everything (alternative to the command above)|
|Run the tests only, then stop|
|Run the truth/regression comparisons only|
|Run the screen/file/email reporting only|