#-----------------------------------------------------------------------------
# file:	README.script
# 	
# description:
#       README file for test script for the hdfeos2
#
#      This test script is provided to aid the user in running the test
#      drivers. It will run the same test cases included in the test driver
#      tar file to verify that hdfeos2  is functioning correctly. This
#      script was written to support the internal test of the hdfeos and
#      is delivered without guarantee of any kind.  No support will be 
#      provided to the user of these script.
#
# author:
#	Jason R. Watts / Hughes Aircraft Company
#       Abe Taaheri / Raytheon IIS
# history:
#       26-Jul-1995 JRW Initial version
#       11-Jul-2014 AT  Initial version for hdfeos2
#       1-Oct-2017 AT  updated for new release
#-----------------------------------------------------------------------------


Before starting the test script it is essential that the hdf4 and hdfeos2 are 
installed, and the hdfeos2 and test environments are set correctly. 

To set environment variables:

1. make sure that BRAND is set correctly to linux32, linux64, macintel32, 
   macintel64, sun5.10, sun5.11, cygwin, etc. 
2. Set HDFEOS2_TST_SRC to the testdriver directory where the Common, grid, swath, 
   and point directories are located.
3. Edit hdfeos2_env.csh in HDFEOS2_TST_SRC/Common directory and modify (on the top) path
   for the installed hdf4, hdf5, hdfeos2, hdfeos5, zlib, jpeg, and szip.
4. Save the file, then source it 

It is HIGHLY recommended that the script is used for running the test drivers.
The script will take care of any environment setup and log problems and 
difference files for you.

The test scripts are located in the $HDFEOS2_TST_SRC/Common directory.  The main
script is called 'runTests', (C++ will use 'runTests.cpp') with it you can run 
any hdfeos2 group of drivers in any supported language.  

#-----------------------------------------------------------------------------
If you want to run all of the drivers tests in C++, this is all you need to do:
        
	cd $HDFEOS2_TST_SRC/Common

         runTests.cpp  
#------------------------------------------------------------------------------

If you want to run all of the drivers tests, this is all you need to do:
        
	cd $HDFEOS2_TST_SRC/Common

         runTests  


This will run every test within the $HDFEOS2_TST_SRC directory in both C and 
FORTRAN.  It will start off by telling you what HDFEOS2 groups will be run
and the languages they will run in.  The script looks at the $F77 environment 
variable to determine which FORTRAN language to run.  Making sure that the 
hdfeos2 library was compiled under that version of FORTRAN is the user's 
responsibility.  The script will take some time to run, be aware that if you 
run it more than once it will clean up the previous tests and overwrite any 
old log files.

If you want to run a single tool group or set of specific tool groups in a
particular language you can pass them as command line arguments to the script:

 (C++)  runTests.cpp  grid         - would run the grid tools in C++

	runTests point             - would run the point tools in both C and FORTRAN

	runTests swath f           - would run the swath tools in FORTRAN only

	runTests c grid swath      - would run the grid and swath tools in C only

The ordering of the arguments is NOT important, the script will pick them up no
matter how they are on the command line.  The script will pause for five seconds
while it displays what you're about to run, so if you don't like it you can abort
with a 'CTRL-C'.  

There is a log file generated for each tool group that is run.  It shows each 
driver compilation, execute and UNIX 'diff' instruction.  If there were any 
compilation or runtime problems, they would be logged in there.  The files are
named after the tool group being processed (point.log, swath.log, grid.log, etc.) and
are stored in the $HDFEOS2_TST_SRC/Common directory.

After the tests are run, the script searches through all of the log files and
puts any suspicious string (warning, error, core, etc.) into a general log file,
'log_file_errors'.  The user can quickly view the file and if there were any 
problems, the file will show the log file that had the problem and at what line
number.

After the log files are processed the script will process all the 'diff' files
from the $HDFEOS2_TST_SRC directory on down.  It will report any difference file
that deviated from the expected results into a file called 'diff_file_errors'
in the $HDFEOS2_TST_SRC/Common directory.  The user can view this file and easily
see what tools produced differences.  This DOES NOT mean there are errors, there
WILL BE some differences, here are some examples:

all tools:  Possibly some minor precision differences.

