aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-test.xml111
-rwxr-xr-xmake/build.xml6
-rwxr-xr-xmake/joalversion1
-rw-r--r--make/joalversion-test12
-rw-r--r--make/joalversion-test-android12
-rw-r--r--make/resources/android/AndroidManifest-test.xml33
-rw-r--r--make/resources/android/res-test/drawable-hdpi/icon.pngbin0 -> 2516 bytes
-rw-r--r--make/resources/android/res-test/drawable-ldpi/icon.pngbin0 -> 1172 bytes
-rw-r--r--make/resources/android/res-test/drawable-mdpi/icon.pngbin0 -> 1570 bytes
-rw-r--r--make/resources/android/res-test/layout/main.xml12
-rw-r--r--make/resources/android/res-test/values/strings.xml8
-rw-r--r--make/resources/assets-test/placeholder.txt1
-rwxr-xr-xmake/scripts/adb-install-all-armv6.sh4
-rwxr-xr-xmake/scripts/adb-logcat.sh4
-rwxr-xr-xmake/scripts/adb-reinstall-all-armv6.sh5
-rwxr-xr-xmake/scripts/adb-uninstall-all.sh4
-rw-r--r--make/scripts/tests.sh4
17 files changed, 196 insertions, 21 deletions
diff --git a/make/build-test.xml b/make/build-test.xml
index 11da43c..060863e 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -66,10 +66,13 @@
<property name="classes.test.path" location="${classes.test}"/> <!-- absolute path -->
<property name="java.dir.test" value="com/jogamp/openal/test"/>
- <property name="java.part.test" value="${java.dir.test}/**"/>
+ <property name="java.part.test.all" value="${java.dir.test}/**"/>
+ <property name="java.part.test.android" value="${java.dir.test}/android/**"/>
<property name="java.dir.junit" value="${java.dir.test}/junit"/>
<property name="java.dir.manual" value="${java.dir.test}/manual"/>
+ <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" />
+
<property name="obj.all.paths" value="${gluegen.build}/obj${path.separator}${obj}${path.separator}lib/${os.and.arch}"/>
<property name="classpath.test" value="${junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${build}/joal.jar${path.separator}${build}/joal-test.jar"/>
<property name="classpath.test.remote" 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}${build}/joal.jar${path.separator}${build}/joal-test.jar"/>
@@ -81,15 +84,10 @@
<mkdir dir="${classes.test}"/>
</target>
- <target name="test.compile" depends="declare.common">
- <!-- Clean the results -->
- <delete quiet="true">
- <fileset dir="${results.test}" includes="**"/>
- <fileset file="${build}/${test.archive.name}.7z"/>
- </delete>
- <mkdir dir="${results.test}"/>
-
+ <target name="test.compile.javase">
<javac destdir="${classes.test}"
+ excludes="${java.part.test.android}"
+ fork="yes"
includeantruntime="false"
srcdir="${src.test}"
classpath="${gluegen-rt.jar};${build}/joal.jar;${junit.jar}"
@@ -99,21 +97,100 @@
target="${target.targetlevel}"
bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}"/>
- <copy todir="${classes.test}">
- <fileset dir="${src.test}" includes="**/*.wav"/>
+ <copy file="joalversion-test"
+ tofile="${build.test}/manifest-test.mf"
+ overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="${joal.version}"/>
+ <filter token="SCM_BRANCH" value="${joal.build.branch}"/>
+ <filter token="SCM_COMMIT" value="${joal.build.commit}"/>
+ <filter token="BASEVERSION" value="${joal_base_version}"/>
+ </filterset>
</copy>
- <jar destfile="${build}/joal-test.jar">
- <fileset dir="${classes.test}">
- <include name="**" />
- </fileset>
+ <jar manifest="${build.test}/manifest-test.mf" destfile="${build}/joal-test.jar">
+ <!-- get all class files, but skip any resource files that external tools
+ might have copied into the class directory (otherwise, it's possible
+ to get the same resource file twice in the jar) -->
+ <fileset dir="${classes.test}"
+ includes="${java.part.test.all}"
+ excludes="${java.part.test.android}"/>
</jar>
</target>
+ <target name="test.compile.android" depends="declare.common" if="android-jars.available">
+ <!-- Perform the junit pass Java Android compile -->
+ <javac destdir="${classes.test}"
+ fork="yes"
+ includeAntRuntime="false"
+ classpath="${android.jar};${gluegen-rt-android.jar};${build}/joal.jar;${junit.jar}"
+ memoryMaximumSize="${javac.memorymax}"
+ encoding="UTF-8"
+ source="${target.sourcelevel}"
+ target="${target.targetlevel}"
+ bootclasspath="${target.rt.jar}"
+ debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+ <src path="${src.test}" />
+ </javac>
+ <copy file="joalversion-test-android"
+ tofile="${build.test}/manifest-test-android.mf"
+ overwrite="true">
+ <filterset>
+ <filter token="VERSION" value="${joal.version}"/>
+ <filter token="SCM_BRANCH" value="${joal.build.branch}"/>
+ <filter token="SCM_COMMIT" value="${joal.build.commit}"/>
+ <filter token="BASEVERSION" value="${joal_base_version}"/>
+ </filterset>
+ </copy>
+ <jar manifest="${build.test}/manifest-test-android.mf" destfile="${build}/joal-test-android.jar" filesonly="true">
+ <!-- get all class files, but skip any resource files that external tools
+ might have copied into the class directory (otherwise, it's possible
+ to get the same resource file twice in the jar) -->
+ <fileset dir="${classes.test}"
+ includes="${java.part.test.all}"/>
+ </jar>
+ </target>
+
+ <target name="test.package.android" depends="test.compile.android" if="isAndroid">
+ <aapt.signed
+ assetsdir="resources/assets-test"
+ jarsrcdir="${src.test}"
+ jarbuilddir="${build}"
+ jarbasename="joal-test-android"
+ nativebuilddir="../${rootrel.build}/obj"
+ nativebasename="non-existing"
+ androidmanifest.path="resources/android/AndroidManifest-test.xml"
+ androidresources.path="resources/android/res-test"
+ jarmanifest.path="${build.test}/manifest-test-android.mf"
+ version.code="${joal_int_version}"
+ version.name="${joal.version.plus}" />
+ </target>
+
+ <target name="test.compile" depends="declare.common" unless="test.compile.skip">
+ <!-- include any resource files that tests may require -->
+ <copy todir="${classes.test}">
+ <fileset dir="${src.test}">
+ <include name="**/*.wav"/>
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ <antcall target="test.compile.javase" inheritRefs="true" inheritAll="true"/>
+ <antcall target="test.package.android" inheritRefs="true" inheritAll="true"/>
+ </target>
+
<target name="clean">
<delete dir="${build.test}"/>
</target>
- <target name="junit.run.local" depends="test.compile" unless="isCrosscompilation">
+ <target name="clean.results">
+ <!-- Clean the results -->
+ <delete quiet="true">
+ <fileset dir="${results.test}" includes="**"/>
+ <fileset file="${build}/${test.archive.name}.7z"/>
+ </delete>
+ <mkdir dir="${results.test}"/>
+ </target>
+
+ <target name="junit.run.local" depends="clean.results, test.compile" unless="isCrosscompilation">
<junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" includeAntRuntime="true">
<env key="${system.env.library.path}" path="${obj.all.paths}"/>
<jvmarg value="${jvmDataModel.arg}"/>
@@ -137,7 +214,7 @@
</junit>
</target>
- <target name="test.manual.run" depends="test.compile">
+ <target name="test.manual.run" depends="clean.results, test.compile">
<for param="test.class.path.m" keepgoing="true">
<!-- results in absolute path -->
<fileset dir="${classes.test}">
diff --git a/make/build.xml b/make/build.xml
index c6f482f..673c5f6 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -167,7 +167,8 @@
<!-- The resulting joal.jar. -->
<property name="joal.jar" value="${build}/joal.jar" />
- <property name="joal.apk" value="${build}/joal.apk" />
+ <property name="joal-android.jar" value="${build}/joal-android.jar" />
+ <property name="joal-android.apk" value="${build}/joal-android-${android.abi}.apk" />
<path id="joal_all.classpath">
<pathelement location="${gluegen-rt.jar}" />
@@ -497,6 +498,7 @@
<include name="jogamp/openal/**" />
</fileset>
</jar>
+ <copy file="${joal.jar}" tofile="${joal-android.jar}"/>
<antcall target="android.package" inheritRefs="true" />
@@ -507,7 +509,7 @@
<aapt.signed
jarsrcdir="${src.java}"
jarbuilddir="${build}"
- jarbasename="joal"
+ jarbasename="joal-android"
nativebuilddir="../${rootrel.build}/obj"
nativebasename=""
android.abi="${android.abi}"
diff --git a/make/joalversion b/make/joalversion
index da9fd7e..ee7d012 100755
--- a/make/joalversion
+++ b/make/joalversion
@@ -1,3 +1,4 @@
+Manifest-Version: 1.0
Specification-Title: Java Bindings for OpenAL API Specification
Specification-Version: @BASEVERSION@
Specification-Vendor: JogAmp Community
diff --git a/make/joalversion-test b/make/joalversion-test
new file mode 100644
index 0000000..43d9c28
--- /dev/null
+++ b/make/joalversion-test
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Specification-Title: Test Java Bindings for OpenAL API Specification
+Specification-Version: @BASEVERSION@
+Specification-Vendor: JogAmp Community
+Implementation-Title: Test Java Bindings for OpenAL Runtime Environment on Android
+Implementation-Version: @VERSION@
+Implementation-Branch: @SCM_BRANCH@
+Implementation-Commit: @SCM_COMMIT@
+Implementation-Vendor: JogAmp Community
+Implementation-URL: http://jogamp.org/
+Extension-Name: com.jogamp.openal.test
+Implementation-Vendor-Id: com.jogamp
diff --git a/make/joalversion-test-android b/make/joalversion-test-android
new file mode 100644
index 0000000..43d9c28
--- /dev/null
+++ b/make/joalversion-test-android
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Specification-Title: Test Java Bindings for OpenAL API Specification
+Specification-Version: @BASEVERSION@
+Specification-Vendor: JogAmp Community
+Implementation-Title: Test Java Bindings for OpenAL Runtime Environment on Android
+Implementation-Version: @VERSION@
+Implementation-Branch: @SCM_BRANCH@
+Implementation-Commit: @SCM_COMMIT@
+Implementation-Vendor: JogAmp Community
+Implementation-URL: http://jogamp.org/
+Extension-Name: com.jogamp.openal.test
+Implementation-Vendor-Id: com.jogamp
diff --git a/make/resources/android/AndroidManifest-test.xml b/make/resources/android/AndroidManifest-test.xml
new file mode 100644
index 0000000..71b0791
--- /dev/null
+++ b/make/resources/android/AndroidManifest-test.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ sharedUserId="com.jogamp.Community"
+ package="com.jogamp.openal.test">
+
+ <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+ <!-- uses-feature android:name="android.hardware.camera" android:required="false" / --> <!-- not yet -->
+
+ <uses-library android:name="com.jogamp.common" android:required="true" />
+ <uses-library android:name="com.jogamp.openal" android:required="true" />
+ <uses-library android:name="jogamp.android.launcher" android:required="true" />
+
+ <uses-sdk android:minSdkVersion="9" />
+
+ <application android:icon="@drawable/icon"
+ android:label="@string/app_name"
+ android:description="@string/app_descr"
+ android:persistent="false"
+ >
+
+ <activity android:name="com.jogamp.openal.test.android.OpenALTestActivityLauncher"
+ android:label="@string/activity_openaltest1_name"
+ android:description="@string/activity_openaltest1_descr"
+ android:theme="@android:style/Theme.NoDisplay"
+ >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
diff --git a/make/resources/android/res-test/drawable-hdpi/icon.png b/make/resources/android/res-test/drawable-hdpi/icon.png
new file mode 100644
index 0000000..2148232
--- /dev/null
+++ b/make/resources/android/res-test/drawable-hdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/drawable-ldpi/icon.png b/make/resources/android/res-test/drawable-ldpi/icon.png
new file mode 100644
index 0000000..c16211f
--- /dev/null
+++ b/make/resources/android/res-test/drawable-ldpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/drawable-mdpi/icon.png b/make/resources/android/res-test/drawable-mdpi/icon.png
new file mode 100644
index 0000000..1c26e3f
--- /dev/null
+++ b/make/resources/android/res-test/drawable-mdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-test/layout/main.xml b/make/resources/android/res-test/layout/main.xml
new file mode 100644
index 0000000..3a5f117
--- /dev/null
+++ b/make/resources/android/res-test/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello"
+ />
+</LinearLayout>
diff --git a/make/resources/android/res-test/values/strings.xml b/make/resources/android/res-test/values/strings.xml
new file mode 100644
index 0000000..597fc4a
--- /dev/null
+++ b/make/resources/android/res-test/values/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="hello">Joal Test</string>
+ <string name="app_name">Joal Tests</string>
+ <string name="app_descr">Launches Joal Tests.</string>
+ <string name="activity_openaltest1_name">OALTest1</string>
+ <string name="activity_openaltest1_descr">OALTest1</string>
+</resources>
diff --git a/make/resources/assets-test/placeholder.txt b/make/resources/assets-test/placeholder.txt
new file mode 100644
index 0000000..efb91aa
--- /dev/null
+++ b/make/resources/assets-test/placeholder.txt
@@ -0,0 +1 @@
+placeholder for git - can be removed when containing real assets for tests
diff --git a/make/scripts/adb-install-all-armv6.sh b/make/scripts/adb-install-all-armv6.sh
new file mode 100755
index 0000000..794cb73
--- /dev/null
+++ b/make/scripts/adb-install-all-armv6.sh
@@ -0,0 +1,4 @@
+#adb $* install ../../gluegen/build-android-armv6/jogamp-android-launcher.apk
+#adb $* install ../../gluegen/build-android-armv6/gluegen-rt-android-armeabi.apk
+adb $* install ../build-android-armv6/joal-android-armeabi.apk
+adb $* install ../build-android-armv6/joal-test-android.apk
diff --git a/make/scripts/adb-logcat.sh b/make/scripts/adb-logcat.sh
new file mode 100755
index 0000000..ea4be3d
--- /dev/null
+++ b/make/scripts/adb-logcat.sh
@@ -0,0 +1,4 @@
+sdir=`dirname $0`
+
+adb $* logcat -c
+adb $* logcat
diff --git a/make/scripts/adb-reinstall-all-armv6.sh b/make/scripts/adb-reinstall-all-armv6.sh
new file mode 100755
index 0000000..0e62c59
--- /dev/null
+++ b/make/scripts/adb-reinstall-all-armv6.sh
@@ -0,0 +1,5 @@
+sdir=`dirname $0`
+
+$sdir/adb-uninstall-all.sh $*
+$sdir/adb-install-all-armv6.sh $*
+
diff --git a/make/scripts/adb-uninstall-all.sh b/make/scripts/adb-uninstall-all.sh
new file mode 100755
index 0000000..7d7d7a3
--- /dev/null
+++ b/make/scripts/adb-uninstall-all.sh
@@ -0,0 +1,4 @@
+#adb $* uninstall jogamp.android.launcher
+#adb $* uninstall com.jogamp.common
+adb $* uninstall com.jogamp.openal
+adb $* uninstall com.jogamp.openal.test
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index db2bc59..657609f 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -85,6 +85,6 @@ function testnormal() {
}
-#testnormal com.jogamp.openal.test.manual.OpenALTest $*
-testnormal com.jogamp.openal.test.manual.Sound3DTest $*
+testnormal com.jogamp.openal.test.manual.OpenALTest $*
+#testnormal com.jogamp.openal.test.manual.Sound3DTest $*
#testnormal com.jogamp.openal.test.junit.ALExtLoopbackDeviceSOFTTest $*