[Biojava-l] Unit tests
Keith James
kdj@sanger.ac.uk
14 May 2001 20:53:08 +0100
>>>>> "Matthew" == Matthew Pocock <mrp@sanger.ac.uk> writes:
Matthew> Cool Keith. Is there any way to get ant to put the test
Matthew> & src files into seperate build directories? That way the
Matthew> resulting biojava.jar can trivialy not contain any test
Matthew> code.
Okay, I re-jigged things a bit and made the src and test completely
parallel:
biojava-live/src/org/biojava/*
biojava-live/tests/org/biojava/*
ant-build/src/main/org/biojava/*
ant-build/src/tests/org/biojava/*
ant-build/classes/main/org/biojava/*
ant-build/classes/tests/org/biojava/*
The dist is built only from the main path and ends up in the same
place as before. I've checked cleaning, compiling, testing & building.
As >= Ant 1.3 is required for native JUnit support the build checks
for it and then for JUnit. If you do 'ant runtests' without one of
these then things still proceed gracefully.
I've set the dist target to depend on init, package, runtests and
javadocs. If this is a problem, the tests dependecy can be removed,
but I think it would be defeating the purpose a bit ;)
I can commit this at any time. Perhaps people would prefer that I
posted the build.xml first? It should work on all systems
(i.e. degrade gracefully with Ant < 1.3 and no JUnit) though.
--
-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA