On Sep 12, 2008, at 1:58 AM, Adam Murdoch wrote:
Stefan Groschupf wrote:
I'm not sure if I clearly understand what you proposing. But I'm
very concerned here!
It is ok if a open source project is self-confident but you will
win zero users if a project is arrogant. Let your users decide it
it make sense to execute from a project root. (All tools I know do
this, eg eclipse, intellij etc)
Relaying on the project dir structure is a very common use case
for loading test data, resources etc.
To be honest if we need to change all tests that are relay on a
project structure to be able to use gradle, I would prefer a other
build tool.
If a new users tests gradle and no test working any more, than I'm
very sure he will turn around very quick.
I don't think its quite as bad as you image. To get the maven
behaviour you can either:
- run your tests in fork mode:
test.options.fork()
- set the user.dir property before you run the tests:
test.doFirst { System.setProperty('user.dir',
projectDir.absolutePath }
We could even make fork mode the default for tests.
I have just realized that this is not the case right now. I think we
definitely should make fork the default. First of all not for Maven
compatibility but for providing a clean sandbox to the tests. In
particular if the tests work with system properties. Should we have
as the default fork mode once or perTest? perTest is the more
reliable one. I'm not sure if the performance penalty is significant
for Java tests. If your tests are written in Groovy this is
significant (therefore the Gradle build uses the once mode).
I have filed a Jira: http://jira.codehaus.org/browse/GRADLE-217
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email