소스 검색

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

see #11493
Simon Krajewski 1 년 전
부모
커밋
55795dd6fe
5개의 변경된 파일16개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 0
      std/jvm/Jvm.hx
  2. 10 2
      tests/runci/targets/Jvm.hx
  3. 2 0
      tests/unit/compile-java-native.hxml
  4. 1 2
      tests/unit/compile-java.hxml
  5. 1 2
      tests/unit/compile-jvm.hxml

+ 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