diff options
author | Sven Gothel <[email protected]> | 2010-12-13 03:22:08 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-13 03:22:08 +0100 |
commit | ebfb837b95fc6eb6ec9102004d1d068933957400 (patch) | |
tree | c4c221582edf538c5e6390404ae20dfdfb97bbc3 /make | |
parent | 84a76425dd10933a7ad033920a1e0ce12a2a107b (diff) |
tests: test.auto.run (junit.run) and test.manual.run
Diffstat (limited to 'make')
-rw-r--r-- | make/build-common.xml | 3 | ||||
-rw-r--r-- | make/build-test.xml | 64 | ||||
-rw-r--r-- | make/build.xml | 18 |
3 files changed, 70 insertions, 15 deletions
diff --git a/make/build-common.xml b/make/build-common.xml index ea81720e0..cc34f0093 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -233,6 +233,9 @@ <pathelement location="${newt.all.jar}" /> <pathelement location="${jogl.test.jar}" /> </path> + <property name="junit_jogl_newt_awt.run.jars" + value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${nativewindow.all.jar}${path.separator}${jogl.all.jar}${path.separator}${newt.all.jar}${path.separator}${jogl.test.jar}"/> + <path id="jogl_newt_all-noawt.classpath"> <pathelement location="${gluegen-rt.jar}" /> diff --git a/make/build-test.xml b/make/build-test.xml index ec68e8945..29040e867 100644 --- a/make/build-test.xml +++ b/make/build-test.xml @@ -24,6 +24,7 @@ <property name="java.dir.test" value="com/jogamp/opengl/test"/> <property name="java.part.test" value="${java.dir.test}/**"/> <property name="java.dir.junit" value="${java.dir.test}/junit"/> + <property name="java.dir.bugs" value="${java.dir.test}/bugs"/> <property name="batchtest.timeout" value="1800000"/> <!-- 30 min --> </target> @@ -51,12 +52,12 @@ <!-- ================================================================== --> <!-- - - Build/run junit. + - Build/run tests/junit. --> - <target name="junit.compile.check" depends="init"> + <target name="test.compile.check" depends="init"> <property name="jogl.test.jar.path" location="${jogl.test.jar}"/> <!-- absolute path --> <echo message="jogl.test.jar ${jogl.test.jar.path}"/> - <uptodate property="junit.compile.skip"> + <uptodate property="test.compile.skip"> <srcfiles dir= "." includes="*.xml"/> <srcfiles dir= "${src.junit}" includes="**"/> <srcfiles file="${nativewindow.all.jar}" /> @@ -67,7 +68,7 @@ </uptodate> </target> - <target name="junit.compile" depends="junit.compile.check" unless="junit.compile.skip"> + <target name="test.compile" depends="test.compile.check" unless="test.compile.skip"> <!-- Perform the junit pass Java compile --> <javac destdir="${classes}" source="${host.sourcelevel}" @@ -88,7 +89,7 @@ </jar> </target> - <target name="junit.run.setup" depends="junit.compile"> + <target name="test.run.setup" depends="test.compile"> <mkdir dir="${results.junit}" /> <delete quiet="true"> <fileset dir="${results.junit}" includes="**"/> @@ -98,8 +99,50 @@ <condition property="jvmarg.newt.headless" value="-Djava.awt.headless=true"><not><isset property="isOSX"/></not></condition> </target> + <target name="test.manual.run" depends="test.run.setup" unless="isOSX"> + <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" value="${results.junit}/TEST-${test.class.fqn}.log"/> + <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/> + <apply dir="." executable="${java.home}/bin/java" + 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_newt_awt.run.jars}"/> + <arg value="-Djava.library.path=${obj.all.paths}"/> + <!-- + <arg line="-Dnewt.debug.EDT"/> + --> + <srcfile/> + <mappedresources> + <fileset dir="${classes}" includes="${test.class.path}"/> + <packagemapper from="*.class" to="*"/> + </mappedresources> + </apply> + </sequential> + </for> + </target> + <!-- NEWT is currently not supported on OSX --> - <target name="junit.run.newt.headless" depends="junit.run.setup" unless="isOSX"> + <target name="junit.run.newt.headless" depends="test.run.setup" unless="isOSX"> <!-- Test*NEWT* Emulation of junit task, @@ -165,7 +208,7 @@ if run in parallel. NEWT is currently not supported on OSX --> - <target name="junit.run.newt" depends="junit.run.setup" unless="isOSX"> + <target name="junit.run.newt" depends="test.run.setup" unless="isOSX"> <!-- Test*NEWT* --> <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> @@ -199,7 +242,7 @@ </junit> </target> - <target name="junit.run.awt" depends="junit.run.setup"> + <target name="junit.run.awt" depends="test.run.setup"> <!-- Test*AWT* --> <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> @@ -235,7 +278,7 @@ </target> <!-- NEWT is currently not supported on OSX --> - <target name="junit.run.newt.awt" depends="junit.run.setup" unless="isOSX"> + <target name="junit.run.newt.awt" depends="test.run.setup" unless="isOSX"> <!-- Test*AWT* --> <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}"> <env key="${system.env.library.path}" path="${obj.all.paths}"/> @@ -269,12 +312,13 @@ </junit> </target> + <target name="test.auto.run" depends="junit.run"/> <target name="junit.run" depends="junit.run.newt.headless,junit.run.awt,junit.run.newt.awt"/> <!-- ================================================================== --> <!-- - Build everything. --> - <target name="all" description="Build JOGL JUNIT tests and run them." depends="junit.compile, junit.run" /> + <target name="all" description="Build JOGL JUNIT tests" depends="test.compile" /> </project> diff --git a/make/build.xml b/make/build.xml index e706f0d0d..69be99472 100644 --- a/make/build.xml +++ b/make/build.xml @@ -8,18 +8,26 @@ - Main build target. --> - <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,junit.compile,one.dir,tag.build,developer-zip-archive" /> + <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,test.compile,one.dir,tag.build,developer-zip-archive" /> - <target name="all.but-archives" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,junit.compile,one.dir,tag.build" /> + <target name="all.but-archives" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,test.compile,one.dir,tag.build" /> - <target name="junit.compile"> - <ant antfile="build-test.xml" target="junit.compile" inheritRefs="true" inheritAll="true"/> + <target name="test.compile"> + <ant antfile="build-test.xml" target="test.compile" inheritRefs="true" inheritAll="true"/> </target> - <target name="junit.run" description="Run JUNIT tests in nativewindow, jogl and newt projects"> + <target name="test.auto.run" description="Run automated tests (junit and others) in nativewindow, jogl and newt projects"> + <ant antfile="build-test.xml" target="test.auto.run" inheritRefs="true" inheritAll="true"/> + </target> + + <target name="junit.run" description="Run automated junit tests in nativewindow, jogl and newt projects"> <ant antfile="build-test.xml" target="junit.run" inheritRefs="true" inheritAll="true"/> </target> + <target name="test.manual.run" description="Run manual operated tests in nativewindow, jogl and newt projects"> + <ant antfile="build-test.xml" target="test.manual.run" inheritRefs="true" inheritAll="true"/> + </target> + <target name="javadoc.all.zip" depends="javadoc.init, javadoc.all, javadoc.zip"/> <target name="javadoc.spec.zip" depends="javadoc.init, javadoc.spec, javadoc.zip"/> |