Browse Source

[ci] run cppia tests on Windows too

Dan Korostelev 4 years ago
parent
commit
122cb02595
1 changed files with 11 additions and 18 deletions
  1. 11 18
      tests/runci/targets/Cpp.hx

+ 11 - 18
tests/runci/targets/Cpp.hx

@@ -43,25 +43,18 @@ class Cpp {
 	static public function run(args:Array<String>, testCompiled:Bool, testCppia:Bool) {
 	static public function run(args:Array<String>, testCompiled:Bool, testCppia:Bool) {
 		getCppDependencies();
 		getCppDependencies();
 
 
-		switch (systemName) {
-			case "Windows":
-				if (testCompiled) {
-					runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M32"].concat(args));
-					runCpp("bin/cpp/TestMain-debug", []);
-				}
-			case _:
-				if (testCompiled) {
-					runCommand("rm", ["-rf", "cpp"]);
-					runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M64"].concat(args));
-					runCpp("bin/cpp/TestMain-debug", []);
-				}
+		var archFlag = if (systemName == "Windows") "HXCPP_M32" else "HXCPP_M64";
+		if (testCompiled) {
+			runCommand("rm", ["-rf", "cpp"]);
+			runCommand("haxe", ["compile-cpp.hxml", "-D", archFlag].concat(args));
+			runCpp("bin/cpp/TestMain-debug", []);
+		}
 
 
-				if (testCppia) {
-					runCommand("haxe", ["compile-cppia-host.hxml"].concat(args));
-					runCommand("haxe", ["compile-cppia.hxml"].concat(args));
-					runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
-					runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
-				}
+		if (testCppia) {
+			runCommand("haxe", ["compile-cppia-host.hxml"].concat(args));
+			runCommand("haxe", ["compile-cppia.hxml"].concat(args));
+			runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
+			runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
 		}
 		}
 
 
 		changeDirectory(sysDir);
 		changeDirectory(sysDir);