Cool. Glad to hear that there wasn't a bug in Emma.
>Remember that tomcat and cruisecontrol are two different OS processes.
The only possible explanation is that Windows knows that one is a
subprocess of the other.. Right? Maybe there is a bug in Emma or Java, in
that the Runtime shutdown hook thinks its waiting for the parent process
instead of subprocess.
If I'm making any sense... then a good test is to try to duplicate the
problem with a simple batch file. For example,
- fire up a batch file that starts tomcat, by calling tomcat's startup.bat
- run ant -f emma.build.xml hackyCore_Build.emma, which shuts down tomcat
(i think)
- check if that created the coverage.ec file.
- if not then close the first batch file, and check for the coverage.ec file.
Or maybe its the owner (user name) of the process.
Anyway.. I've probably just demonstrated my lack of knowledge of operating
systems. :)
Anyway, I solve the problem by using two installation of jvm (not very
elegant).
Just curious how does two JVMs solve the problem? I mean why would we need
one JVM with emma and one without?
thanks, aaron
At 05:19 PM 11/21/2005, (Cedric) Qin ZHANG wrote:
Hi,
It turns out emma is waiting for cruisecontrol to terminate. Answering my
previous question, the jvm shutdown hook is added through
Runtime.addShutdownHook (java 1.3. or later).
The thing I don't quite understand is that why emma is waiting for
cruisecontrol to terminate. It should wait for tomcat to shutdown (which
we already did that in the ant script). Remember that tomcat and
cruisecontrol are two different OS processes.
Anyway, I solve the problem by using two installation of jvm (not very
elegant).
The first installation of jvm is normal one, without emma in its lib/ext.
It runs all nightly build tasks except emma.
Then I use the second installation of jvm (with emma in its lib/ext) to
run "ant -f emma.build.xml hackyCore_Build.emma", and copy emma report to
hackydevsite.
The result is at
http://hackydev.ics.hawaii.edu/hackyDevSite/configurationBuildReport.do?year=2005&month=11&day=21&configuration=Hackystat-All
Note that I am only testing with hackyCore_Build and Kernel. (I will
reformat emma summary later).
The full system build will happen midnight, let's cross our fingures and
hope it goes through.
Cheers,
Cedric