Bug 66464 - JUnitLauncher missing jvm option
Summary: JUnitLauncher missing jvm option
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.10.12
Hardware: All Linux
: P2 normal (vote)
Target Milestone: 1.10.14
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-02 19:03 UTC by Filipe Silva
Modified: 2023-03-02 07:37 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Silva 2023-02-02 19:03:17 UTC
JUnit task supports specifying the JVM to use when running the tests in forked mode. This feature does not exist in the task JUnitLaucher.

Unless there's is an alternative I'm missing, I'd say the nested element `fork` should allow specifying a different JVM for running the tests. This would be very useful, for example, for running the same testsuite against different JVMs in a single run.

Thank you.
Comment 1 Jaikiran Pai 2023-02-06 15:15:56 UTC
Hello Filipe,

> Unless there's is an alternative I'm missing, I'd say the nested element `fork` should allow specifying a different JVM for running the tests.

What you note is correct and you didn't miss anything. The fork element currently doesn't have a way to specify an alternate "java" command/location. 

> This would be very useful, for example, for running the same testsuite against different JVMs in a single run.

I think that's a valid point. I'll enhance the fork element in the coming days to help support this.
Comment 2 Jaikiran Pai 2023-03-02 07:37:30 UTC
I've now pushed a commit to upstream which introduces a new optional "java" attribute to the <fork> element of the junitlauncher task. This attribute can be set to point to any "java" command of choice to launch the forked tests.

This will be available in Ant release 1.10.14 (no specific date).