Skip to content
Browse files

Add 'TestJarsInJar.jar' test JAR file for upcoming JarUtil tests (Jar…

… in Jar).
  • Loading branch information...
1 parent b3d5e20 commit 60ea6727f1a089f6afd17fcea3bd7d29353af9b4 @sgothel committed Nov 29, 2011
View
6 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 -->
View
BIN make/lib/TestJarsInJar.jar
Binary file not shown.
View
12 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
View
17 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");
+ }
+}
View
10 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()");
+ }
+}
View
10 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()");
+ }
+}
View
4 test/TestJarsInJar/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Rsrc-Class-Path: ClassInJar1.jar sub/ClassInJar2.jar
+Main-Class: ClassInJar0
+
View
16 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

0 comments on commit 60ea672

Please sign in to comment.
Something went wrong with that request. Please try again.