next up previous contents
Next: 4 Project Structure Up: JOTM Test Suite Guide Previous: 2 Installing Test Suite   Contents


3 Ant Commands

JOTM and its test suite rely on Ant for its build process.
All Ant commands are to be typed in the tests/ directory (i.e. in the same directory than the build.xml file).
To have a list and descriptions of all Ant available targets for JOTM Test suite. type:

$ ant -projecthelp

3.1 Compile and build JOTM Test Suite

If you've retrieved JOTM from a source package or from CVS, you'll need first to create a distribution of JOTM. To do so, type

$ cd <JOTM source directory>
$ ant dist
This will create a distribution of JOTM in the output/dist/ directory.
Then you can compile the test suite: in the test/ directory (which in CVS is at the same level as the jotm/ directory), type
$ cd <JOTM Test Suite directory>
$ ant dist
JOTM Test suite expects to find a JOTM distribution in the ../jotm/output/dist/ directory (which is the case if you're using CVS). If you got JOTM from a source or a distribution package, you may need to set the correct path in the file with the jotm.dist property.
If Ant can't find a JOTM distribution thanks to the jotm.dist, it'll alert you by a message and do nothing:
 [echo] JOTM distribution directory has not been found!
 [echo] In, it has been set to <jotm.dist property value>
 [echo] Maybe you've set it to an incorrect directory
 [echo] or you've not built a JOTM distribution yet.
In that case, you'll have to double check your settings before building and running the test suite.

3.2 Run JOTM Test Suite

Once you have a distribution of the Test Suite, you can run the tests by typing in the test/ directory

$ ant runtest
All tests will be run both on RMI/JRMP and RMI/IIOP.
At the end of the test run, reports will be written in the output/dist/reports/ directory (see Test reports).

In the output generated by Ant, you'll notice the following message:

 [java] Timeout: killed the sub-process
 [java] Java Result: -113
This message is not an error message: it comes from the fact that the name server (either rmiregistry or tnameserv) is started from Ant and there is no other way to stop it than to tell Ant to destroy it after the expiration of a given timeout.

3.3 Generate Javadoc

To generate Test Suite Javadoc, in the test/ directory, type

$ ant jdoc
Generated Javadoc will be put into the output/dist/jdoc/ directory.

3.4 Generate Documentation

JOTM Test Suite documentation is written in LaTeX.
We use pdflatex tool to generate PDF files and latex2html to generate HTML files. Since these two tools may not be installed on your system, it's up to you to inform Ant that it'll have the tools to perform document generation.
PDF (resp. HTML) generation is triggered by pdflatex (resp. latex2html) property on the command line. What's more, for HTML generation a shell script, doc2html, is used. So for the moment, you can generate HTML documentation only from Linux. Sorry... (Anyway, documentation is still available online at in both PDF and HTML format).

Of course, you can also do both

$ and doc -Dpdflatex=1 -Dlatex2html=1
Generated documentation will be put into the output/dist/doc directory.

3.5 Clean JOTM Test Suite

To remove files generated during compilation or build process, type:

$ ant clean
You'll start from a clean working directory again.

next up previous contents
Next: 4 Project Structure Up: JOTM Test Suite Guide Previous: 2 Installing Test Suite   Contents
Jeff Mesnil 2003-07-30