Child pages
  • CLM Tools Testing
Skip to end of metadata
Go to start of metadata

CLM Tools Testing

We have tools for testing the various CLM input data file processing scripts in the "models/lnd/clm/testing/tools" directory.

Quickstart to using test_driver.sh for tools testing:

To test the CLM tools for making input files for CLM use the "test_driver.sh" script in "models/lnd/clm/testing/tools".cd models/lnd/clm/testing/tools
./test_driver.sh -i
This then builds and runs the tools tests interactively. It will abort on the first test failure. Test results are put into the file "td.<jobid>.status" with longer test results in "td.<jobid>.log".

Details of using test_driver.sh:

test_driver.sh reads in an ASCII list of tests that give the specific test script to run and the arguments to it as well as a test-id. Tests typically both build and run a CLM tool. Test summaries are then put into the "td.<jobid>.status" file with a simple "PASS" or "FAIL" for each test performed, giving both the testid and a bit longer description. More test details are reported in the "td.<jobid>.log" file which is typically the first place to look for test failures. After examining that file you will see other log files to examine for the specific test that failed.

Help on test_driver.sh:

Like other tools there is a "-help" option, and there is a README file that gives some help on some of the environment variables used with test_driver.sh.cd models/lnd/clm/testing/tools
./test_driver.sh -help
cat README

Different Test lists:

test_driver.sh is setup to only run on a few specific machines (see the header of the script to see the list). For those machines there are lists of testids to run for that particular machine. You can also create your own list of testids as a simple file to run a list of tests for.

To create a new list of tests and run test_driver.sh on it...cd models/lnd/clm/testing/tools$EDITOR testlist
env CLM_INPUT_TESTS=testlist ./test_driver.sh -i

Examining Test Results:

Recommended Operation:

It's recommended that you use the "BL_ROOT" environment variable to compare to another version of the code, that you always use the "-i" interactive option, and that you use the "CLM_SOFF" option so that ALL tests will run instead of stopping on the first one that fails.cd models/lnd/clm/testing/tools

Recommended tools test before making a CLM trunk tag
BL_ROOT=<root_of_CLM_directory_to_compare_results> CLM_SOFF=FALSE ./test_driver.sh -i

Most used Environment Variables useful for test_driver.sh:

  • BL_ROOT - baseline root, this should point to a copy of the source for the version of clm that you want to compare to. The test script will compile and run the baseline to generate results.
  • CLM_INPUT_TESTS list of tests to do rather than the default
  • CLM_SOFF set to either FALSE or TRUE to stop on first failure.

What to do when tests fail:

Looking up expected fail status:

See section above.

  • No labels