浏览代码

[cs] Fix enum problem with -D no_root. Add -D no_root to be tested also by the CI

Cauê Waneck 10 年之前
父节点
当前提交
7686f4e3da
共有 2 个文件被更改,包括 18 次插入19 次删除
  1. 1 0
      gencs.ml
  2. 17 19
      tests/RunCi.hx

+ 1 - 0
gencs.ml

@@ -753,6 +753,7 @@ let configure gen =
 			| [] when is_hxgen md -> ["haxe";"root"], params
 			| [] -> (match md with
 				| TClassDecl { cl_path = ([],"Std" | [],"Math") } -> ["haxe";"root"], params
+				| TClassDecl { cl_meta = m } when Meta.has Meta.Enum m -> ["haxe";"root"], params
 				| _ -> [], params)
 			| ns when params = [] -> List.map change_id ns, params
 			| ns ->

+ 17 - 19
tests/RunCi.hx

@@ -552,32 +552,30 @@ class RunCi {
 				case Cs:
 					getCsDependencies();
 
-					switch [ci, systemName] {
+					var compl = switch [ci, systemName] {
 						case [TravisCI, "Linux"]:
-							runCommand("haxe", ["compile-cs-travis.hxml"]);
-							runExe("bin/cs/bin/Test-Debug.exe");
+							"-travis";
+						case _:
+							"";
+					};
 
-							runCommand("haxe", ["compile-cs-unsafe-travis.hxml"]);
-							runExe("bin/cs_unsafe/bin/Test-Debug.exe");
+					runCommand("haxe", ["compile-cs$compl.hxml"]);
+					runExe("bin/cs/bin/Test-Debug.exe");
 
-							runCommand("haxe", ["compile-cs-travis.hxml","-D","erase_generics"]);
-							runExe("bin/cs/bin/Test-Debug.exe");
+					runCommand("haxe", ["compile-cs-unsafe$compl.hxml"]);
+					runExe("bin/cs_unsafe/bin/Test-Debug.exe");
 
-							runCommand("haxe", ["compile-cs-unsafe-travis.hxml","-D","erase_generics"]);
-							runExe("bin/cs_unsafe/bin/Test-Debug.exe");
-						case _:
-							runCommand("haxe", ["compile-cs.hxml"]);
-							runExe("bin/cs/bin/Test-Debug.exe");
+					runCommand("haxe", ["compile-cs$compl.hxml","-D","erase_generics"]);
+					runExe("bin/cs/bin/Test-Debug.exe");
 
-							runCommand("haxe", ["compile-cs-unsafe.hxml"]);
-							runExe("bin/cs_unsafe/bin/Test-Debug.exe");
+					runCommand("haxe", ["compile-cs-unsafe$compl.hxml","-D","erase_generics"]);
+					runExe("bin/cs_unsafe/bin/Test-Debug.exe");
 
-							runCommand("haxe", ["compile-cs.hxml","-D","erase_generics"]);
-							runExe("bin/cs/bin/Test-Debug.exe");
+					runCommand("haxe", ["compile-cs$compl.hxml","-D","no_root"]);
+					runExe("bin/cs/bin/Test-Debug.exe");
 
-							runCommand("haxe", ["compile-cs-unsafe.hxml","-D","erase_generics"]);
-							runExe("bin/cs_unsafe/bin/Test-Debug.exe");
-					}
+					runCommand("haxe", ["compile-cs-unsafe$compl.hxml","-D","no_root","-D","erase_generics"]);
+					runExe("bin/cs_unsafe/bin/Test-Debug.exe");
 
 					changeDirectory(sysDir);
 					runCommand("haxe", ["compile-cs.hxml"]);