From 60ea6727f1a089f6afd17fcea3bd7d29353af9b4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 29 Nov 2011 04:50:16 +0100 Subject: Add 'TestJarsInJar.jar' test JAR file for upcoming JarUtil tests (Jar in Jar). --- make/build-test.xml | 6 ++++-- make/lib/TestJarsInJar.jar | Bin 0 -> 2256 bytes make/scripts/runtest.sh | 12 ++++++++---- test/TestJarsInJar/ClassInJar0.java | 17 +++++++++++++++++ test/TestJarsInJar/ClassInJar1.java | 10 ++++++++++ test/TestJarsInJar/ClassInJar2.java | 10 ++++++++++ test/TestJarsInJar/MANIFEST.MF | 4 ++++ test/TestJarsInJar/make.sh | 16 ++++++++++++++++ 8 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 make/lib/TestJarsInJar.jar create mode 100644 test/TestJarsInJar/ClassInJar0.java create mode 100644 test/TestJarsInJar/ClassInJar1.java create mode 100644 test/TestJarsInJar/ClassInJar2.java create mode 100644 test/TestJarsInJar/MANIFEST.MF create mode 100644 test/TestJarsInJar/make.sh 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 @@ + @@ -73,11 +74,12 @@ + - - + + diff --git a/make/lib/TestJarsInJar.jar b/make/lib/TestJarsInJar.jar new file mode 100644 index 0000000..ebc9c44 Binary files /dev/null and b/make/lib/TestJarsInJar.jar differ 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 -- cgit v1.2.3