On Fri, Jul 18, 2014 at 10:28 AM, KARR, DAVID <dk0...@att.com> wrote:
> > I’m seeing a new failure symptom this morning. This is what I’m running: > > gradle :integTest:integTest --tests org.gradle.integtests.samples. > UserGuideSamplesIntegrationTest –info > > This is failing with: > > org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > > initializationError FAILED > > java.lang.AssertionError: Couldn't find any samples. Most likely, > samples.xml was not generated. > > Please run 'gradle docs:userguideDocbook' first. Expression: > assertion. Values: assertion = false > > I’ve tried running both “gradle docs:userguide” and “gradle > docs:userguideDocbook” before this, but it makes no difference. I even > tried the latter with “—rerun-tasks”. I also looked for a “samples.xml” > and found this: > > % ls -lt ./subprojects/docs/build/src/samples.xml > > -rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 > ./subprojects/docs/build/src/samples.xml* > > > > However, this file is essentially empty: > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > > <samples/> > > At this point, I did a “gradle clean” and then verified that the > “samples.xml” file was gone. I then reran “docs:userguide” and then > inspected the resulting “samples.xml” file. It was over 60k bytes, but I > didn’t inspect the file. I then reran my integTest run. It failed in the > same way. I then reinspected the “samples.xml” file, and it appears that > the integTest run actually changed that file back to the almost empty > version. > I seem to recall hitting something similar at one stage, but I didn't investigate further. IIRC there was a bug in our build logic that meant the order that tasks were run in was important. Following your lead, I can confirm this is an issue. To reproduce run: ./gradlew clean ./gradlew :docs:userguide ./gradlew :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest It seems like something is clearing the samples.xml file early in the integTest run, but the :docs:userguideDocbook task is considered UP-TO-DATE so it doesn't regenerate it.If you wanted to dig deeper to see exactly which tasks are causing this problem, it would be most appreciated. Even to just know the minimal set of tasks that trigger this condition would help. Thanks -- Darrell (Daz) DeBoer http://www.gradleware.com