next up previous contents
Next: Special Considerations Up: progman Previous: Documentation   Contents


Creating New Test Cases

The PSI3 test suite is designed to maximize code reuse and provide testing in $prefix before the PSI3 executables have been installed. The configure script in $PSI3 will take all the necessary files in $PSI3/tests with the .in stub: Makefile.in, MakeRules.in, MakeVars.in, and runtest.pl.in, replace variables with system specific parameters, and copy/create the testing files and directories in $prefix/tests. The tests should be run in the object directory before installation.

If you have just added a new module for performing, say multireference coupled cluster, and you would like to add a test case to the current test suite, here is what you should do.

  1. Copy one of the existing test case directories to an appropriately named directory for the new test case.

  2. Create an appropriate input file for running the new module. Then, if your program produced the correct data, rename the output files to *.ref. Follow the convention of the existing test cases.

  3. If the test case is small, add the directory name to the list in $PSI3/tests/Makefile.in. If the test is particularly tricky, see the psi_start or rhf-stab test cases as an example.

  4. All the testing functionality is located in the perl library runtest.pl.in. If you are testing for a quantity that is not searched for currently, then add a function to the library following the format of the functions already available. If you have added functionality to the PSI3 driver, make sure to update the appropriate functions in runtest.pl.in.

  5. Add the location of the Makefile for the new test case to the configure script in $PSI3.

Please contact one of the authors of PSI3 before making any major changes or if you have a problem adding a new test case. Remember, if all else fails, read the source code.


next up previous contents
Next: Special Considerations Up: progman Previous: Documentation   Contents
sherrill 2008-02-13