Testing PLplot

From PLplotWiki
Revision as of 19:33, 10 January 2009 by Airwin (Talk | contribs) (Build tree tests)

Jump to: navigation, search

We encourage those who build PLplot to test both their build-tree version and their install-tree version and report any problems back to either the plplot-general or plplot-devel mailing lists.

Build tree tests

Build-tree tests may be done by changing directory to the top level of the build tree (the directory where you invoked the make command that built PLplot) and invoking the "ctest --verbose " command. The tests run by this command consist of executing all our 31 standard examples for all language interfaces and non-interactive device drivers that we currently support. This is a truly comprehensive test of the PLplot build. For example, our standard examples exercise virtually all of the PLplot API. Furthermore, this series of tests generates more than 2GB of plot files in various formats in the plplot-test subdirectory of the top-level of the build tree. The last test run by ctest is a comparison of PostScript (-dev psc) results and stdout from each language interface to PLplot with the corresponding results for C. In general, these results are identical which is a stringent test of our language bindings. Test the results not generated by -dev psc by viewing them with a viewer appropriate for each particular file type that is generated. Note, these tests of the PLplot build can only be performed if cmake is invoked with the -DBUILD_TEST=ON option (which roughly doubles the build time because all the examples must be built).

Install tree tests

After PLplot has been configured (with "cmake"), built (with "make"), and installed (with "make install"), you can test the PLplot install on Unix systems by doing the following commands:

cp -a $prefix/share/plplot$plplot_version/examples /tmp
cd /tmp/examples
make test >& make_test.out
make test_interactive

where "$prefix" is the installation prefix chosen at the configuration stage, and $plplot_version is the PLplot version (currently 5.9.2). The effect of the above "cp" and "cd" commands is to copy the examples subtree of the install tree to /tmp and build and test the examples in the copied subtree to keep a clean install tree. However, an alternative is to replace those two commands with

cd $prefix/share/plplot$plplot_version/examples

and build and test the install-tree examples right in the examples subtree of the install tree with the above "make" command.

Regardless of whether you build and test the examples in a copy of the examples subtree of the install tree or directly in that subtree, check all the *.out files for any errors.

N.B. the above "make test" command does the same tests for the installed PLplot version as ctest does for the build-tree version of PLplot so the same remarks hold about the comprehensive nature of the test, the size (2GB) of the files produced, the comparison of results for various language interfaces with the C result for -dev psc, and testing non-psc results using the viewer appropriate for the format. Although the tests are the same, the Makefile implementation is different from the ctest implementation in the build tree so that in particular you can do these install tree tests in parallel using the (GNU-)make -j option to greatly speed up these tests on a multi-processor computer.

N.B. the above "make test_interactive" command executes our interactive examples. There is currently no counterpart for this test in the build tree.