Peter Voss wrote:
Hi,
I have 2 projects "main" and "integration-tests". When I run "gradle
test" the integration tests are always run before the unit tests in
main are executed. This is not the behavior I like. I want to run the
unit tests first and if they fail there is no point running the
integration tests (which take much longer).
I couldn't find any good way to change that order (other than renaming
the projects). Adding a dependency from :integration-tests:test to
:main:test is also not what I want. When executing "gradle
:integration-tests:test" I want to run only the integration tests (and
all required artifacts to execute them). Also running the tests from
main would not be required to run the integration tests.
Is there a way to set the execution order of tasks from different sub
projects without using dependencies?
Not yet.
You can probably work around this with something like:
task testsInAGoodOrder {
dependsOn ':main:check', ':integration-tests:test'
}
There's a few options for fixing this problem. One option is for Gradle
to understand that certain types of tasks, such as Test or Checkstyle,
are verification tasks, and to take this into account when scheduling
the tasks. It would schedule verification tasks as early as possible in
the build, and would schedule them in fastest-first order (subject to
dependencies), which would give the earliest possible feedback of a
breakage.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email