tests: mate $(TEST_CLASS_FILES)
+CALLF = $(basename $@).call
+testcase = ./tools/openjdktest.sh "$(1) $(basename $@)"
%.test: %.class mate
- @./tools/openjdktest.sh $(basename $@)
-
+ @if [ -f $(CALLF) ]; \
+ then $(call testcase,`cat $(CALLF)`); \
+ else $(call testcase, ); fi
+COMPILEF = $(basename $@).compile
%.class: %.java
- $(JAVAC) $<
+ @if [ -f $(COMPILEF) ]; \
+ then $(SHELL) $(COMPILEF); \
+ else $(JAVAC) $<; fi
ffi/native.o: ffi/native.c
ghc -Wall -O2 -c $< -o $@
--- /dev/null
+-cp .:tests/this/is/a/class
--- /dev/null
+javac tests/this/is/a/class/path/test/ClassPath1.java
+javac -classpath tests/this/is/a/class tests/ClassPath2.java
--- /dev/null
+package tests;
+
+public class ClassPath2 {
+ public static void main(String args[]) {
+ path.test.ClassPath1.hello();
+ }
+}
--- /dev/null
+-cp tests/this/is/a/class:. path.test.ClassPath2
--- /dev/null
+javac tests/this/is/a/class/path/test/ClassPath2.java
--- /dev/null
+package tests;
+
+public class ClassPath3 {
+ public static void main(String args[]) {
+ // fake
+ }
+}
--- /dev/null
+-cp .:tests/jar1.jar
--- /dev/null
+javac -classpath tests/jar1.jar tests/JARUsage1.java
--- /dev/null
+package tests;
+
+public class JARUsage1 {
+ public static void main(String []args) {
+ javaapplication2.NewClass.OHAI();
+ }
+}
--- /dev/null
+-jar tests/jar1.jar
--- /dev/null
+package tests;
+
+public class JARUsage2 {
+ public static void main(String []args) {
+ // dummy
+ }
+}
--- /dev/null
+package path.test;
+
+public class ClassPath1 {
+ public static void hello () {
+ System.out.printf("hello, i'm ClassPath1\n");
+ }
+
+ public static void main(String []args) {
+ System.out.printf("hello again\n");
+ }
+}
--- /dev/null
+package path.test;
+
+public class ClassPath2 {
+ public static void main(String []args) {
+ System.out.printf("hello again\n");
+ }
+}