aboutsummaryrefslogtreecommitdiff
path: root/make/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml35
1 files changed, 35 insertions, 0 deletions
diff --git a/make/build.xml b/make/build.xml
index 01410947..c90cdd6f 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -46,6 +46,16 @@
<available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
<!-- check if testng.jar is avaiable -->
<available property="testng.available" file="${file.reference.testng.jar}"/>
+ <!-- check if Jemmy ang testng.jar are avaiable -->
+ <condition property="jemmy.jfx.testng.available" value="true">
+ <and>
+ <available file="${file.reference.jemmyfx.jar}"/>
+ <available file="${file.reference.jemmycore.jar}"/>
+ <available file="${file.reference.jemmyawtinput.jar}"/>
+ <available file="${file.reference.jfxrt.jar}"/>
+ <isset property="testng.available"/>
+ </and>
+ </condition>
<!-- enable/disable make code coverage -->
<condition property="cc.enabled">
@@ -351,6 +361,31 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" {
</java>
</target>
+ <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
+ <echo message="WARNING: Jemmy or JavaFX or TestNG not available, will not run tests. Please copy testng.jar, JemmyCore.jar, JemmyFX.jar, JemmyAWTInput.jar under test${file.separator}lib directory. And make sure you have jfxrt.jar in ${java.home}${file.separator}lib${file.separator}ext dir."/>
+ </target>
+
+ <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
+ <fileset id="test.classes" dir="${build.test.classes.dir}">
+ <include name="**/framework/*Test.class"/>
+ </fileset>
+
+ <copy file="${file.reference.jfxrt.jar}" todir="dist"/>
+
+ <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
+ verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
+ <jvmarg line="${ext.class.path}"/>
+ <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+ <propertyset>
+ <propertyref prefix="testjfx-test-sys-prop."/>
+ <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
+ </propertyset>
+ <classpath>
+ <pathelement path="${testjfx.run.test.classpath}"/>
+ </classpath>
+ </testng>
+ </target>
+
<target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
<fileset id="test.classes" dir="${build.test.classes.dir}">
<include name="**/framework/*Test.class"/>