aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-29 02:31:25 +0100
committerSven Gothel <[email protected]>2012-02-29 02:31:25 +0100
commitc739c6e02eff2e2b5f51ea9d5a385960b3bd07ca (patch)
tree17ce07b6849fa4d4691a9cc3d43a8cef665c23c7 /make
parent03697923f27df06343f8885f1c1b70bf4b3af9c2 (diff)
CrossTest: Add AWT Unit-Test. Unit-Tests: Refine GLProfile request where we favor a more detailed request than getDefault().
Diffstat (limited to 'make')
-rw-r--r--make/build-test.xml44
-rwxr-xr-xmake/scripts/targetcommand-awt.sh59
-rwxr-xr-xmake/scripts/targetcommand-newt.sh (renamed from make/scripts/targetcommand-1.sh)0
3 files changed, 103 insertions, 0 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index c67cad365..3f9c6e2d5 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -578,6 +578,50 @@ ${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" 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 ;
diff --git a/make/scripts/targetcommand-awt.sh b/make/scripts/targetcommand-awt.sh
new file mode 100755
index 000000000..e50e6c8a2
--- /dev/null
+++ b/make/scripts/targetcommand-awt.sh
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+THISDIR=`pwd`
+
+#XTRA_FLAGS="-Dnewt.test.Screen.disableScreenMode -Djogl.debug.EGL -Djogl.debug.GLDrawable"
+XTRA_FLAGS="-Dnewt.test.Screen.disableScreenMode"
+#XTRA_FLAGS="-Dnewt.debug.Screen"
+#XTRA_FLAGS="-Dnativewindow.debug.GraphicsConfiguration -Dnativewindow.debug.NativeWindow"
+#XTRA_FLAGS="-Dnewt.debug.Window -Djogl.debug.EGL -Djogl.debug.GLContext -Djogl.debug.GLDrawable"
+#XTRA_FLAGS="-Djogl.debug.GLContext -Djogl.debug.GLProfile -Djogl.debug.GLDrawable"
+#XTRA_FLAGS="-Djogl.debug.EGL"
+#XTRA_FLAGS="-Djogl.debug.GraphicsConfiguration"
+#XTRA_FLAGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable"
+#XTRA_FLAGS="-Djogl.debug.TraceGL"
+#XTRA_FLAGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL"
+
+TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT
+
+ mkdir -p $THISDIR/projects-cross
+
+ rsync -av --delete --delete-after --delete-excluded \
+ --exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \
+ --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \
+ jogamp@jogamp02::PROJECTS/JOGL/gluegen jogamp@jogamp02::PROJECTS/JOGL/jogl $THISDIR/projects-cross
+
+ cd $THISDIR/projects-cross/jogl/make
+
+function junit_run() {
+ java \
+ -cp ../../gluegen/make/lib/junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar:../../gluegen/build-linux-armv7/gluegen-rt.jar:../build-linux-armv7/jar/jogl.all.jar:../build-linux-armv7/jar/jogl.test.jar\
+ $XTRA_FLAGS \
+ com.jogamp.newt.util.MainThread\
+ org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner \
+ $TSTCLASS \
+ filtertrace=true \
+ haltOnError=false \
+ haltOnFailure=false \
+ showoutput=true \
+ outputtoformatters=true \
+ logfailedtests=true \
+ logtestlistenerevents=true \
+ formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter \
+ formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,$THISDIR/targetcommand.xml
+}
+
+function main_run() {
+ java \
+ -cp ../../gluegen/make/lib/junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar:../../gluegen/build-linux-armv7/gluegen-rt.jar:../build-linux-armv7/jar/jogl.all.jar:../build-linux-armv7/jar/jogl.test.jar\
+ $XTRA_FLAGS \
+ com.jogamp.newt.util.MainThread\
+ $TSTCLASS \
+ $*
+}
+
+# junit_run 2>&1 | tee $THISDIR/targetcommand.log
+
+main_run $* 2>&1 | tee $THISDIR/targetcommand.log
+
diff --git a/make/scripts/targetcommand-1.sh b/make/scripts/targetcommand-newt.sh
index 5933b6a79..5933b6a79 100755
--- a/make/scripts/targetcommand-1.sh
+++ b/make/scripts/targetcommand-newt.sh