summaryrefslogtreecommitdiffstats
path: root/make/build-test.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-07-24 11:37:45 +0200
committerSven Gothel <[email protected]>2011-07-24 11:37:45 +0200
commit869c49c22573147c94b1e6d931c2cff696a54a47 (patch)
tree882779724e74c324de714bbc6f8c2f88e5492862 /make/build-test.xml
parent9f45b6f09cbce6c7889e099939656356befa585d (diff)
Android integration / cross-test ; Enhance Platform
- android minor build fix - started dex'ing (gluegen-rt.apk, more to come for full junit tests) - android remote dalvikvm launch works (crosstest-java-android-armv7-rel.sh) - android detection, incl version (reflection) - Platform: - Add JAVA_VM_NAME and JAVA_VM_RUNIME - OSType maybe ANDROID, where the OS name (String) is Linux ! (ok ?)
Diffstat (limited to 'make/build-test.xml')
-rw-r--r--make/build-test.xml59
1 files changed, 59 insertions, 0 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index ef228c6..e321f23 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -283,6 +283,65 @@
<exec dir="." executable="scp" logError="true" failonerror="true" failifexecutionfails="true">
<arg line="-pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/gluegen/make/${results}/* ${results}/"/>
</exec>
+ </target>
+
+ <target name="junit.run.remote.adb" if="isAndroidARMv7">
+ <exec dir="." executable="ssh" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line="${env.TARGET_UID}@${env.TARGET_IP}"/>
+ <arg line="rsync -aAv --delete --delete-after --exclude 'build-x86*/'"/>
+ <arg line="${env.HOST_UID}@${env.HOST_IP}::${env.HOST_RSYNC_ROOT}/gluegen ${env.TARGET_ROOT}"/>
+ </exec>
+ <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}"/>
+ <apply dir="." executable="/usr/bin/ssh"
+ parallel="false"
+ timeout="${batchtest.timeout}"
+ vmlauncher="false"
+ relative="true"
+ failonerror="false">
+ <arg line="${env.TARGET_UID}@${env.TARGET_IP}"/>
+ <arg value="cd ${env.TARGET_ROOT}/gluegen/make ; "/>
+ <arg value="${system.env.library.path}=${gluegen.lib}${path.separator}${build_t.lib} java"/>
+ <arg value="-Djava.library.path=${gluegen.lib}${path.separator}${build_t.lib}"/>
+ <arg value="-cp ${junit.run.remote.jars}"/>
+ <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="${build_t.java}" includes="${test.class.path}"/>
+ <packagemapper from="*.class" to="*"/>
+ </mappedresources>
+ </apply>
+ </sequential>
+ </for>
+ <exec dir="." executable="scp" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line="-pr ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}/gluegen/make/${results}/* ${results}/"/>
+ </exec>
</target>