Parcourir la source

work around java.Init issue so we can run JVM roundtrip on CI

see #11493
Simon Krajewski il y a 1 an
Parent
commit
55795dd6fe

+ 2 - 0
std/jvm/Jvm.hx

@@ -40,6 +40,8 @@ import jvm.annotation.EnumValueReflectionInformation;
 @:keep
 @:native('haxe.jvm.Jvm')
 class Jvm {
+	extern static final init:java.Init;
+
 	extern static public function instanceof<S, T>(obj:S, type:T):Bool;
 
 	extern static public function referenceEquals<T>(v1:T, v2:T):Bool;

+ 10 - 2
tests/runci/targets/Jvm.hx

@@ -10,12 +10,20 @@ class Jvm {
 		deleteDirectoryRecursively("bin/jvm");
 		Java.getJavaDependencies();
 
+		runCommand("haxe", ["compile-java-native.hxml"]);
+
 		for (level in 0...3) {
 			final args = args.concat(["-D", "jvm.dynamic-level=" + level]);
-			runCommand("haxe", ["compile-jvm.hxml"].concat(args));
+			runCommand("haxe", ["compile-jvm-only.hxml", "--times"].concat(args));
+			runCommand("java", ["-jar", "bin/unit.jar"]);
+
+			runCommand("haxe", ["compile-hxb-jvm-read.hxml", "--times"].concat(args));
+			runCommand("java", ["-jar", "bin/unit.jar"]);
+
+			runCommand("haxe", ["compile-jvm-only.hxml","-dce","no"].concat(args));
 			runCommand("java", ["-jar", "bin/unit.jar"]);
 
-			runCommand("haxe", ["compile-jvm.hxml","-dce","no"].concat(args));
+			runCommand("haxe", ["compile-hxb-jvm-read.hxml"].concat(args));
 			runCommand("java", ["-jar", "bin/unit.jar"]);
 		}
 

+ 2 - 0
tests/unit/compile-java-native.hxml

@@ -0,0 +1,2 @@
+#java native build
+-cmd "haxelib run hxjava native_java/hxjava_build.txt --out native_java/native"

+ 1 - 2
tests/unit/compile-java.hxml

@@ -1,5 +1,4 @@
-#java native build
--cmd "haxelib run hxjava native_java/hxjava_build.txt --out native_java/native"
+compile-java-native.hxml
 
 --next
 

+ 1 - 2
tests/unit/compile-jvm.hxml

@@ -1,5 +1,4 @@
-#java native build
--cmd "haxelib run hxjava native_java/hxjava_build.txt --out native_java/native"
+compile-java-native.hxml
 
 --next