Ok, got it.
Wouldn't replacing call to this ant invocation by a Script step in
maven builds with a "touch target/surefire-reports/TEST-dummy.xml"
be enough?
(I'm going to install Hudson locally to give a try)
On 02/16/2012 04:01 PM, Nick Boldt wrote:
If
you run a job which assumes there will be junit/surefire test
reports in the workspace after disabling the tests
(-Dmaven.test.skip), the job will be marked as failing.
The reason this is often useful is that sometimes, we need to skip
tests just to get all the bits to build in the stack. Often, there
are components with long-standing test failures (looking at you,
Maven, ESB, ...) which prevent the automatic firing of downstream
jobs.
So, when I'm babysitting the builds to get out a release to QE (as
I will be this weekend), sometimes I kick jobs w/ tests disabled.
The ant script allows the job to appear to pass even if there are
no test results by generating a fake test results xml file which
Jenkins can happily parse.
---
Since I wrote this script, I've discovered there are other ways to
link jobs together. We are now able to remove this in favour of
just having upstream jobs ALWAYS fire their downstream regardless
of test results [1]. But is that better? Comments to this jira
[2].
[1]
http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Trigger+Plugin
[2] https://issues.jboss.org/browse/JBIDE-10437
On 02/16/2012 04:27 AM, Mickael Istria wrote:
What is the feature provided by this
script? In which context it applies?
I never had trouble to integrate surefire reports in Hudson, and
never
needed a script to do so. What is the added value of this one?
On 02/16/2012 06:40 AM, Nick Boldt wrote:
If you depend on this old Ant script [1]
to generate a dummy JUnit
test results file in Hudson (so that should you temporarily
disable
your tests, the job won't fail), please switch to using this
new,
simpler one [2].
[1]
http://anonsvn.jboss.org/repos/jbosstools/trunk/build/build.xml
[2]
http://anonsvn.jboss.org/repos/jbosstools/trunk/build/results/collect-test-results.xml
The Hudson config change looks like this as a pseudo-diff:
<hudson.tasks.Ant>
<targets>collect.test.results.for.hudson -q -logger
org.apache.tools.ant.NoBannerLogger</targets>
<antName>ant-1.7.x</antName>
-
<buildFile>${WORKSPACE}/build/build.xml</buildFile>
+
<buildFile>${WORKSPACE}/build/results/collect-test-results.xml</buildFile>
</hudson.tasks.Ant>
If I broke your job and you need my assistance, please post
complaints
to this jira:
https://issues.jboss.org/browse/JBIDE-10690
Ultimately, I'd like to remove this script entirely in favour
of
something else (eg., maven) but for now at least the code's
simpler
and will therefore be easier to rewrite.
--
Mickael Istria
Eclipse developer at JBoss, by RedHat
<http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
jbosstools-dev mailing list
jbosstools-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev