소스 검색

[tests] allow running display tests with another haxe version (#11968)

Rudy Ges 7 달 전
부모
커밋
83258a4be2
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      tests/display/src/BaseDisplayTestContext.hx

+ 10 - 1
tests/display/src/BaseDisplayTestContext.hx

@@ -6,7 +6,16 @@ using StringTools;
 import Types;
 
 class BaseDisplayTestContext {
-	static var haxeServer = haxeserver.HaxeServerSync.launch("haxe", []);
+	static var haxeServer = {
+		var hx = "haxe";
+		var testHaxe = haxe.macro.Compiler.getDefine("test_haxe");
+		if (testHaxe != null) {
+			Sys.putEnv("HAXE_STD_PATH", '${Path.directory(testHaxe)}/std');
+			hx = testHaxe;
+		}
+
+		haxeserver.HaxeServerSync.launch(hx, []);
+	}
 
 	var dir:String = ".";
 	var vfs:Vfs;