RFR: 7903981: Support easy way to use current class name for test actions [v4]
Christian Stein
cstein at openjdk.org
Wed Apr 9 06:07:56 UTC 2025
On Tue, 8 Apr 2025 18:45:28 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Christian Stein has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Base main entry-point name computation on file name
>
> test/smartActionArgs/optAuto/p/Test3.java line 35:
>
>> 33:
>> 34: public class Test3 {
>> 35: private static final boolean expectDollar = false; // opt-auto, i.e. in
>
> What is this for?
Will be removed.
> test/smartActionArgs/optAuto/p/Test3.java line 47:
>
>> 45: case "--test.src":
>> 46: case "--test.classes":
>> 47: case "--test.class.path":
>
> Command line options with "." look pretty odd, they can be mistaken for source files.
> Typically, the embedded delimiter is "-" (hyphen). Though jtreg may have its own convention.
>
> The command line (@run) for the test only checks the first of these.
The `Test3.java` file is an almost 1:1 copy of the existing `Test.java` file in the parent directory. The conventions and assertions are inherited; with their original reasoning.
As those aren't interesting here, I'll reduce the logic of this new test to an empty `main()` method block. We only care for the correct expansion of `${test.main.class}` resulting in invoking the associated program.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/257#discussion_r2034509364
PR Review Comment: https://git.openjdk.org/jtreg/pull/257#discussion_r2034509167
More information about the jtreg-dev
mailing list