From ffb80b688a12d4e60ab4be466ec0b3e396bb0078 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Thu, 16 Aug 2018 17:47:31 +0530 Subject: [PATCH] Initial updates to the junitlauncher task manual to explain the fork support --- manual/Tasks/junitlauncher.html | 114 ++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/manual/Tasks/junitlauncher.html b/manual/Tasks/junitlauncher.html index c818f797b..8cf4a2260 100644 --- a/manual/Tasks/junitlauncher.html +++ b/manual/Tasks/junitlauncher.html @@ -438,6 +438,11 @@ Tests can define their own listeners via nested listener elements.

+

+ The fork nested element can be used to run the test in a newly forked + JVM. +

+

testclasses

Define a number of tests based on pattern matching.

@@ -514,6 +519,115 @@ elements.

+

+ The fork nested element can be used to run the tests in a newly forked + JVM. All tests that are part of this testclasses element will run in one single + instance of the newly forked JVM. +

+ +

fork

+ +

Since Ant 1.10.6

+ +Tests launched using the junitlauncher task, by default, run in the same JVM that +initiates the task. This behaviour can be changed using the fork element. +The fork element and its attributes define the characteristics of +the new JVM instance that will be created to launch the tests. + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
dirThe user working directory that will be used for the forked JVMNo
timeoutA value in milliseconds, specifying a maximum duration, the test + running in this forked JVM is allowed to run. If the test runs longer + than this configured value, then the JVM is killedNo
+ +The fork element allows the following nested elements: + +
jvmarg
+

+ Additional JVM arguments may be passed to the forked JVM via the jvmarg elements. + For example: +

+    <fork ...>
+      <jvmarg value="-Djava.compiler=NONE"/>
+      ...
+    </fork>
+    
+

+ +

+ jvmarg allows all attributes described in Command-line Arguments +

+ +
sysproperty
+

+ The sysproperty elements allow passing Java system properties to the forked JVM: +

+    <fork>
+        <sysproperty key="greeting" value="hello world"/>
+    ...
+    </fork>
+    
+

+

+ The attributes for this element are the same as for environment variables +

+ +
syspropertyset
+ +

+ You can specify a set of properties to be used as system properties with + syspropertyset(s) +

+ + +
env
+ +

+ It is possible to specify environment variables to pass to the forked JVM via + nested env elements. For a description of the env + element's attributes, see the description in the exec task. +

+ +
modulepath
+ +

+ The location of Java modules can be specified using the modulepath element, + which is a path-like structure. +

+For example: +
+<fork>
+  <modulepath>
+    <pathelement location="lib"/>
+    <pathelement location="dist/test.jar"/>
+  </modulepath>
+  ...
+</fork>
+
+ +
upgrademodulepath
+ +

+ The location of Java modules, that replace upgradeable modules in the runtime, can be specified + using the upgrademodulepath element, which is a path-like + structure. +

+ +

Examples