summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-common.xml4
-rw-r--r--make/build-gluegen.xml4
-rw-r--r--make/build-jogl.xml5
-rw-r--r--make/build-junit.xml79
-rw-r--r--make/build-nativewindow.xml2
-rw-r--r--make/build-newt.xml2
-rw-r--r--make/build-staticglgen.xml10
-rw-r--r--make/build.xml16
8 files changed, 105 insertions, 17 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index bee69a5a9..10f37c3e4 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -8,6 +8,8 @@
<property name="gluegen.root" value="../../gluegen" />
<import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
+ <property name="ant-contrib.jar" value="${gluegen.root}/make/lib/ant-contrib-1.0b3.jar" />
+
<condition property="rootrel.build" value="build">
<not>
<isset property="rootrel.build"/>
@@ -191,6 +193,8 @@
<pathelement location="${newt.all.jar}" />
<pathelement location="${jogl.test.jar}" />
</path>
+ <property name="junit_jogl_newt.run.jars"
+ value="${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}"/>
<!-- JavaSE combinations . NO.AWT -->
<property name="nativewindow.all-noawt.jar" value="${build.nativewindow}/nativewindow.all-noawt.jar" />
diff --git a/make/build-gluegen.xml b/make/build-gluegen.xml
index 992599cdb..fedfd9d93 100644
--- a/make/build-gluegen.xml
+++ b/make/build-gluegen.xml
@@ -88,6 +88,7 @@
- NOTE: GlueGenTask is NOT built at this time. It is done in
- a separate task. -->
<javac destdir="${classes}" includes="**/gluegen/**" excludes="**/GlueGenTask.java"
+ includeAntRuntime="false"
source="1.4" debug="true" debuglevel="source,lines">
<src path="${src.java}" />
<src path="${src.generated.java}" />
@@ -140,7 +141,8 @@
<!-- Build the GlueGen ANT task.
- NOTE: ONLY the GlueGenTask is built at this time. GlueGen
- itself is built in a separate task. -->
- <javac destdir="${classes}" includes="**/GlueGenTask.java" source="1.4" debug="true" debuglevel="source,lines">
+ <javac destdir="${classes}" includes="**/GlueGenTask.java" source="1.4" debug="true" debuglevel="source,lines"
+ includeAntRuntime="false">
<src path="${src.java}" />
<classpath refid="antlr.classpath" />
</javac>
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 5381c2051..b1f0a02eb 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -949,6 +949,7 @@
includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
source="1.4" debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
@@ -973,6 +974,7 @@
source="${target.sourcelevel}"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
@@ -988,6 +990,7 @@
source="${target.sourcelevel}"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath-cdc"/>
<src path="${src.java}" />
@@ -1004,6 +1007,7 @@
source="${target.sourcelevel}"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<src path="${src.java}" />
@@ -1019,6 +1023,7 @@
bootclasspath="${javac.bootclasspath-cdc.jar}"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath-cdc"/>
<src path="${src.java}" />
diff --git a/make/build-junit.xml b/make/build-junit.xml
index f06035de3..74cb30606 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -6,6 +6,10 @@
<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.
@@ -15,10 +19,13 @@
<property name="src.junit" value="${project.root}/${rootrel.src.junit}" />
<property name="classes" value="${build.junit}/classes" />
+ <property name="classes.path" location="${classes}"/> <!-- absolute path -->
<property name="java.dir.test" value="com/jogamp/test"/>
<property name="java.part.test" value="${java.dir.test}/**"/>
+ <property name="batchtest.timeout" value="10000"/>
+
</target>
<!-- ================================================================== -->
@@ -52,6 +59,7 @@
source="${host.sourcelevel}"
fork="yes"
memoryMaximumSize="${javac.memorymax}"
+ includeAntRuntime="false"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="junit_jogl_newt.compile.classpath"/>
<src path="${src.junit}" />
@@ -63,10 +71,73 @@
</jar>
</target>
- <target name="junit.run" depends="declare.common">
+ <target name="junit.run" depends="junit.compile">
<!-- Perform the junit tests-->
<mkdir dir="${results.junit}" />
- <junit forkmode="once" showoutput="true" fork="true" haltonerror="off" timeout="30000">
+ <delete quiet="true">
+ <fileset dir="${results.junit}" includes="**"/>
+ </delete>
+
+ <condition property="jvmarg.newt" value="-XstartOnFirstThread -Djava.awt.headless=true"><isset property="isOSX"/></condition>
+ <condition property="jvmarg.newt" value="-Djava.awt.headless=true"><not><isset property="isOSX"/></not></condition>
+
+ <!-- Test*NEWT*
+
+ Emulation of junit task,
+ due to the fact that we have to place invoke our MainThread class first (-> MacOSX).
+
+ 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.test}/**/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}/${test.class.path}"/>
+ <chainedmapper>
+ <globmapper from="${classes.path}/*" to="*"/> <!-- rel. -->
+ <packagemapper from="*.class" to="*"/> <!-- FQCN -->
+ </chainedmapper>
+ </pathconvert>
+ <var name="test.class.result.file" value="${results.junit}/TEST-${test.class.fqn}.xml"/>
+ <echo message="Testing ${test.class.fqn} -> ${test.class.result.file}"/>
+ <apply dir="." executable="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="${ant.home}/lib/ant.jar${path.separator}${ant.home}/lib/ant-junit.jar${path.separator}${junit_jogl_newt.run.jars}"/>
+ <arg value="-Djava.library.path=${obj.all.paths}"/>
+ <arg line="${jvmarg.newt}"/>
+ <arg line="com.jogamp.newt.util.MainThread"/>
+ <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>
+
+ <!-- Test*AWT* -->
+ <junit forkmode="once" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
<env key="${system.env.library.path}" path="${obj.all.paths}"/>
<jvmarg value="-Djava.library.path=${obj.all.paths}"/>
@@ -88,13 +159,13 @@
<batchtest todir="${results.junit}">
<fileset dir="${classes}">
- <include name="${java.dir.test}/**/Test*"/>
+ <include name="${java.dir.test}/**/Test*AWT*"/>
</fileset>
<formatter usefile="false" type="brief"/>
<formatter usefile="true" type="xml"/>
</batchtest>
-
</junit>
+
</target>
<!-- ================================================================== -->
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 3cb7e7746..3a62e9733 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -319,6 +319,7 @@
classpath="${gluegen-rt-cdc.jar}"
bootclasspath="${javac.bootclasspath-cdc.jar}"
fork="yes"
+ includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src.java}" />
@@ -333,6 +334,7 @@
source="${target.sourcelevel}"
classpath="${gluegen-rt.jar}"
fork="yes"
+ includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src.java}" />
diff --git a/make/build-newt.xml b/make/build-newt.xml
index d8f8c2b60..db357bf37 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -195,6 +195,7 @@
excludes="${java.excludes.all}"
source="${target.sourcelevel}"
fork="yes"
+ includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src.java}" />
@@ -209,6 +210,7 @@
source="${target.sourcelevel}"
bootclasspath="${javac.bootclasspath-cdc.jar}"
fork="yes"
+ includeAntRuntime="false"
memoryMaximumSize="${javac.memorymax}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen_jogl.classpath-cdc"/>
diff --git a/make/build-staticglgen.xml b/make/build-staticglgen.xml
index 2683b305a..3d5fb2d12 100644
--- a/make/build-staticglgen.xml
+++ b/make/build-staticglgen.xml
@@ -29,7 +29,8 @@
<mkdir dir="${classes}" />
<!-- Compile BuildStaticGLInfo -->
- <javac srcdir="${src.java}" destdir="${classes}" includes="**/BuildStaticGLInfo.java" source="1.4" debug="true" debuglevel="source,lines">
+ <javac srcdir="${src.java}" destdir="${classes}" includes="**/BuildStaticGLInfo.java" source="1.4" debug="true" debuglevel="source,lines"
+ includeAntRuntime="false">
<classpath refid="antlr.classpath" />
</javac>
@@ -49,8 +50,9 @@
<!-- Build the BuildStaticGLInfo ANT task.
- NOTE: ONLY the StaticGLGen is built at this time. BuildStaticGLInfo
- itself is built in a separate task. -->
- <javac destdir="${classes}" includes="**/StaticGLGenTask.java" source="1.4" debug="true" debuglevel="source,lines">
- <src path="${src.java}" />
+ <javac destdir="${classes}" includes="**/StaticGLGenTask.java" source="1.4" debug="true" debuglevel="source,lines"
+ includeAntRuntime="false">
+ <src path="${src.java}" />
<classpath refid="classpath" />
</javac>
@@ -88,4 +90,4 @@
<antcall target="build.static.gl.task" />
</target>
-</project> \ No newline at end of file
+</project>
diff --git a/make/build.xml b/make/build.xml
index e39e6dea2..8d2c9765a 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -30,15 +30,15 @@
</target>
<target name="build.nativewindow" depends="init">
- <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="all" inheritAll="false"/>
+ <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="all" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build.jogl" depends="init">
- <ant antfile="${jogl.build.xml}" dir="${jogl.make}" target="all" inheritAll="false"/>
+ <ant antfile="${jogl.build.xml}" dir="${jogl.make}" target="all" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build.newt" depends="init">
- <ant antfile="${newt.build.xml}" dir="${newt.make}" target="all" inheritAll="false"/>
+ <ant antfile="${newt.build.xml}" dir="${newt.make}" target="all" inheritRefs="true" inheritAll="true"/>
</target>
<target name="one-lib-dir" depends="init,gluegen.cpptasks.detect.os">
@@ -128,18 +128,18 @@
<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-lib-dir,developer-zip-archive,source-archive" />
<target name="junit.compile">
- <ant antfile="build-junit.xml" target="junit.compile"/>
+ <ant antfile="build-junit.xml" target="junit.compile" inheritRefs="true" inheritAll="true"/>
</target>
<target name="test" depends="junit.run"/>
<target name="junit.run" description="Run JUNIT tests in nativewindow, jogl and newt projects">
- <ant antfile="build-junit.xml" target="junit.run"/>
+ <ant antfile="build-junit.xml" target="junit.run" inheritRefs="true" inheritAll="true"/>
</target>
<target name="clean" depends="init">
- <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="clean" inheritAll="false"/>
- <ant antfile="${jogl.build.xml}" dir="${jogl.make}" target="clean" inheritAll="false"/>
- <ant antfile="${newt.build.xml}" dir="${newt.make}" target="clean" inheritAll="false"/>
+ <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="clean" inheritRefs="true" inheritAll="true"/>
+ <ant antfile="${jogl.build.xml}" dir="${jogl.make}" target="clean" inheritRefs="true" inheritAll="true"/>
+ <ant antfile="${newt.build.xml}" dir="${newt.make}" target="clean" inheritRefs="true" inheritAll="true"/>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${build}" />
</delete>