diff options
-rw-r--r-- | make/build-test.xml | 6 | ||||
-rw-r--r-- | make/lib/TestJarsInJar.jar | bin | 0 -> 2256 bytes | |||
-rwxr-xr-x | make/scripts/runtest.sh | 12 | ||||
-rw-r--r-- | test/TestJarsInJar/ClassInJar0.java | 17 | ||||
-rw-r--r-- | test/TestJarsInJar/ClassInJar1.java | 10 | ||||
-rw-r--r-- | test/TestJarsInJar/ClassInJar2.java | 10 | ||||
-rw-r--r-- | test/TestJarsInJar/MANIFEST.MF | 4 | ||||
-rw-r--r-- | test/TestJarsInJar/make.sh | 16 |
8 files changed, 69 insertions, 6 deletions
diff --git a/make/build-test.xml b/make/build-test.xml index 7c522cf..cbd7ce0 100644 --- a/make/build-test.xml +++ b/make/build-test.xml @@ -54,6 +54,7 @@ <property name="gluegen-rt.jar" location="${gluegen.root}/${rootrel.build}/gluegen-rt.jar" /> <property name="gluegen.lib" value="${gluegen.root}/${rootrel.build}/obj" /> + <property name="TestJarsInJar.jar" location="${gluegen.root}/make/lib/TestJarsInJar.jar" /> <property name="gluegen-test.jar" location="${build_t}/gluegen-test.jar" /> <property name="gluegen-test.apk" location="${build_t}/gluegen-test.apk" /> @@ -73,11 +74,12 @@ <path id="junit.run.classpath"> <pathelement location="${junit.jar}" /> + <pathelement location="${TestJarsInJar.jar}" /> <pathelement location="${gluegen.jar}" /> <pathelement location="${gluegen-test.jar}" /> </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.jars" value="${junit.jar}${path.separator}${ant.jar}${path.separator}${TestJarsInJar.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}${TestJarsInJar.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 --> diff --git a/make/lib/TestJarsInJar.jar b/make/lib/TestJarsInJar.jar Binary files differnew file mode 100644 index 0000000..ebc9c44 --- /dev/null +++ b/make/lib/TestJarsInJar.jar diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index 61927e9..fa8d2e0 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -29,7 +29,7 @@ rm -f $LOG #D_ARGS="-Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true" #D_ARGS="-Djogamp.debug.TraceLock" -#D_ARGS="-Djogamp.debug.JARUtil" +#D_ARGS="-Djogamp.debug.JarUtil" #D_ARGS="-Djogamp.debug.TempFileCache" #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JARUtil" #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.gluegen.UseTempJarCache=false" @@ -43,8 +43,11 @@ function onetest() { shift #libspath=$builddir/obj:$builddir/test/build/natives: libspath=$builddir/test/build/natives: - echo LD_LIBRARY_PATH=$libspath:$LD_LIBRARY_PATH java $D_ARGS -Djava.library.path=$libspath -classpath lib/junit.jar:$ANT_JARS:$builddir/gluegen-rt.jar:$builddir/gluegen.jar:$builddir/test/build/classes $clazz - LD_LIBRARY_PATH=$libspath:$LD_LIBRARY_PATH java $D_ARGS -Djava.library.path=$libspath -classpath lib/junit.jar:$ANT_JARS:$builddir/gluegen-rt.jar:$builddir/gluegen.jar:$builddir/test/build/classes $clazz + LD_LIBRARY_PATH=$libspath:$LD_LIBRARY_PATH + CLASSPATH=lib/junit.jar:$ANT_JARS:$builddir/../make/lib/TestJarsInJar.jar:$builddir/gluegen-rt.jar:$builddir/gluegen.jar:$builddir/test/build/gluegen-test.jar + echo LD_LIBRARY_PATH $LD_LIBRARY_PATH + echo CLASSPATH $CLASSPATH + java $D_ARGS -Djava.library.path=$libspath $clazz echo } @@ -63,6 +66,7 @@ function onetest() { #onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG #onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG -onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG +#onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG +onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG diff --git a/test/TestJarsInJar/ClassInJar0.java b/test/TestJarsInJar/ClassInJar0.java new file mode 100644 index 0000000..426f412 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar0.java @@ -0,0 +1,17 @@ + +public class ClassInJar0 { + static { + System.err.println("ClassInJar0.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar0.ping()"); + } + + public static void main(String args[]) { + System.err.println("ClassInJar0.main() start"); + // ClassInJar1.ping(); + // ClassInJar2.ping(); + System.err.println("ClassInJar0.main() end"); + } +} diff --git a/test/TestJarsInJar/ClassInJar1.java b/test/TestJarsInJar/ClassInJar1.java new file mode 100644 index 0000000..ff104c1 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar1.java @@ -0,0 +1,10 @@ + +public class ClassInJar1 { + static { + System.err.println("ClassInJar1.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar1.ping()"); + } +} diff --git a/test/TestJarsInJar/ClassInJar2.java b/test/TestJarsInJar/ClassInJar2.java new file mode 100644 index 0000000..2205533 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar2.java @@ -0,0 +1,10 @@ + +public class ClassInJar2 { + static { + System.err.println("ClassInJar2.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar2.ping()"); + } +} diff --git a/test/TestJarsInJar/MANIFEST.MF b/test/TestJarsInJar/MANIFEST.MF new file mode 100644 index 0000000..a592879 --- /dev/null +++ b/test/TestJarsInJar/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0
+Rsrc-Class-Path: ClassInJar1.jar sub/ClassInJar2.jar
+Main-Class: ClassInJar0
+
diff --git a/test/TestJarsInJar/make.sh b/test/TestJarsInJar/make.sh new file mode 100644 index 0000000..2860603 --- /dev/null +++ b/test/TestJarsInJar/make.sh @@ -0,0 +1,16 @@ +rm -rf classes +rm -rf TestJarsInJar.jar +mkdir classes +mkdir classes/sub + +javac -d classes *.java + +cd classes +jar cf ClassInJar1.jar ClassInJar1.class +jar cf sub/ClassInJar2.jar ClassInJar2.class +jar cmf ../MANIFEST.MF ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar +#jar cf ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar +cd .. +rm -rf classes + +jar tf TestJarsInJar.jar |