RFR: 7903738 : jtr.xml logs produced with -xml argument do not contain compilation failure justification

andrlos duke at openjdk.org
Tue Oct 8 15:58:11 UTC 2024


On Mon, 7 Oct 2024 11:12:20 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> jtr.xml files generated while using -xml flag don't contain any info about why the compilation failed although the info is present in jtr files. This can be solved by looking for the compilation failure in case there is no main section -> the main has not been executed -> failure occurred during compilation
>
> Hello @andrlos, do you have an output from the XML file which shows the difference in the output, before and after this change?

@jaikiran 

before:


<testcase classname="compileFail/test/CompileFail.java" name="CompileFail" time="0.438" >
    <failure type="Failed.">
Compilation failed: Compilation failed
</failure>
    </testcase>


after:

<testcase classname="compileFail/test/CompileFail.java" name="CompileFail" time="0.441" >
    <failure type="Failed.">
Compilation failed: Compilation failed
</failure>
    </testcase>
    <system-out>    </system-out>
    <system-err>/home/jandrlik/andrlosFork/fork2/jtreg/mytests/compileFail/test/CompileFail.java:13: error: class CompileFail1 is public, should be declared in a file named CompileFail1.java
public class CompileFail1
       ^
1 error
/home/jandrlik/andrlosFork/fork2/jtreg/mytests/compileFail/test/CompileFail.java:13: error: class CompileFail1 is public, should be declared in a file named CompileFail1.java
public class CompileFail1
       ^
1 error
/home/jandrlik/andrlosFork/fork2/jtreg/mytests/compileFail/test/CompileFail.java:13: error: class CompileFail1 is public, should be declared in a file named CompileFail1.java
public class CompileFail1
       ^
1 error
/home/jandrlik/andrlosFork/fork2/jtreg/mytests/compileFail/test/CompileFail.java:13: error: class CompileFail1 is public, should be declared in a file named CompileFail1.java
public class CompileFail1
       ^
1 error
/home/jandrlik/andrlosFork/fork2/jtreg/mytests/compileFail/test/CompileFail.java:13: error: class CompileFail1 is public, should be declared in a file named CompileFail1.java
public class CompileFail1
       ^
1 error
    </system-err>

-------------

PR Comment: https://git.openjdk.org/jtreg/pull/229#issuecomment-2400232983


More information about the jtreg-dev mailing list