Thank
you for your answer Jeffrey.
This
task allows you to call a task and return certain properties from this outside
task. This way I return the failonerror and failonfailure to be able to decide
when to fail the tests.
Any other ideas would be greatly
appreciated.
So the problem
is how can you indicate that the tests failed w/out failing the build
right?
Seems you could
probably return the pass/fail status of the tests in a file, and then check
that file after you shut down jboss.
Jtf
Hi,
Thank you for your answer but unfortunately, I
cannot do the:
<junit haltonfailure="off" failureproperty="test.failed"
...>
<stopjbosstask>
<fail if="test.failed" message="one or more tests failed"
/>
process.
The reason being that my "application" build does
not launch and stop jboss. It is the cruisecontrol build that I made
which calls it. Therefore the build that is launched by
cruisecontrol looks like:
<ant build="appbuild.xml"
target="junit.task">
<stopjbosstask>
Inside this
"junit.task", I do set the property for the haltonfailure and haltonerror so
that I can generate the reports before failing the build. But still
the "ant" call will return "failed" and therefore it never reaches the
<stopjbosstask>.
Any other ideas
would be greatly appreciated. Does anyone know why cruisecontrol waits
for jboss to be closed (I'm not using parallel ant tasks by the
way)?
Thank
you,
François
>>
Why does it hang when launched from
cruisecontrol?
What if you try running it with the same
command-line that CC uses?
>> How can I avoid
this?
It would be something like:
<junit haltonfailure="off"
failureproperty="test.failed" ...>
<stopjbosstask>
<fail if="test.failed" message="one or more
tests failed" />
Jtf
Hello,
I am
encountering a very annoying problem.
Here is a
short resume of what the build that cruisecontrol launches
does:
-
compile
- compile
tests
- stop jboss
(in case still running)
- launch
jboss
- run
tests
- stop
jboss
If the tests
fail during the build, cruisecontrol hangs. It is waiting for
jboss to be shutdown but the build doesn't reach the shutdown of jboss
since it fails before. If I manually kill the appserver (when it
is hung) it will resume and complete successfully.
If I launch this task manually (eg: ant -f build-SAGE.xml
-Dbuild.properties.file=../sage.properties") everything is fine and the
build completes (fails but completes) even though jboss is still
running.
Why does it hang when launched from cruisecontrol? How
can I avoid this?
Thank
you,
François
PS: Here is
the command in the config.xml of cruisecontrol:
<ant
buildfile="build-SAGE.xml"
target="all"
uselogger="true"
usedebug="false"
antscript="C:\Java\ant\bin\ant.bat">
<property name="build.properties.file"
value="../sage.properties"/>
</ant>
|