summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/build-common.xml4
-rw-r--r--make/build-test.xml148
-rwxr-xr-xmake/scripts/tests.sh6
3 files changed, 147 insertions, 11 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index b1e5159af..6f2a9900a 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -450,6 +450,7 @@
</path>
<property name="junit_jogl_awt.run.jars"
value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
+ <property name="junit_jogl_awt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
<!-- Test Run w/o AWT .. -->
<path id="junit_jogl_noawt.run.classpath">
@@ -462,6 +463,9 @@
</path>
<property name="junit_jogl_noawt.run.jars"
value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
+ <property name="junit_jogl_noawt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
+ <!--property name="junit.run.remote.apks" value="${ant-junit-all.apk}${path.separator}${gluegen.root}/${rootrel.build}/gluegen.apk${path.separator}${build_t}/gluegen-test.apk"/-->
+
<!-- Test Run w/ SWT .. -->
<path id="junit_jogl_swt.run.classpath">
diff --git a/make/build-test.xml b/make/build-test.xml
index 195681b5f..6cf86f404 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -470,19 +470,22 @@
</junit>
</target>
- <target name="test.auto.run" depends="junit.run"/>
-
- <condition property="jvmarg.mainthrd" value="-XstartOnFirstThread"><isset property="isOSX"/></condition>
-
- <target name="junit.run.tests" depends="junit.run.noui,junit.run.newt.headless,junit.run.awt,junit.run.newt.awt,junit.run.swt.headless,junit.run.swt.awt"/>
+ <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"/>
+ <antcall target="junit.run.newt.awt" inheritRefs="true" inheritAll="true"/>
+ <antcall target="junit.run.swt.headless" inheritRefs="true" inheritAll="true"/>
+ <antcall target="junit.run.swt.awt" inheritRefs="true" inheritAll="true"/>
+ </target>
- <target name="junit.run.d32" if="isOSX">
+ <target name="junit.run.local.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.tests" inheritRefs="true" inheritAll="true"/>
+ <antcall target="junit.run.local" inheritRefs="true" inheritAll="true"/>
<mkdir dir="${build}/test/results-x32"/>
<move todir="${build}/test/results-x32">
@@ -491,7 +494,7 @@
<move todir="${build}/test/results-x32">
<fileset dir="${results.test}" includes="**" />
</move>
- <mkdir dir="${build}/test/results"/>
+ <mkdir dir="${results.test}"/>
<var name="jvmDataModel.arg" unset="true"/>
<var name="jvmDataModel.arg" value="-d64"/>
@@ -499,6 +502,131 @@
<var name="junit_extra_classpath" value=""/>
</target>
+ <target name="junit.run.remote.ssh" 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 'jogl-java-src.zip' \${line.separator}
+ ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/jogl ${env.TARGET_ROOT} ${line.separator}
+cd ${env.TARGET_ROOT}/jogl/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" 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}
+-cp ${junit_jogl_noawt.run.remote.jars}\${line.separator}
+${jvmarg.headless}\${line.separator}
+com.jogamp.newt.util.MainThread\${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}/targetcommand.sh ;
+ ssh ${env.TARGET_UID}@${env.TARGET_IP} ${env.TARGET_ROOT}/targetcommand.sh ;
+ scp -pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/jogl/make/${results.test}/* ${results.test}/ "'/>
+ </exec>
+ </target>
+
+ <target name="junit.run.remote.adb" if="isAndroidARMv7">
+ <echo message="#! /system/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*/' --exclude 'build-win*/' --exclude 'build-mac*/' \${line.separator}
+ --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude 'gluegen-java-src.zip' \${line.separator}
+ ${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/gluegen ${env.TARGET_ROOT} ${line.separator}
+cd ${env.TARGET_ROOT}/gluegen/make ${line.separator}
+export ${system.env.library.path}=/system/lib:${env.TARGET_ROOT}/gluegen/${rootrel.build}/obj:${env.TARGET_ROOT}/gluegen/${rootrel.build}/test/build/natives ${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="${build_t.java}">
+ <include name="${test.junit.rel}/**/*Test*"/>
+ <exclude name="**/*$$*"/>
+ </fileset>
+ <sequential>
+ <var name="test.class.path" unset="true"/>
+ <property name="test.class.path" basedir="${build_t.java}" relative="true" location="@{test.class.path.m}"/>
+ <var name="test.class.fqn" unset="true"/>
+ <pathconvert property="test.class.fqn">
+ <fileset file="${build_t.java}${file.separator}${test.class.path}"/>
+ <chainedmapper>
+ <globmapper from="${build_t.java.path}${file.separator}*" to="*"/> <!-- rel. -->
+ <packagemapper from="*.class" to="*"/> <!-- FQCN -->
+ </chainedmapper>
+ </pathconvert>
+ <var name="test.class.result.file" value="${results}/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}
+-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_t}/targetcommand.sh" />
+ </sequential>
+ </for>
+ <exec dir="." executable="sh" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line='-x -c "
+ chmod 0755 ${build_t}/targetcommand.sh ;
+ adb push ${build_t}/targetcommand.sh ${env.TARGET_ROOT}/targetcommand.sh ;
+ adb shell ${env.TARGET_ROOT}/targetcommand.sh ;
+ adb pull ${env.TARGET_ROOT}/gluegen/make/${results}/ ${results}/ "'/>
+ </exec>
+ </target>
+
+ <target name="junit.run.tests" depends="junit.run.local.d32, junit.run.local, junit.run.remote.ssh"/>
+
+ <!-- target name="junit.run.tests" depends="junit.run.local.d32, junit.run.local, junit.run.remote.ssh, junit.run.remote.adb"/ -->
+
<target name="junit.run.settings">
<delete quiet="true">
<fileset dir="${results.test}" includes="**"/>
@@ -509,7 +637,7 @@
<mkdir dir="${results.test}" />
</target>
- <target name="junit.run" depends="declare.common, junit.run.settings, junit.run.d32, junit.run.tests">
+ <target name="junit.run" depends="declare.common, junit.run.settings, junit.run.tests">
<mkdir dir="${results.test}" />
<move todir="${results.test}">
<fileset dir="." includes="*.tga" />
@@ -517,6 +645,8 @@
<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">
<archive.7z destfile="${build}/${test.archive.name}.7z"
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 931d5f1fc..69ddeeaac 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -58,6 +58,7 @@ function jrun() {
#D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.Animator -Djogl.debug.GLDrawable -Djogl.debug.GLContext -Djogl.debug.GLContext.TraceSwitch"
#D_ARGS="-Djogl.debug.GLContext -Djogl.debug.ExtensionAvailabilityCache"
#D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLProfile -Djogl.debug.GLDrawable"
+ #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLProfile"
#D_ARGS="-Djogl.debug.GLProfile"
#D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.NativeWindow"
#D_ARGS="-Dnativewindow.debug.NativeWindow"
@@ -149,6 +150,7 @@ function jrun() {
#LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64:$LD_LIBRARY_PATH \
#LIBGL_DRIVERS_PATH=/usr/lib/mesa:/usr/lib32/mesa \
#LD_LIBRARY_PATH=/usr/lib/mesa:/usr/lib32/mesa:$LD_LIBRARY_PATH \
+ #LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa:/usr/lib/i386-linux-gnu/mesa:$LD_LIBRARY_PATH \
#LD_LIBRARY_PATH=$spath/../lib/PVRVFrame/OGLES-2.0/Linux_x86_32:$LD_LIBRARY_PATH \
$javaexe $javaxargs $X_ARGS $D_ARGS $C_ARG $*
echo
@@ -183,7 +185,7 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownSharedNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrentNEWT $*
@@ -291,7 +293,7 @@ function testawtswt() {
#testawt $*
-testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT $*