<?xml version="1.0" encoding="UTF-8"?> <project name="JOGLTest" basedir="." default="all"> <description>JUNIT Tests JOGL</description> <property name="gluegen.basename" value="gluegen" /> <!-- if differs, ie jenkins jobname, must be set properly first --> <property name="jogl.basename" value="jogl" /> <!-- if differs, ie jenkins jobname, must be set properly first --> <echo message="gluegen.basename: ${gluegen.basename}"/> <echo message="jogl.basename: ${jogl.basename}"/> <import file="build-common.xml"/> <taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath> </taskdef> <!-- ================================================================== --> <!-- - Declare all paths and user defined variables. --> <target name="declare.common" description="Declare properties" depends="common.init"> <property name="rootrel.src.test" value="src/test" /> <property name="src.test" value="${project.root}/${rootrel.src.test}" /> <property name="src.demos" value="${project.root}/src/demos" /> <property name="classes" value="${build.test}/classes" /> <property name="classes.path" location="${classes}"/> <!-- absolute path --> <property name="classes.demos" value="${build.demos}/classes" /> <property name="java.part.demo" value="com/jogamp/opengl/demos/**"/> <property name="java.part.demo.android" value="com/jogamp/opengl/demos/android/**"/> <property name="java.part.demo.openal" value="com/jogamp/opengl/demos/graph/ui/UISceneDemo20*"/> <property name="java.part.demo.android.openal" value="com/jogamp/opengl/demos/graph/ui/UISceneDemo20*, com/jogamp/opengl/demos/android/NEWTGraphUI1p*, com/jogamp/opengl/demos/android/NEWTGraphUI2p*"/> <property name="java.part.test.all" value="com/jogamp/opengl/test/** jogamp/**"/> <property name="java.part.test.oculusvr" value="com/jogamp/opengl/test/junit/jogl/stereo/ovr/**"/> <property name="java.dir.test" value="com/jogamp/opengl/test"/> <property name="java.dir.junit" value="${java.dir.test}/junit"/> <property name="java.dir.bugs" value="${java.dir.test}/bugs"/> <property name="test.archive.name" value="${archive.name}-test-results-${build.node.name}"/> <!-- not required: java.base/java.lang=ALL-UNNAMED --> <!-- required for AWT: java.desktop/sun.awt=ALL-UNNAMED java.desktop/sun.java2d=ALL-UNNAMED --> <condition property="jvmarg.modules" value="--add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.java2d=ALL-UNNAMED"> <isset property="minJava17"/> </condition> <condition property="jvmarg.modules" value="--illegal-access=warn"> <and> <isset property="minJava11"/> <not> <isset property="minJava17"/> </not> </and> </condition> <property name="jvmarg.modules" value=""/> <!-- default is empty --> <property name="jvmarg.generic" value="${jvmarg.modules}"/> <property name="jvmarg.headless" value="-Djava.awt.headless=true"/> <!-- NOTE: the value of the jvmarg.swt.headless property will not be overridden if already set (by conditional isOSX) --> <condition property="jvmarg.swt.headless" value="-XstartOnFirstThread -Djava.awt.headless=true"><isset property="isOSX"/></condition> <property name="jvmarg.swt.headless" value="-Djava.awt.headless=true"/> <echo message="jvmarg.modules ${jvmarg.modules}"/> <echo message="jvmarg.generic ${jvmarg.generic}"/> <echo message="jvmarg.headless ${jvmarg.headless}"/> <echo message="jvmarg.swt.headless ${jvmarg.swt.headless}"/> <property name="batchtest.timeout" value="1800000"/> <!-- 30 min --> </target> <!-- ================================================================== --> <!-- - Clean up all that is built. --> <target name="clean" description="Remove all build products" depends="declare.common"> <delete includeEmptyDirs="true" quiet="true"> <fileset dir="${build.test}" /> <fileset dir="${build.demos}" /> <fileset dir="." includes="*.ps" /> <fileset dir="." includes="*.pdf" /> <fileset dir="." includes="*.png" /> <fileset dir="." includes="*.pam" /> <fileset dir="." includes="*.tga" /> <fileset dir="." includes="hs_err_pid*.log" /> <fileset file="${jogl-test.jar}" /> <fileset file="${jogl-demos.jar}" /> </delete> </target> <!-- ================================================================== --> <!-- - Build/run tests/junit. --> <target name="make.demos.firstpass"> <javac destdir="${classes.demos}" excludes="${java.part.demo.android} ${java.part.demo.oculusvr} ${java.part.demo.openal}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="demo_jogl_newt.compile.classpath"/> <src path="${src.demos}" /> </javac> </target> <target name="make.demos.secondpass.openal" if="joal-jars.available"> <javac destdir="${classes.demos}" includes="${java.part.demo.openal}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="demo_joal_jogl_newt.compile.classpath"/> <src path="${src.demos}" /> </javac> </target> <target name="make.demos" depends="make.demos.firstpass, make.demos.secondpass.openal"> <copy file="joglversion-test" tofile="${build.test}/manifest-demo.mf" overwrite="true"> <filterset> <filter token="VERSION" value="${jogamp.version}"/> <filter token="BUILD_VERSION" value="${jogl.version}"/> <filter token="SCM_BRANCH" value="${jogl.build.branch}"/> <filter token="SCM_COMMIT" value="${jogl.build.commit}"/> <filter token="BASEVERSION" value="${jogamp.version.base}"/> <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/> </filterset> </copy> <!-- include any resource files that tests may require --> <copy todir="${classes.demos}"> <fileset dir="${src.demos}"> <exclude name="**/*.java"/> </fileset> </copy> <jar manifest="${build.test}/manifest-demo.mf" destfile="${jogl-demos.jar}" filesonly="true"> <fileset dir="${classes.demos}" excludes="${java.part.demo.android}" includes="**"/> <fileset dir="resources/assets-test" includes="**" /> </jar> </target> <target name="demos.cc.android.firstpass" if="android-jars.available"> <javac destdir="${classes.demos}" excludes="${java.part.demo.oculusvr} ${java.part.demo.android.openal}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="demo_jogl_newt_android.compile.classpath"/> <src path="${src.demos}" /> </javac> </target> <target name="demos.cc.android.secondpass.openal" if="android-joal-jars.available"> <javac destdir="${classes.demos}" includes="${java.part.demo.android.openal}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="demo_joal_jogl_newt_android.compile.classpath"/> <src path="${src.demos}" /> </javac> </target> <target name="demos.cc.android" depends="demos.cc.android.firstpass, demos.cc.android.secondpass.openal" if="android-jars.available"> <copy file="joglversion-demo-android" tofile="${build.test}/manifest-demo-android.mf" overwrite="true"> <filterset> <filter token="VERSION" value="${jogamp.version}"/> <filter token="BUILD_VERSION" value="${jogl.version}"/> <filter token="SCM_BRANCH" value="${jogl.build.branch}"/> <filter token="SCM_COMMIT" value="${jogl.build.commit}"/> <filter token="BASEVERSION" value="${jogamp.version.base}"/> </filterset> </copy> <jar manifest="${build.test}/manifest-demo-android.mf" destfile="${jogl-demos-android.jar}" filesonly="true"> <!-- get all class files, but skip any resource files that external tools might have copied into the class directory (otherwise, it's possible to get the same resource file twice in the jar) --> <fileset dir="${classes.demos}"/> <fileset dir="resources/assets-test" includes="**" /> </jar> </target> <target name="demo.package.android" depends="demos.cc.android" if="isAndroid"> <aapt.signed assetsdir="resources/assets-test" jarsrcdir="${src}/demos" jarbuilddir="${jar}" jarbasename="jogl-demos-android" nativebuilddir="${lib}" nativebasename="non-existing" androidmanifest.path="resources/android/AndroidManifest-demo.xml" androidresources.path="resources/android/res-demo" jarmanifest.path="${build.test}/manifest-demo-android.mf" version.code="${jogamp.version.int}" version.name="${jogamp.version}"> <d8-classpaths> <arg line="--classpath ${gluegen-rt-android.jar}"/> <arg line="--classpath ${joal.jar}"/> <arg line="--classpath ${jogl-all-android.jar}"/> <arg line="--classpath ${gluegen-test-util.jar}"/> <arg line="--classpath ${junit.jar}"/> <arg line="--classpath ${ant.jar}"/> <arg line="--classpath ${ant-junit.jar}"/> <arg line="--classpath ${ant-junit4.jar}"/> <arg line="--classpath ${semver.jar}"/> <arg line="--classpath ${project.root}/make/lib/openjfx/11/javafx-base-11.jar"/> <arg line="--classpath ${project.root}/make/lib/openjfx/11/javafx-graphics-11.jar"/> </d8-classpaths> </aapt.signed> </target> <target name="test.compile.javase.generic" unless="setup.noAWT"> <javac destdir="${classes}" excludes="${java.part.test.oculusvr}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="junit_jogl_newt.compile.classpath"/> <src path="${src.test}" /> </javac> </target> <target name="test.compile.javase.oculusvr" if="oculusvr.sdk.available"> <javac destdir="${classes}" includes="${java.part.test.oculusvr}" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" encoding="UTF-8" source="${target.sourcelevel}" target="${target.targetlevel}" bootclasspath="${target.rt.jar}" debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <classpath refid="junit_jogl_newt_oculusvr.compile.classpath"/> <src path="${src.test}" /> </javac> </target> <target name="test.compile.javase" depends="test.compile.javase.generic, test.compile.javase.oculusvr" unless="setup.noAWT"> <copy file="joglversion-test" tofile="${build.test}/manifest-test.mf" overwrite="true"> <filterset> <filter token="VERSION" value="${jogamp.version}"/> <filter token="BUILD_VERSION" value="${jogl.version}"/> <filter token="SCM_BRANCH" value="${jogl.build.branch}"/> <filter token="SCM_COMMIT" value="${jogl.build.commit}"/> <filter token="BASEVERSION" value="${jogamp.version.base}"/> <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/> </filterset> </copy> <jar manifest="${build.test}/manifest-test.mf" destfile="${jogl-test.jar}" filesonly="true"> <!-- get all class files, but skip any resource files that external tools might have copied into the class directory (otherwise, it's possible to get the same resource file twice in the jar) --> <fileset dir="${classes}" includes="${java.part.test.all}"/> <fileset dir="resources/assets-test" includes="**" /> </jar> </target> <target name="test.compile.check" depends="declare.common"> <!-- Create the required output directories. --> <mkdir dir="${obj.test}" /> <mkdir dir="${classes}" /> <mkdir dir="${classes.demos}" /> <property name="jogl-test.jar.path" location="${jogl-test.jar}"/> <!-- absolute path --> <echo message="jogl-test.jar ${jogl-test.jar.path}"/> <uptodate property="test.compile.skip"> <srcfiles dir= "." includes="*.xml"/> <srcfiles dir= "${src.test}" includes="**"/> <srcfiles dir= "${src.demos}" includes="**"/> <srcfiles dir= "resources/android" includes="**/*.xml"/> <srcfiles file="${gluegen-rt.jar}" /> <srcfiles dir="${src}/nativewindow" /> <srcfiles dir="${src}/jogl" /> <srcfiles dir="${src}/newt" /> <mapper type="merge" to="${jogl-test.jar.path}"/> </uptodate> </target> <target name="test.compile" depends="test.compile.check" unless="test.compile.skip"> <!-- include any resource files that tests may require --> <copy todir="${classes}"> <fileset dir="${src.test}"> <exclude name="**/*.java"/> </fileset> </copy> <antcall target="make.demos" inheritRefs="true" inheritAll="true"/> <antcall target="demo.package.android" inheritRefs="true" inheritAll="true"/> <antcall target="test.compile.javase" inheritRefs="true" inheritAll="true"/> </target> <target name="test.manual.run" depends="test.compile, junit.run.settings"> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.bugs}/**/*Test*"/> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.log"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <apply dir="." executable="${jvmJava.exe}" parallel="false" timeout="${batchtest.timeout}" vmlauncher="false" relative="true" failonerror="false" output="${test.class.result.file}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <env key="CLASSPATH" value="${junit_jogl_awt.run.jars}"/> <arg line="${junit.run.arg0}"/> <arg line="${junit.run.arg1}"/> <arg line="${jvmDataModel.arg}"/> <arg value="-Djava.library.path=${obj.all.paths}"/> <arg line="${jvmarg.generic}"/> <!-- <arg line="-Dnewt.debug.EDT"/> --> <srcfile/> <mappedresources> <fileset dir="${classes}" includes="${test.class.path}"/> <packagemapper from="*.class" to="*"/> </mappedresources> </apply> </sequential> </for> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.run.noui" depends="test.compile"> <!-- Test*NOUI* --> <junit jvm="${jvmJava.exe}" forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <jvmarg value="${junit.run.arg0}"/> <jvmarg value="${junit.run.arg1}"/> <jvmarg value="${jvmDataModel.arg}"/> <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <jvmarg line="${jvmarg.generic}"/> <!-- <jvmarg value="-Djogl.debug=all"/> <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-Djogl.debug.GLSLState"/> <jvmarg value="-Dnativewindow.debug=all"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> <jvmarg value="-d32"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit_jogl_awt.run.classpath"/> <batchtest todir="${results.test}"> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*NOUI*"/> <exclude name="**/*$$*"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> </junit> </target> <target name="generic.junit.run.newt.headless"> <!-- attribute name="generic.junit.run.newt.headless.include.pattern" --> <!-- Test*NEWT* Emulation of junit task. Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties). --> <echo message="+++ "/> <echo message="+++ generic.junit.run.newt.headless"/> <echo message="+++ Pattern: ${generic.junit.run.newt.headless.include.pattern}"/> <echo message="+++ "/> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${generic.junit.run.newt.headless.include.pattern}"/> <exclude name="**/*$$*"/> <exclude name="**/*AWT*"/> <exclude name="**/*SWT*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <apply dir="." executable="${jvmJava.exe}" parallel="false" timeout="${batchtest.timeout}" vmlauncher="false" relative="true" failonerror="false"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <env key="CLASSPATH" value="${junit_jogl_noawt.run.jars}"/> <arg line="${junit.run.arg0}"/> <arg line="${junit.run.arg1}"/> <arg line="${jvmDataModel.arg}"/> <arg value="-Djava.library.path=${obj.all.paths}"/> <arg line="${jvmarg.generic}"/> <arg line="${jvmarg.headless}"/> <!-- <arg line="-Dnewt.debug.EDT"/> --> <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/> <srcfile/> <arg line="filtertrace=true"/> <arg line="haltOnError=false"/> <arg line="haltOnFailure=false"/> <arg line="showoutput=true"/> <arg line="outputtoformatters=true"/> <arg line="logfailedtests=true"/> <arg line="logtestlistenerevents=true"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/> <mappedresources> <fileset dir="${classes}" includes="${test.class.path}"/> <packagemapper from="*.class" to="*"/> </mappedresources> </apply> </sequential> </for> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> </target> <target name="junit.run.newt.headless" depends="test.compile"> <!-- Test*NEWT* --> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/**/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> </target> <!-- junit.run.newt is covered by junit.run.newt.headless, disable it for now, but may be checked manually. This test target would also overwrite the test result XML files, we would also need a solution here for hudson, if run in parallel. --> <target name="junit.run.newt" depends="test.compile"> <!-- Test*NEWT* --> <junit jvm="${jvmJava.exe}" forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <jvmarg value="${junit.run.arg0}"/> <jvmarg value="${junit.run.arg1}"/> <jvmarg value="${jvmDataModel.arg}"/> <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <jvmarg line="${jvmarg.generic}"/> <!-- <jvmarg value="-Dnewt.debug.EDT"/> <jvmarg value="-Djogl.debug=all"/> <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-Djogl.debug.GLSLState"/> <jvmarg value="-Dnativewindow.debug=all"/> <jvmarg value="-Dnewt.debug=all"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> <jvmarg value="-d32"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit_jogl_noawt.run.classpath"/> <batchtest todir="${results.test}"> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*NEWT*"/> <exclude name="**/*$$*"/> <exclude name="**/*AWT*"/> <exclude name="**/*SWT*"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> </junit> </target> <target name="generic.junit.run.awt" unless="setup.noAWT"> <!-- attribute name="generic.junit.run.awt.include.pattern" --> <echo message="+++ "/> <echo message="+++ generic.junit.run.awt"/> <echo message="+++ Pattern: ${generic.junit.run.awt.include.pattern}"/> <echo message="+++ "/> <!-- Test*AWT* --> <junit jvm="${jvmJava.exe}" forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <jvmarg value="${junit.run.arg0}"/> <jvmarg value="${junit.run.arg1}"/> <jvmarg value="${jvmDataModel.arg}"/> <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <jvmarg line="${jvmarg.generic}"/> <!-- <jvmarg value="-Djogl.debug=all"/> <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-Djogl.debug.GLSLState"/> <jvmarg value="-Dnativewindow.debug=all"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> <jvmarg value="-d32"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit_jogl_awt.run.classpath"/> <batchtest todir="${results.test}"> <fileset dir="${classes}"> <include name="${generic.junit.run.awt.include.pattern}"/> <exclude name="**/*$$*"/> <exclude name="**/*SWT*"/> <exclude name="**/newt/**"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> </junit> <var name="generic.junit.run.awt.include.pattern" unset="true"/> </target> <target name="junit.run.awt" depends="test.compile" unless="setup.noAWT"> <!-- Test*AWT* --> <property name="generic.junit.run.awt.include.pattern" value="${java.dir.junit}/**/Test*AWT*"/> <antcall target="generic.junit.run.awt" inheritRefs="true" inheritAll="true"/> </target> <target name="generic.junit.run.newt.awt" unless="setup.noAWT"> <!-- attribute name="generic.junit.run.newt.awt.include.pattern" --> <echo message="+++ "/> <echo message="+++ generic.junit.run.newt.awt"/> <echo message="+++ Pattern: ${generic.junit.run.newt.awt.include.pattern}"/> <echo message="+++ "/> <!-- Test*AWT* --> <junit jvm="${jvmJava.exe}" forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <jvmarg value="${junit.run.arg0}"/> <jvmarg value="${junit.run.arg1}"/> <jvmarg value="${jvmDataModel.arg}"/> <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <jvmarg line="${jvmarg.generic}"/> <!-- <jvmarg value="-Dnewt.debug.EDT"/> <jvmarg value="-Djogl.debug=all"/> <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-Djogl.debug.GLSLState"/> <jvmarg value="-Dnativewindow.debug=all"/> <jvmarg value="-Dnewt.debug=all"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> <jvmarg value="-d32"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit_jogl_awt.run.classpath"/> <batchtest todir="${results.test}"> <fileset dir="${classes}"> <include name="${generic.junit.run.newt.awt.include.pattern}"/> <exclude name="**/*SWT*"/> <exclude name="**/*$$*"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> </junit> <var name="generic.junit.run.newt.awt.include.pattern" unset="true"/> </target> <target name="junit.run.newt.awt" depends="test.compile" unless="setup.noAWT"> <!-- Test*AWT* --> <property name="generic.junit.run.newt.awt.include.pattern" value="${java.dir.junit}/**/newt/**/Test*AWT*"/> <antcall target="generic.junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> <!-- <property name="generic.junit.run.newt.awt.include.pattern" value="${java.dir.junit}/**/newt/**/TestNewtEventModifiers*AWT*"/> <antcall target="generic.junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> <property name="generic.junit.run.newt.awt.include.pattern" value="${java.dir.junit}/**/acore/glels/Test**"/> <antcall target="generic.junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> --> </target> <target name="junit.run.sharedctx" depends="test.compile, junit.run.settings"> <!-- Test*NEWT* --> <echo message="+++ "/> <echo message="+++ Testing Shared NEWT"/> <echo message="+++ "/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/**/acore/Test*Shared*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <!-- Test*AWT* --> <echo message="+++ "/> <echo message="+++ Testing Shared AWT"/> <echo message="+++ "/> <property name="generic.junit.run.awt.include.pattern" value="${java.dir.junit}/**/acore/Test*Shared*AWT*"/> <antcall target="generic.junit.run.awt" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.awt.include.pattern" unset="true"/> <!-- Test*SWTHeadless* --> <echo message="+++ "/> <echo message="+++ Testing Shared SWT"/> <echo message="+++ "/> <property name="generic.junit.run.swt.headless.include.pattern" value="${java.dir.junit}/**/acore/Test*Shared*SWT*"/> <antcall target="generic.junit.run.swt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.swt.headless.include.pattern" unset="true"/> </target> <target name="junit.run.newt.event" depends="test.compile, junit.run.settings"> <!-- Test*AWT* --> <property name="generic.junit.run.newt.awt.include.pattern" value="${java.dir.junit}/**/newt/event/Test**"/> <antcall target="generic.junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.awt.include.pattern" unset="true"/> </target> <target name="junit.run.newt.monitormode" depends="test.compile, junit.run.settings"> <!-- Test*AWT* --> <property name="generic.junit.run.newt.awt.include.pattern" value="${java.dir.junit}/**/newt/mm/Test**"/> <antcall target="generic.junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.awt.include.pattern" unset="true"/> </target> <target name="junit.run.awt.singletest" depends="test.compile, junit.run.settings"> <!-- Test*AWT* --> <junit jvm="${jvmJava.exe}" forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <jvmarg value="${junit.run.arg0}"/> <jvmarg value="${junit.run.arg1}"/> <jvmarg value="${jvmDataModel.arg}"/> <jvmarg value="-Djava.library.path=${obj.all.paths}"/> <jvmarg line="${jvmarg.generic}"/> <!-- <jvmarg value="-Djogl.debug=all"/> <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-Djogl.debug.GLSLState"/> <jvmarg value="-Dnativewindow.debug=all"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> <jvmarg value="-d32"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit_jogl_awt.run.classpath"/> <test name="${testclass}"/> </junit> </target> <target name="junit.run.newt.headless.singletest" depends="test.compile, junit.run.settings"> <!-- Test*NEWT* Emulation of junit task. Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties). --> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${testclass}.xml"/> <echo message="Testing ${testclass} -- ${test.class.result.file}"/> <apply dir="." executable="${jvmJava.exe}" parallel="false" timeout="${batchtest.timeout}" vmlauncher="false" relative="true" failonerror="false"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <env key="CLASSPATH" value="${junit_jogl_noawt.run.jars}"/> <arg line="${junit.run.arg0}"/> <arg line="${junit.run.arg1}"/> <arg line="${jvmDataModel.arg}"/> <arg value="-Djava.library.path=${obj.all.paths}"/> <arg line="${jvmarg.generic}"/> <arg line="${jvmarg.headless}"/> <!-- <arg line="-Dnewt.debug.EDT"/> --> <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/> <!-- srcfile/ --> <arg line="${testclass}"/> <arg line="filtertrace=true"/> <arg line="haltOnError=false"/> <arg line="haltOnFailure=false"/> <arg line="showoutput=true"/> <arg line="outputtoformatters=true"/> <arg line="logfailedtests=true"/> <arg line="logtestlistenerevents=true"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/> <fileset dir="${results.test}" includes="dummy.txt"/> </apply> <var name="test.class.result.file" unset="true"/> </target> <target name="generic.junit.run.swt.headless" unless="setup.noSWT"> <!-- attribute name="generic.junit.run.swt.headless.include.pattern" --> <!-- Test*SWTHeadless* Emulation of junit task. Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties). --> <echo message="+++ "/> <echo message="+++ generic.junit.run.swt.headless"/> <echo message="+++ Pattern: ${generic.junit.run.swt.headless.include.pattern}"/> <echo message="+++ "/> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${generic.junit.run.swt.headless.include.pattern}"/> <exclude name="**/*AWT*"/> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <apply dir="." executable="${jvmJava.exe}" parallel="false" timeout="${batchtest.timeout}" vmlauncher="false" relative="true" failonerror="false"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <env key="CLASSPATH" value="${junit_extra_classpath}${junit_jogl_swt.run.jars}"/> <arg line="${junit.run.arg0}"/> <arg line="${junit.run.arg1}"/> <arg line="${jvmDataModel.arg}"/> <arg value="-Djava.library.path=${obj.all.paths}"/> <arg line="${jvmarg.generic}"/> <arg line="${jvmarg.swt.headless}"/> <!-- <arg line="-Dnewt.debug.EDT"/> --> <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/> <srcfile/> <arg line="filtertrace=true"/> <arg line="haltOnError=false"/> <arg line="haltOnFailure=false"/> <arg line="showoutput=true"/> <arg line="outputtoformatters=true"/> <arg line="logfailedtests=true"/> <arg line="logtestlistenerevents=true"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/> <mappedresources> <fileset dir="${classes}" includes="${test.class.path}"/> <packagemapper from="*.class" to="*"/> </mappedresources> </apply> </sequential> </for> <var name="generic.junit.run.swt.headless.include.pattern" unset="true"/> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> </target> <target name="junit.run.swt.headless" depends="test.compile" description="Runs all pure SWT tests." unless="setup.noSWT" if="isSWTRuntimeAvailable"> <!-- Test*SWTHeadless* --> <property name="generic.junit.run.swt.headless.include.pattern" value="${java.dir.junit}/**/Test*SWT*"/> <antcall target="generic.junit.run.swt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.swt.headless.include.pattern" unset="true"/> </target> <target name="junit.run.swt.awt" depends="test.compile" description="Runs all pure SWT AWT tests." unless="setup.noSWT" if="isSWTRuntimeAvailable"> <!-- Test*SWT* Emulation of junit task. Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties). --> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*SWT*AWT*"/> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <apply dir="." executable="${jvmJava.exe}" parallel="false" timeout="${batchtest.timeout}" vmlauncher="false" relative="true" failonerror="false"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> <env key="CLASSPATH" value="${junit_extra_classpath}${junit_jogl_swt.run.jars}"/> <arg line="${junit.run.arg0}"/> <arg line="${junit.run.arg1}"/> <arg line="${jvmDataModel.arg}"/> <arg value="-Djava.library.path=${obj.all.paths}"/> <arg line="${jvmarg.generic}"/> <!-- <arg line="-Dnewt.debug.EDT"/> <arg line="-Dnativewindow.debug=all"/> <arg line="-Djogl.debug=all"/> <arg line="-Dnewt.debug=all"/> --> <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/> <srcfile/> <arg line="filtertrace=true"/> <arg line="haltOnError=false"/> <arg line="haltOnFailure=false"/> <arg line="showoutput=true"/> <arg line="outputtoformatters=true"/> <arg line="logfailedtests=true"/> <arg line="logtestlistenerevents=true"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/> <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/> <mappedresources> <fileset dir="${classes}" includes="${test.class.path}"/> <packagemapper from="*.class" to="*"/> </mappedresources> </apply> </sequential> </for> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> </target> <target name="junit.run.local" unless="isCrosscompilation" > <antcall target="junit.run.noui" inheritRefs="true" inheritAll="true"/> <antcall target="junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <antcall target="junit.run.awt" inheritRefs="true" inheritAll="true"/> <!-- unless="setup.noAWT"--> <antcall target="junit.run.newt.awt" inheritRefs="true" inheritAll="true"/> <!-- unless="setup.noAWT"--> <antcall target="junit.run.swt.headless" inheritRefs="true" inheritAll="true"/> <!-- unless="setup.noSWT" if="isSWTRuntimeAvailable"--> <antcall target="junit.run.swt.awt" inheritRefs="true" inheritAll="true"/> <!-- unless="setup.noSWT" if="isSWTRuntimeAvailable"--> </target> <target name="junit.run.local.osx.d32" if="isOSX"> <var name="jvmDataModel.arg" unset="true"/> <var name="jvmDataModel.arg" value="-d32"/> <var name="junit_extra_classpath" unset="true"/> <var name="junit_extra_classpath" value="${swt-cocoa-macosx-x86_32.jar}:"/> <antcall target="junit.run.local" inheritRefs="true" inheritAll="true"/> <mkdir dir="${build}/test/results-x32"/> <move todir="${build}/test/results-x32"> <fileset dir="." includes="*.ps" /> <fileset dir="." includes="*.pdf" /> <fileset dir="." includes="*.png" /> <fileset dir="." includes="*.pam" /> <fileset dir="." includes="*.tga" /> <fileset dir="." includes="hs_err_pid*.log" /> </move> <move todir="${build}/test/results-x32"> <fileset dir="${results.test}" includes="**" /> </move> <mkdir dir="${results.test}"/> <var name="jvmDataModel.arg" unset="true"/> <var name="jvmDataModel.arg" value="-d64"/> <var name="junit_extra_classpath" unset="true"/> <var name="junit_extra_classpath" value=""/> </target> <target name="junit.run.local.java7" if="jvmJava7.exe"> <var name="jvmJavaOrig.exe" value="${jvmJava.exe}"/> <var name="jvmJava.exe" unset="true"/> <var name="jvmJava.exe" value="${jvmJava7.exe}"/> <antcall target="junit.run.local" inheritRefs="true" inheritAll="true"/> <mkdir dir="${build}/test/results-java7"/> <move todir="${build}/test/results-java7"> <fileset dir="." includes="*.ps" /> <fileset dir="." includes="*.pdf" /> <fileset dir="." includes="*.png" /> <fileset dir="." includes="*.pam" /> <fileset dir="." includes="*.tga" /> <fileset dir="." includes="hs_err_pid*.log" /> </move> <move todir="${build}/test/results-java7"> <fileset dir="${results.test}" includes="**" /> </move> <mkdir dir="${results.test}"/> <var name="jvmJava.exe" unset="true"/> <var name="jvmJava.exe" value="${jvmJavaOrig.exe}"/> <var name="jvmJavaOrig.exe" unset="true"/> </target> <target name="junit.run.remote.ssh.all" if="isCrosscompilation" unless="isAndroid"> <echo message="#! /bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" /> <echo message="${line.separator} rsync -av --delete --delete-after --delete-excluded \${line.separator} --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator} --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator} --exclude 'make/lib/external/' \${line.separator} ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jogl.basename} ${env.TARGET_ROOT} ${line.separator} cd ${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*NEWT*"/> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <echo message="${line.separator} export DISPLAY=:0.0${line.separator} java \${line.separator} ${junit.run.arg0}\${line.separator} ${junit.run.arg1}\${line.separator} ${jvmDataModel.arg}\${line.separator} -cp ${junit_jogl_noawt.run.remote.jars}\${line.separator} ${jvmarg.headless}\${line.separator} org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} ${test.class.fqn} \${line.separator} filtertrace=true \${line.separator} haltOnError=false \${line.separator} haltOnFailure=false \${line.separator} showoutput=true \${line.separator} outputtoformatters=true \${line.separator} logfailedtests=true \${line.separator} logtestlistenerevents=true \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*AWT*"/> <exclude name="**/*$$*"/> <exclude name="**/*SWT*"/> <exclude name="${java.dir.junit}/**/Test*NEWT*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <echo message="${line.separator} export DISPLAY=:0.0${line.separator} java \${line.separator} ${junit.run.arg0}\${line.separator} ${junit.run.arg1}\${line.separator} ${jvmDataModel.arg}\${line.separator} -cp ${junit_jogl_awt.run.remote.jars}\${line.separator} org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} ${test.class.fqn} \${line.separator} filtertrace=true \${line.separator} haltOnError=false \${line.separator} haltOnFailure=false \${line.separator} showoutput=true \${line.separator} outputtoformatters=true \${line.separator} logfailedtests=true \${line.separator} logtestlistenerevents=true \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true"> <arg line='-x -c " chmod 0755 ${build.test}/targetcommand.sh ; scp ${build.test}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/jogl-targetcommand.sh ; ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/jogl-targetcommand.sh ; scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make/${results.test}/* ${results.test}/ "'/> </exec> </target> <target name="junit.run.remote.ssh.newt" if="isCrosscompilation" unless="isAndroid"> <echo message="#! /bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" /> <echo message="${line.separator} rsync -av --delete --delete-after --delete-excluded \${line.separator} --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator} --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator} ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jogl.basename} ${env.TARGET_ROOT} ${line.separator} cd ${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*NEWT*"/> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <echo message="${line.separator} export DISPLAY=:0.0${line.separator} java \${line.separator} ${junit.run.arg0}\${line.separator} ${junit.run.arg1}\${line.separator} ${jvmDataModel.arg}\${line.separator} -cp ${junit_jogl_noawt.run.remote.jars}\${line.separator} ${jvmarg.headless}\${line.separator} org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} ${test.class.fqn} \${line.separator} filtertrace=true \${line.separator} haltOnError=false \${line.separator} haltOnFailure=false \${line.separator} showoutput=true \${line.separator} outputtoformatters=true \${line.separator} logfailedtests=true \${line.separator} logtestlistenerevents=true \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> <var name="test.class.path" unset="true"/> <var name="test.class.fqn" unset="true"/> <var name="test.class.result.file" unset="true"/> <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true"> <arg line='-x -c " chmod 0755 ${build.test}/targetcommand.sh ; scp ${build.test}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/jogl-targetcommand.sh ; ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/jogl-targetcommand.sh ; scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make/${results.test}/* ${results.test}/ "'/> </exec> </target> <target name="junit.run.remote.ssh.awt" if="isCrosscompilation" unless="isAndroid"> <echo message="#! /bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" /> <echo message="${line.separator} rsync -av --delete --delete-after --delete-excluded \${line.separator} --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator} --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator} ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jogl.basename} ${env.TARGET_ROOT} ${line.separator} cd ${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <include name="${java.dir.junit}/**/Test*AWT*"/> <exclude name="**/*$$*"/> <exclude name="**/*SWT*"/> <exclude name="${java.dir.junit}/**/Test*NEWT*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" unset="true"/> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <echo message="${line.separator} export DISPLAY=:0.0${line.separator} java \${line.separator} ${junit.run.arg0}\${line.separator} ${junit.run.arg1}\${line.separator} ${jvmDataModel.arg}\${line.separator} -cp ${junit_jogl_awt.run.remote.jars}\${line.separator} org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} ${test.class.fqn} \${line.separator} filtertrace=true \${line.separator} haltOnError=false \${line.separator} haltOnFailure=false \${line.separator} showoutput=true \${line.separator} outputtoformatters=true \${line.separator} logfailedtests=true \${line.separator} logtestlistenerevents=true \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true"> <arg line='-x -c " chmod 0755 ${build.test}/targetcommand.sh ; scp ${build.test}/targetcommand.sh ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/jogl-targetcommand.sh ; ssh -x ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/jogl-targetcommand.sh ; scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make/${results.test}/* ${results.test}/ "'/> </exec> </target> <!-- rsync: -a == -rlptgoD -rt --> <target name="junit.run.remote.adb" if="isAndroidARMv6"> <echo message="#! /system/bin/sh${line.separator}" append="false" file="${build.test}/targetcommand.sh" /> <echo message="${line.separator} rsync -rtv --delete --delete-after --delete-excluded \${line.separator} --exclude 'build-x86*/' --exclude 'build-linux*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator} --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \${line.separator} --exclude 'gensrc/' --exclude 'doc/' --exclude 'jnlp-files' --exclude 'archive/' \${line.separator} --exclude 'android-sdk/' --exclude 'resources/' --exclude 'scripts/' \${line.separator} --exclude 'stub_includes/' --exclude 'nbproject/' --exclude '*.log' --exclude '*.zip' --exclude '*.7z' \${line.separator} ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${gluegen.basename} \${line.separator} ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/${jogl.basename} \${line.separator} ${env.TARGET_ROOT} ${line.separator} mkdir ${env.TARGET_ROOT}/tmp ${line.separator} cd ${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make ${line.separator} export ${system.env.library.path}=/system/lib:${env.TARGET_ROOT}/${gluegen.basename}/${env.NODE_LABEL}/${rootrel.build}/obj:${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/${rootrel.build}/lib ${line.separator} # export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> <for param="test.class.path.m" keepgoing="true"> <!-- results in absolute path --> <fileset dir="${classes}"> <!--include name="${java.dir.junit}/**/Test*NEWT*"/--> <include name="${java.dir.junit}/**/TestMainVersionGLWindowNEWT*"/> <!--include name="${java.dir.junit}/**/TestGLProfile01NEWT*"/--> <exclude name="**/*$$*"/> </fileset> <sequential> <var name="test.class.path" unset="true"/> <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/> <var name="test.class.fqn" unset="true"/> <pathconvert property="test.class.fqn"> <fileset file="${classes}${file.separator}${test.class.path}"/> <chainedmapper> <globmapper from="${classes.path}${file.separator}*" to="*"/> <!-- rel. --> <packagemapper from="*.class" to="*"/> <!-- FQCN --> </chainedmapper> </pathconvert> <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/> <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> <echo message="${line.separator} dalvikvm \${line.separator} -Xjnigreflimit:2000 \${line.separator} ${junit.run.arg0}\${line.separator} ${junit.run.arg1}\${line.separator} -cp ${junit.run.remote.apks} \${line.separator} -Dgluegen.root=${gluegen.root} \${line.separator} -Drootrel.build=${rootrel.build} \${line.separator} com.android.internal.util.WithFramework \${line.separator} org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \${line.separator} ${test.class.fqn} \${line.separator} filtertrace=true \${line.separator} haltOnError=false \${line.separator} haltOnFailure=false \${line.separator} showoutput=true \${line.separator} outputtoformatters=true \${line.separator} logfailedtests=true \${line.separator} logtestlistenerevents=true \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \${line.separator} formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file} ${line.separator} ${line.separator} " append="true" file="${build.test}/targetcommand.sh" /> </sequential> </for> <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true"> <arg line='-x -c " chmod 0755 ${build.test}/targetcommand.sh ; adb connect ${env.TARGET_IP}:${env.TARGET_ADB_PORT} ; adb -s ${env.TARGET_IP}:${env.TARGET_ADB_PORT} push ${build.test}/targetcommand.sh ${env.TARGET_ROOT}/jogl-targetcommand.sh ; adb -s ${env.TARGET_IP}:${env.TARGET_ADB_PORT} shell su -c ${env.TARGET_ROOT}/jogl-targetcommand.sh ; adb -s ${env.TARGET_IP}:${env.TARGET_ADB_PORT} pull ${env.TARGET_ROOT}/${jogl.basename}/${env.NODE_LABEL}/make/${results.test}/ ${results.test}/ "'/> </exec> </target> <!-- target name="junit.run.tests" depends="junit.run.local.osx.d32, junit.run.local, junit.run.remote.ssh.all, junit.run.remote.adb"/--> <target name="junit.run.tests" depends="junit.run.local, junit.run.local.java7, junit.run.remote.ssh.all, junit.run.remote.adb"/> <target name="junit.run.settings" depends="declare.common"> <delete quiet="true"> <fileset dir="${results.test}" includes="**"/> <fileset dir="${build}/test/results-x32" includes="**"/> <fileset file="${build}/${test.archive.name}.7z"/> <fileset dir="." includes="*.ps" /> <fileset dir="." includes="*.pdf" /> <fileset dir="." includes="*.png" /> <fileset dir="." includes="*.pam" /> <fileset dir="." includes="*.tga" /> <fileset dir="." includes="hs_err_pid*.log" /> </delete> <mkdir dir="${results.test}" /> <touch file="${results.test}/dummy.txt"/> </target> <target name="junit.run.if.enabled" unless="junit.is.disabled"> <antcall target="junit.run.tests" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.run.if.disabled" if="junit.is.disabled"> <copy todir="${results.test}" file="${gluegen.root}/make/lib/TEST-com.jogamp.junit.DisabledTest.xml"/> </target> <target name="junit.run" depends="junit.run.settings, junit.run.if.enabled, junit.run.if.disabled"> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.run.console.if.enabled" depends="test.compile" unless="junit.is.disabled"> <antcall target="junit.run.noui" inheritRefs="true" inheritAll="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/acore/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/acore/anim/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <!-- ExclusiveContextThread very buggy Intel driver .. FIXME/Investigate <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/acore/ect/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> --> <!-- Drawable/Context switching very buggy Intel driver .. FIXME/Investigate <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/acore/glels/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> --> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/caps/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/demos/es1/newt/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/demos/es2/newt/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/glsl/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/perf/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/tile/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/util/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/jogl/texture/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/newt/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/newt/mm/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> <property name="generic.junit.run.newt.headless.include.pattern" value="${java.dir.junit}/graph/Test*NEWT*"/> <antcall target="generic.junit.run.newt.headless" inheritRefs="true" inheritAll="true"/> <var name="generic.junit.run.newt.headless.include.pattern" unset="true"/> </target> <target name="junit.run.console" depends="junit.run.settings, junit.run.console.if.enabled, junit.run.if.disabled"> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.manual.run.remote.ssh.newt" depends="junit.run.settings, junit.run.remote.ssh.newt"> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.manual.run.remote.ssh.awt" depends="junit.run.settings, junit.run.remote.ssh.awt"> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.manual.run.remote.ssh.all" depends="junit.run.settings, junit.run.remote.ssh.all"> <antcall target="test-zip-archive" inheritRefs="true" inheritAll="true"/> </target> <target name="test.auto.run" depends="junit.run"/> <!-- updates / create the test results zip file --> <target name="test-zip-archive" depends="declare.common"> <mkdir dir="${results.test}" /> <move todir="${results.test}"> <fileset dir="." includes="*.ps" /> <fileset dir="." includes="*.pdf" /> <fileset dir="." includes="*.png" /> <fileset dir="." includes="*.pam" /> <fileset dir="." includes="*.tga" /> <fileset dir="." includes="hs_err_pid*.log" /> </move> <archive.7z destfile="${build}/${test.archive.name}.7z" basedir="${project.root}" includes="${rootrel.build}/test/results ${rootrel.build}/test/results-x64 ${rootrel.build}/test/results-x32" /> </target> <!-- ================================================================== --> <!-- - Build everything. --> <target name="all" description="Build JOGL JUNIT tests" depends="test.compile" /> </project>