Testing PLplot

From PLplotWiki
Revision as of 17:04, 10 January 2009 by Airwin (Talk | contribs) (New page: PLplot can be tested both in the build tree and the install tree. === Build tree tests === Build-tree tests may be done by changing directory to the top level of the build tree (the dire...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PLplot can be tested both in the build tree and the install tree.

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) and invoking the "ctest" command. Note, these ctests 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 installed tree on Unix systems with the following commands:

cp -a $prefix/share/plplot$plplot_version/examples /tmp
cd /tmp/examples
make >& make_examples.out
./plplot-test.sh >& plplot_test.out

where "$prefix" is the installation prefix chosen at the configuration stage, and $plplot_version is the PLplot version (currently 5.9.0). 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" and "./plplot-test.sh" commands.

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. Check that the large number of postscript files generated by plplot-test.sh look good with a postscript viewer. Also, use the --help option to ./plplot-test.sh to see additional options to test your PLplot install for devices other than the default psc device.