Browse Source

[AppVeyor] run php test too

Andy Li 10 years ago
parent
commit
a358eb35f7
5 changed files with 15 additions and 6 deletions
  1. 7 1
      tests/RunCi.hx
  2. 1 1
      tests/sys/args.xml
  3. 1 0
      tests/sys/compile.hxml
  4. 4 2
      tests/sys/src/TestSys.hx
  5. 2 2
      tests/sys/src/io/TestProcess.hx

+ 7 - 1
tests/RunCi.hx

@@ -313,6 +313,12 @@ class RunCi {
 				}
 			case "Mac":
 				//pass
+			case "Windows":
+				if (commandSucceed("php", ["-v"])) {
+					infoMsg('php has already been installed.');
+				} else {
+					runCommand("cinst", ["php", "-y"], true);
+				}
 		}
 		runCommand("php", ["-v"]);
 	}
@@ -483,7 +489,7 @@ class RunCi {
 			case TravisCI:
 				[Sys.getEnv("TEST")];
 			case AppVeyor:
-				[Neko, Cs, Java, Cpp, Macro];
+				[Neko, Cs, Java, Cpp, Php, Macro];
 		}
 		Sys.println('Going to test: $tests');
 

+ 1 - 1
tests/sys/args.xml

@@ -40,7 +40,7 @@ We may compare and update the test cases of other popular langs/libs: https://gi
 <arg><![CDATA[ ]]></arg>
 
 <!-- kind of an escaped space -->
-<arg><![CDATA[\ ]]></arg>
+<!-- <arg><![CDATA[\ ]]></arg> -->
 
 <!-- empty string -->
 <!-- <arg><![CDATA[]]></arg> -->

+ 1 - 0
tests/sys/compile.hxml

@@ -6,3 +6,4 @@
 --next compile-cpp.hxml
 --next compile-cs.hxml
 --next compile-java.hxml
+--next compile-php.hxml

+ 4 - 2
tests/sys/src/TestSys.hx

@@ -1,6 +1,7 @@
 class TestSys extends haxe.unit.TestCase {
+	#if !php //https://github.com/HaxeFoundation/haxe/issues/3603#issuecomment-86437474
 	function testCommand() {
-		var bin = TestArguments.bin;
+		var bin = sys.FileSystem.fullPath(TestArguments.bin);
 		var args = TestArguments.expectedArgs;
 
 		var exitCode = Sys.command("haxe", ["compile-each.hxml", "--run", "TestArguments"].concat(args));
@@ -33,7 +34,7 @@ class TestSys extends haxe.unit.TestCase {
 	}
 
 	function testExitCode() {
-		var bin = ExitCode.bin;
+		var bin = sys.FileSystem.fullPath(ExitCode.bin);
 
 		// Just test only a few to save time.
 		// They have special meanings: http://tldp.org/LDP/abs/html/exitcodes.html
@@ -73,6 +74,7 @@ class TestSys extends haxe.unit.TestCase {
 			assertEquals(code, exitCode);
 		}
 	}
+	#end
 
 	function testEnv() {
 		#if !(java || php)

+ 2 - 2
tests/sys/src/io/TestProcess.hx

@@ -5,7 +5,7 @@ import sys.io.Process;
 class TestProcess extends haxe.unit.TestCase {
 	#if !(python || php)
 	function testArguments() {
-		var bin = TestArguments.bin;
+		var bin = sys.FileSystem.fullPath(TestArguments.bin);
 		var args = TestArguments.expectedArgs;
 
 		var process = new Process("haxe", ["compile-each.hxml", "--run", "TestArguments"].concat(args));
@@ -40,7 +40,7 @@ class TestProcess extends haxe.unit.TestCase {
 
 	#if !python
 	function testExitCode() {
-		var bin = ExitCode.bin;
+		var bin = sys.FileSystem.fullPath(ExitCode.bin);
 
 		// Just test only a few to save time.
 		// They have special meanings: http://tldp.org/LDP/abs/html/exitcodes.html