Every process is some process's child except for the very first one.
I'll kill cruisecontrol next week to see if the ec file get generated or
not, and then find ways to work around the issue.
By the way, any idea how emma gets notified of jvm termination event? I
thought that could only be achieved using native code, but emma seems to
be all java.
Cheers,
Cedric
Aaron Kagawa wrote:
No. CruiseControl starts a _separate_ process running tomcat, and
then starts a _separate_ process executing "ant -f emma.build.xml
hackyBuild_Core.emma". In other words, there are 3 _indenpendent_ jvm
running, one for cruisecontrol, one for tomcat, one for ant.
I thought you said subprocess, in your previous email. I thought if
you killed the parent process then things might work.
According to CruiseControl (
http://cruisecontrol.sourceforge.net/main/configxml.html). You should
be able to create an entirely separate process (not a subprocess).
When a build runs, Ant is invoked in a separate Java process. There
are two alternative ways in which ant may be invoked:
1. Using the *antscript*, or *anthome*, attribute (preferred) helps
to ensure that builds are run completely independent of the
CruiseControl distribution, and that extra jars required in the
ant lib-directory need not be duplicated within CruiseControl.
One thing to check, when running under CruiseControl, is the tomcat
window should contain the following println:
EMMA: collecting runtime coverage data ...
11/19 18:10:54 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
11/19 18:10:54 Hackystat: Initializing system.
This indicates that the instrumented byte code is actually made it way
to the server. If you don't see that println on the tomcat window
then the processes aren't the problem.
thanks, aaron
At 05:55 PM 11/19/2005, you wrote:
>> This is probably because the cruisecontrol process never stops. We
probably wouldn't want to do this, but I bet that it would work if we
kill the cruisecontrol process after the emma target is complete.
No. CruiseControl starts a _separate_ process running tomcat, and
then starts a _separate_ process executing "ant -f emma.build.xml
hackyBuild_Core.emma". In other words, there are 3 _indenpendent_ jvm
running, one for cruisecontrol, one for tomcat, one for ant.
Aaron Kagawa wrote:
1. with release version of emma
This is probably because the cruisecontrol process never stops. We
probably wouldn't want to do this, but I bet that it would work if
we kill the cruisecontrol process after the emma target is complete.
2. with latest beta of emma, it is claimed that there is no longer
any need to terminate jvm to get coverage information.
I can confirm that I couldn't get the beta version working either.
At 02:58 PM 11/19/2005, you wrote:
Ok, Mike and I spent 2 days on this one:
Just a summay of what we were doing with emma on hackydev: not good.
1. with release version of emma
Everything is cool when you excute "ant -f emma.build.xml
hackyCore_Build.emma" directly from inside a console window. But
when this is run as a subprocess of cruisecontrol, it seems that
emma never gets notified when tomcat shuts down (more specifically,
jvm termination), thus no "coverage.ec" file is generated.
I think under both scenario, the same win32 api function
(CreateProcess) is called.
2. with latest beta of emma, it is claimed that there is no longer
any need to terminate jvm to get coverage information.
After replacing
<exec executable="cmd.exe" spawn="false">
<arg line="/c shutdown.bat"/>
</exec>
with
<emma>
<ctl connect="localhost:47653" >
<command name="coverage.get" args="mycoverage.ec" />
</ctl>
</emma>
I got
java.lang.IllegalAccessError: tried
to access method
com.vladium.emma.ctl.ctlCommand.tokenize(Ljava/lang/String;Ljav
a/lang/String;Z)[Ljava/lang/String; from class
com.vladium.emma.ctl.ctlTask$comm
andElement
I guess that's why they did not call it release version.
Cheers,
Cedric