Peanut gallery sez: Can we use an ant "outofdate" to just generically guard rerunning this rule?
On Fri, Oct 23, 2009 at 3:01 PM, <[email protected]> wrote: > > Reviewers: Ray Ryan, > > Description: > Description: > =========== > Our ant test targets run in parallel, and they all depend on compile and > compile.tests. Ant is not smart enough to only run the depends targets > once, so its possible to compile these targets multiple times, even in > parallel. This can lead to weird errors and increases test time. > > Fix: > === > We set a property to ensure we only compile once for the main test > targets, not for the subtargets that run in parallel. We already do > this for "ant test", but there are other "top level" targets such as > "ant test.htmlunit" that run subtargets in parallel. > > > Please review this at http://gwt-code-reviews.appspot.com/86802 > > Affected files: > user/build.xml > > > Index: user/build.xml > =================================================================== > --- user/build.xml (revision 6456) > +++ user/build.xml (working copy) > @@ -471,6 +471,10 @@ > <target name="test.htmlunit" > depends="compile, compile.tests" > description="Run all HtmlUnit tests"> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <property.ensure name="distro.built" location="${gwt.dev.staging.jar}" > message="GWT must be built before performing any tests. This can > be fixed by running ant in the ${gwt.root} directory." /> > <limit failonerror="true" hours="${test.timeout}"> > @@ -489,6 +493,10 @@ > <target name="test.dev" > depends="compile, compile.tests" > description="Run dev-mode tests for this project."> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <limit failonerror="true" hours="${test.timeout}"> > <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" > threadCount="${gwt.threadCount}"> > @@ -506,6 +514,10 @@ > <target name="test.web" > depends="compile, compile.tests" > description="Run web-mode tests for this project."> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <limit failonerror="true" hours="${test.timeout}"> > <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" > threadCount="${gwt.threadCount}"> > @@ -523,6 +535,10 @@ > <target name="test.emma" > depends="compile, compile.tests" > description="Run emma tests for this project."> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <limit failonerror="true" hours="${test.timeout}"> > <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" > threadCount="${gwt.threadCount}"> > @@ -540,6 +556,10 @@ > <target name="test.draft" > depends="compile, compile.tests" > description="Run draft compiled tests for this project."> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <limit failonerror="true" hours="${test.timeout}"> > <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" > threadCount="${gwt.threadCount}"> > @@ -557,6 +577,10 @@ > <target name="test.nometa" > depends="compile, compile.tests" > description="Run -XdisableClassMetadata tests for this project."> > + <!-- Prevent compilation for every target. --> > + <property name="compile.complete" value="true"/> > + <property name="compile.tests.complete" value="true"/> > + > <limit failonerror="true" hours="${test.timeout}"> > <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" > threadCount="${gwt.threadCount}"> > > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
