Paul: i can't reproduce the problem you describe..
> Also, in contrib/surround ant test fails, ...
using this patch, i see all (65) tests (in 3 test classes) in the org.apache.lucene.queryParser.surround.query package pass regardless of whether I run "ant test" from the top level, or from contrib/surround ... can you attach a log of exactly hat you're doing when you get failures?
I'm also not sure i understand your question...
> What is the preferred way to run the unit tests for a single contrib?
> From the trunk build.xml or from the contrib/*/build.xml ?
....from the main build.xml, "ant test-contrib" will run the tests for all constribs ... if you only want to run test for an individual contrib, the only way i know to do that is from the contrib's directory ... your question of "preferred" way suggests there is another way to run tests for a single contrib, and i'm not sure what you're referring to.
One final note: testing this patch on a differnet computer today, i'm getting some additional contrib test errors in org.apache.lucene.gdata.server.registry and org.apache.lucene.gdata.servlet.handler (i thought i was using 1.5 yesterday but perhaps not). still need to investigate if these are legitimate code failures, or problems triggered by how the tests are run.