Build.xml compile-test target bugs

I tried to run the test cases for smack and found a few errors in the compile-test target. At least I think that this are errors, but since my ant fu is not strong and at least a ffew people seem able to run the cases I am not sure if it’s really an error within build.xml on my end. On the other side I have a pretty standard linux/jdk setup, and was unable to run ‘ant test’ right ahead on a fresh svn checkout.

I am pretty sure that the location for xmlunit.jar is wrong, as the file is located in ‘build/build’ and not ‘build/’. Not sure how this could work somewhere else. Maybe somebody with more ant knowledge can share some insight.

Flow
0001-Fixed-compile-test-target-Added-missing-sources-path.patch.zip (930 Bytes)

I always run the unit tests from my Eclipse workspace. You are correct about the location of the xmlunit.jar, the ant script is definitely out of date with the current workspace.

There are a couple of problems with the testing setup that I could see after a quick look last night. For one, there doesn’t seem to be anything to distingquish between unit and integration tests. The current test target appears to be trying to run the integration tests, whereas I believe it should in fact be the unit tests.

The integration tests require a server to be running, with appropriate user accounts or the ability to create them on demand. This should be a target on its own.

I won’t get a chance to fix it soon as what free time I have is currently going towards Openfire, until we get a couple of bugs resolved there that are holding up its next release. I am also not the most ant savvy either, so maybe it is only trivial to fix this, but I don’t know without a more indepth look.

IIRC there is not distinction between unit and integration tests in the build.xml. But commiting my patch won’t make things worse.

Not sure how one could build a server target in smack’s build.xml. Wouldn’t that need a depency on openfire (or any other XMPP server)?

Oh and what’s more imporant for me (and sure also for others): How do you configure eclipse to run smack’s junit (integration and unit) tests? Is this documented somewhere?

Combined your patch with work I already had done. Fixed the compile-test target and added a test-unit target.

Committed under SMACK-392.