summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-test.xml56
-rw-r--r--make/build.xml20
-rwxr-xr-xmake/gluegen-properties.xml1
-rw-r--r--make/lib/ant-junit-all.apkbin0 -> 943702 bytes
-rw-r--r--make/scripts/crosstest-java-android-armv7-rel.sh8
5 files changed, 36 insertions, 49 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index e321f23..a0a9783 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -54,6 +54,7 @@
<property name="gluegen.lib" value="${gluegen.root}/${rootrel.build}/obj" />
<property name="gluegen-test.jar" location="${build_t}/gluegen-test.jar" />
+ <property name="gluegen-test.apk" location="${build_t}/gluegen-test.apk" />
<path id="gluegen.classpath">
<pathelement location="${gluegen.jar}" />
@@ -76,6 +77,7 @@
</path>
<property name="junit.run.jars" value="${junit.jar}${path.separator}${ant.jar}${path.separator}${gluegen.root}/${rootrel.build}/gluegen.jar${path.separator}${build_t}/gluegen-test.jar"/>
<property name="junit.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.root}/${rootrel.build}/gluegen.jar${path.separator}${build_t}/gluegen-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"/>
<property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet -->
@@ -127,6 +129,15 @@
</jar>
</target>
+ <target name="android.package" depends="java.build,native.build" if="isAndroid">
+ <delete file="${gluegen-test.apk}" includeEmptyDirs="true" quiet="true" failonerror="false" />
+ <exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line="--dex"/>
+ <arg line="--output=${gluegen-test.apk}"/>
+ <arg line="${gluegen-test.jar}"/>
+ </exec>
+ </target>
+
<target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
<property name="compiler.cfg.id" value="${compiler.cfg.id.base}" />
<property name="linker.cfg.id" value="${linker.cfg.id.base}" />
@@ -201,31 +212,9 @@
<target name="junit.compile" depends="junit.compile.check" unless="junit.compile.skip">
<mkdir dir="${build}/test/build/classes"/>
- <antcall target="java.generate" inheritRefs="true"/>
- <antcall target="java.build" inheritRefs="true"/>
- <antcall target="native.build" inheritRefs="true"/>
+ <antcall target="android.package" inheritRefs="true"/>
</target>
- <!--
- <target name="junit.run.remote.ssh.tarscpssh" if="isCrosscompilation" unless="isAndroid">
- <mkdir dir="${gluegen.root}/../temp"/>
- <delete quiet="true">
- <fileset file="${gluegen.root}/../temp/gluegen-${rootrel.build}.tar"/>
- </delete>
-
- <exec dir="${gluegen.root}/.." executable="tar" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="cf temp/gluegen-${rootrel.build}.tar gluegen"/>
- </exec>
-
- <exec dir="${gluegen.root}/.." executable="scp" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="temp/gluegen-${rootrel.build}.tar ${env.TARGET_UID}@${env.TARGET_IP}:${env.TARGET_ROOT}"/>
- </exec>
-
- <exec dir="${gluegen.root}/.." executable="ssh" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="${env.TARGET_UID}@${env.TARGET_IP} cd ${env.TARGET_ROOT} ; tar xf gluegen-${rootrel.build}.tar"/>
- </exec>
- </target> -->
-
<target name="junit.run.remote.ssh" if="isCrosscompilation" unless="isAndroid">
<exec dir="." executable="ssh" logError="true" failonerror="true" failifexecutionfails="true">
<arg line="${env.TARGET_UID}@${env.TARGET_IP}"/>
@@ -286,9 +275,9 @@
</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*/'"/>
+ <exec dir="." executable="adb" logError="true" failonerror="true" failifexecutionfails="true">
+ <arg line="shell"/>
+ <arg line="rsync -av --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">
@@ -310,17 +299,20 @@
</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"
+ <apply dir="." executable="adb"
parallel="false"
timeout="${batchtest.timeout}"
vmlauncher="false"
relative="true"
failonerror="false">
- <arg line="${env.TARGET_UID}@${env.TARGET_IP}"/>
+ <arg line="shell"/>
<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 value="export ${system.env.library.path}=/system/lib${path.separator}${env.TARGET_ROOT}/gluegen/make/${gluegen.lib}${path.separator}${env.TARGET_ROOT}/gluegen/make/${build_t.lib} ; "/>
+ <arg value="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 ; "/>
+ <arg value="dalvikvm"/>
+ <arg value="-Xjnigreflimit:2000"/>
+ <arg value="-cp ${junit.run.remote.apks}"/>
+ <arg value="com.android.internal.util.WithFramework"/>
<arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/>
<srcfile/>
<arg line="filtertrace=true"/>
@@ -379,7 +371,7 @@
<property name="build_t.lib.abs" location="${build_t.lib}" />
</target>
- <target name="junit.run" depends="init,gluegen.cpptasks.detect.os,junit.run.settings,junit.run.local,junit.run.remote.ssh">
+ <target name="junit.run" depends="init,gluegen.cpptasks.detect.os,junit.run.settings,junit.run.local,junit.run.remote.ssh,junit.run.remote.adb">
<antcall target="test-zip-archive" inheritRefs="true" />
</target>
diff --git a/make/build.xml b/make/build.xml
index 4a7341f..f91d3a2 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -682,26 +682,20 @@
</copy>
</target>
- <target name="android.package.p1" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" if="isAndroid">
- <delete dir="${build}/gluegen-rt.d" includeEmptyDirs="true" quiet="true" failonerror="false" />
+ <target name="android.package" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" if="isAndroid">
<delete file="${build}/gluegen-rt.apk" includeEmptyDirs="true" quiet="true" failonerror="false" />
- <mkdir dir="${build}/gluegen-rt.d" />
- <exec dir="${build}/gluegen-rt.d" executable="unzip" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="../gluegen-rt.jar"/>
- </exec>
<exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
<arg line="--dex"/>
<arg line="--output=${build}/gluegen-rt.apk"/>
- <arg line="${build}/gluegen-rt.d/"/>
+ <arg line="${build}/gluegen-rt.jar"/>
+ <!-- CHECK HOW TO LOAD NATIVE LIBS FROM APK.. arg line="${build}/gluegen-rt-natives-${os.and.arch}.jar"/-->
</exec>
- </target>
-
- <target name="android.package" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" if="isAndroid">
- <delete file="${build}/gluegen-rt.apk" includeEmptyDirs="true" quiet="true" failonerror="false" />
+ <delete file="${build}/gluegen.apk" includeEmptyDirs="true" quiet="true" failonerror="false" />
<exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
<arg line="--dex"/>
- <arg line="--output=${build}/gluegen-rt.apk"/>
- <arg line="${build}/gluegen-rt.jar"/>
+ <arg line="--output=${build}/gluegen.apk"/>
+ <arg line="${build}/gluegen.jar"/>
+ <!-- CHECK HOW TO LOAD NATIVE LIBS FROM APK.. arg line="${build}/gluegen-rt-natives-${os.and.arch}.jar"/ -->
</exec>
</target>
diff --git a/make/gluegen-properties.xml b/make/gluegen-properties.xml
index 600c071..95f58f5 100755
--- a/make/gluegen-properties.xml
+++ b/make/gluegen-properties.xml
@@ -43,6 +43,7 @@
<property name="junit.jar" value="${gluegen.root}/make/lib/junit.jar" />
<property name="ant.jar" value="${ant.home}/lib/ant.jar" />
<property name="ant-junit.jar" value="${ant.home}/lib/ant-junit.jar" />
+ <property name="ant-junit-all.apk" value="${gluegen.root}/make/lib/ant-junit-all.apk" />
<condition property="win32.c.compiler" value="mingw64">
<and>
<os family="windows" />
diff --git a/make/lib/ant-junit-all.apk b/make/lib/ant-junit-all.apk
new file mode 100644
index 0000000..a9e8e68
--- /dev/null
+++ b/make/lib/ant-junit-all.apk
Binary files differ
diff --git a/make/scripts/crosstest-java-android-armv7-rel.sh b/make/scripts/crosstest-java-android-armv7-rel.sh
index 27f209a..08df575 100644
--- a/make/scripts/crosstest-java-android-armv7-rel.sh
+++ b/make/scripts/crosstest-java-android-armv7-rel.sh
@@ -14,9 +14,9 @@ if [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
fi
#
-# orig android
-# LD_LIBRARY_PATH /system/lib
-# 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:/system/framework/core-junit.jar
+# orig android:
+# export LD_LIBRARY_PATH /system/lib
+# 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:/system/framework/core-junit.jar
#
#TSTCLASS=com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter
@@ -34,7 +34,7 @@ export LD_LIBRARY_PATH=/system/lib:$TARGET_ROOT/gluegen/make/$BUILD_DIR/obj:$TAR
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 ; \
dalvikvm \
-Xjnigreflimit:2000 \
- -Djava.class.path=$BUILD_DIR/gluegen-rt.apk \
+ -Djava.class.path=lib/ant-junit-all.apk:$BUILD_DIR/gluegen-rt.apk \
-Djogamp.debug.JNILibLoader=true \
-Djogamp.debug.NativeLibrary=true \
-Djogamp.debug.NativeLibrary.Lookup=true \