Vladimir,
I reproduced the problem hastily hacking report generation, see my
command line below. For the whole test run a build status correctly
evaluates to BUILD FAILED when junit tasks crash. So probably nothing
should be done for now.
$ ant -f make/build-test.xml full-report
Buildfile: make\build-test.xml
full-report:
[junitreport] [Fatal Error] :-1:-1: Premature end of file.
[junitreport] The file C:\Users\af\ws_harmony\4\classlib\trunk\build\test_report
\TEST-javax.print.ServiceUITests.xml is not a valid XML document. It is possibly
corrupted.
[junitreport] [Fatal Error] :-1:-1: Premature end of file.
[junitreport] The file
C:\Users\af\ws_harmony\4\classlib\trunk\build\test_report\TEST-org.apache.harmony.luni.tests.java.lang.ThreadTest.xml
is not a valid XML
document. It is possibly corrupted.
[junitreport] the file
C:\Users\af\ws_harmony\4\classlib\trunk\build\test_report\TESTS-TestSuites.xml
is not a valid testsuite XML document
[junitreport] Transform time: 160074ms
[echo] The test report is in
C:\Users\af\ws_harmony\4\classlib\trunk\build\test_report\html\index.html
BUILD SUCCESSFUL
Total time: 4 minutes 58 seconds
--
Thank you,
Alexei
On 11/29/06, Alexei Fedotov <[EMAIL PROTECTED]> wrote:
Vladimir,
From my perspective detecting crashes during a test run of class
library tests is quite important:
* Stress loads and rare execution paths lead to VM crashes which
should be fixed if we could modify VM code base or avoided by means of
a workaround.
* Harmony class library contains a fair amount of native code. The bug
in native code usually leads to a crash, and class library tests
should guarantee we detect this problem early.
I think this is a good requirement to the build system, and it is
timely requirement since another thread is discussing changes in a
test launch procedure right now [1].
I can reproduce the issue you are describing. Ant prints warnings
about corrupted XML, but doesn't report failed status. The code [2]
shows we cannot expect more from the latest ant implementation. We
either need to fix ant, or double check for corrupted XML reports.
I've examined a double check at [3]. Do I understand correctly that
<antcall target="check-crashes" /> actually should call <target
name="check-length">? Is it possible to replace a message "crash?"
with actual VM crash log?
1.http://mail-archives.apache.org/mod_mbox/harmony-dev/200611.mbox/[EMAIL
PROTECTED]
2.http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java?view=markup
3.http://issues.apache.org/jira/browse/HARMONY-2349
--
Thank you,
Alexei
On 11/28/06, Vladimir Ivanov <[EMAIL PROTECTED]> wrote:
> Issue 2349 was created to handle this problem. Could somebody review it?
> thanks, Vladimir
>
>
> On 11/23/06, Vladimir Ivanov <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I want to discuss one issue: we have a little bit unstable runtime and
> > sometimes test run leads to the VM crash. It is not a good but an one worse
> > thing that the build status will be reported as "successful" in this case.
> > It is happen because the test result file is empty and just ignore when the
> > junit prepare the final report.
> >
> > It is should be fixed.
> >
> > Which way to fix it more preferable:
> >
> > - extend the junit task to verify size of report file (for fork=yes
> > mode);
> >
> > - prepare the special task to find all zero-length or missed report files
> > (run after all tests);
> >
> > - prepare small scripts to verify reports and run them through the
> > 'exec';
> >
> > - something else?
> >
> >
> >
> > thanks, Vladimir
> >
>
>