Переглянути джерело

[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"]);