Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The purpose of the GLAST SAS system tests is to provide and end to end test of the offline software. They are typically run for each tagged release of the GlastRelease, EngineeringModel and EngineeringModel BeamtestRelease packages.

The components are outlined in the following diagram.

The text below describes how to run the system tests manually. In principle, the Release Manager runs these tests automatically after a new release is generated, comparing that release to the previous one. For reasons not yet understood (by Julie and Navid), this job consistently fails to copy the files from the working directory to the archive directory. (In fact, typically the first step in running the system tests in manual mode is to cancel all the jobs which have been automatically submitted for that package.) When this problem is fixed much of the following will be unecessary. 

The code for the system tests currently resides in /nfs/farm/g/glast/u17/systests/src. (TBD: commit the current working version of the code to CVS!) 

The main executive script (runSystestsis runSysTests.pl) is run manually at the moment in the the exec subdirectory, and is supported by utility routines in SysTests.pm. It runs the suite of shell scripts that it finds in the EMtests, GRtests and GRtests BTtests subdirectories of src/, tracks the results and updates Oracle database tables. Each of the shell scripts that it runs consists of at least two parts, : it first runs either a Gleam .exe or LatIntegration job, and  then runs a RootAnalysis macro, which reads the output files produced in the Gleam step and fills a collection of histograms. Once the histograms have been created, the executive script sets the standard and threshold for each histogram, that is, the version that this release is to be compared against, and the statistical threshold that defines whether the test has passed or failed. Finally the executive script runs a root macro which calculates several quantities from each histogram (number or entries, rms, KS probability that the histogram differs from its standard etc) and updates the database.

The system tests code can be found in u17/systests/src. The EMtests and GRtests EMtests, GRtests and BTtests directories contain one directory for each test type used for the EngineeringModel, GlastRelease and GlastRelease BeamtestRelease packages respectively. The exec directory contains the perl scripts that run the tests. The output of the tests (root files and run log and summary) ends up in subdirectories of GlastRelease/, EngMod/ or BeamtestRelease/

Running the system tests

The system tests are configured using a configuration file. An anotated example can be found in /nfs/farm/g/glast/u17/systests/src/exec/Config_example.txt.

...

To run the system tests from scratch, i.e. runing Gleam to create the full root trees, RootAnalysis to create the histograms and finally a step to set the standard version, threshold and calculate the metadata, do (from the exec directory):
./runSystest.pl <configfile>
Where <configfile> :

Go to the directory which will contain the output. For example, to run the test for v11r3 of GlastRelease, go to:

    /nfs/farm/g/glast/systests/GlastRelease/v11r3.

In this directory, you will find the file Config.txt, which was put there by the Release Manager. Modify this file as desired. For example, you might want to change the reference release, or add the subset command. The reference chosen must have previously run successfully.

To start the tests, do:

Wiki Markup
&nbsp;&nbsp;&nbsp; /nfs/farm/g/glast/u17/systests/src/exec/runSysTests.pl \[_configfile_\]

where configfile is the name of your configuration file. If configfile is not supplied, Config.txt will be used.

You will see lots of console output, and then a batch job will be submitted for each test.

The output for this run will appear in the directories:

    /nfs/farm/g/glast/u17/systests/GlastRelease/v11r3/testname/linux

where testname is AllGamma, VerticalMuon1GeV, etc. 

you do not supply a config file name, the code will look for a file called Config.txt by default. It is important that only one set of system tests for each package is running at any given time. You can run a set of system tests for EngModel and GlastRelease simultaneously, but you cannot run two sets for different GlastRelease versions, because the tests will try to store the output files in the same working directory. After you start the system tests it is usually a good idea to look at the file test_error testerr (also in the exec same directory that you ran from). We fairly often get a sporadic error when connecting to the Oracle database. If this happens, I usually you should just kill the jobs with bkill 0 and start them again.

To examine the output of the job, go here.

Skipping the Gleam step (does this still work?)

If the full root trees already exist and are stored in the systests db and you wish to regenerate the histograms you can do:
./runRootOnly.pl <configfile>
This will access the database to find the locations of the files containing the root trees and will regenerate the histograms. This is very convenient if the RootAnalysis macros have been altered.

Making the histograms appear (no longer needed)

At the moment, the step to calculate the metadata and insert it into the database is not automatically run (due to a mismatch in oracle versions needed for the ROOT/perl step). The histograms cannot be viewed until the metadata is in the database. To run this manually, you need to login as glastsys,
cd to u17/systests/src/exec directory

copy the Config.txt that you need to the current directory

i.e. cp ../../EngModel/v5r0703p5/Config.txt .

and run

./insert_metadata.pl Config.txt