ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: AW: Ant+Ivy session at Apache Barcamp
Date Mon, 08 Nov 2010 16:27:19 GMT
On 11/8/10 9:49 AM, Jan Matèrne wrote:
>> I would assume that if dependencies between targets are properly set,
>> and if it happens that the target dependency graph have two separates
>> branch which are merging at some point, Ant would then be able to run
>> those two separates branches in different threads, right ?
>> I doubt there would be much improvement too with that kind of
>> parallelism, most of the target graphs I have seen are quite linear:
>> running test requires tests to be compiled, which requires the main
>> java to be compiled, which requires an ivy resolve.
>> When I saw real benefit of parallelism is when there are several
>> different projects to build, like within hudson, which is kind of out
>> of scope of ant itself (but maybe a fit in for EasyAnt :) ).
> The ParallelExecutor in the sandbox
> - sees each target as a building block which can be run in parallel
> - starts each target if all prior targets (depends-attribute) have finished
> Jan
Where I am working we are using a custom task to run JUnit and Selenium
tests in parallel.
This task is delegating to the <parallel/> task of ant, and either
creating one parallel subtask for each test suite,
or using an algorithm to group the test suites in sets taking
approximatively the same total time to run,
based upon stats of the previous run (from the file generated by
junitreport called TESTS-TestSuites.xml).

This way we are able to run 10 hours worth of JUnit test suites in one
hour, and 4 hours worth of selenium UTs in 40 minutes.

Our ant task is not implemented as an extension of the <junit/> ant
task, but fires a macro for each suite or group of suites, so it is only
loosely coupled with JUnit. Would such a design be desirable if this
task was contributed in ant ?

Concerning the builds, as Nicolas wrote, most of the improvement has to
come from the continuous integration server (CruiseControl where I
work). This is because we made the choice to create one CruiseControl
project for each RAD (Eclipse) project in our J2EE application.

If we had chosen to make one CruiseControl project running several ant
build files, then maybe we would have needed a parallel subant where the
build order is given by ivy inter-module dependencies, and also where
what is allowed to run in parallel with what would be also given by ivy.
Developing such a task would make sense. In fact Maven 3 has this built
in (building a multi module project with parallel threads).



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message