RFR: 7903981: Support easy way to use current class name for test actions [v4]
Christian Stein
cstein at openjdk.org
Wed Apr 9 08:30:07 UTC 2025
On Tue, 8 Apr 2025 18:52:10 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> src/share/doc/javatest/regtest/tag-spec.html line 1255:
>>
>>> 1253: <td><code>test.main.class</code>
>>> 1254: <td><i>Not Available</i>
>>> 1255: <td>The computed name of the main entry-point of the current Java source file.
>>
>> Might be add notes that
>> 1) packages are supported, based on package line
>> 2) inner classes are not supported
>> 3) the test fails during execution if ${test.main.class} is not found or doesn't have main() method.
>> It is just a suggestion, please update as you think it would be better. No need to overload users with info.
>
> The error message produced when the executable can't be found should be very helpful.
> Not specific to .java or the smart tag though.
>
> On a similar typo, I got.
> `TEST RESULT: Error. can't find FilePermissionTestX in test directory or libraries`
> If it is a class name, it would be useful to say its a "class".
Refined the documentation. A more helpful error message would require a deeper knowledge of the setup at the time of the name computation. It is up to the test author to either specify a hard-coded fully-qualified class name as of now; or ensure the heuristic based on the file name is matched.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/257#discussion_r2034776156
More information about the jtreg-dev
mailing list