Browse Source

[AppVeyor] setup and test python3

Andy Li 10 năm trước cách đây
mục cha
commit
4768d9991f
3 tập tin đã thay đổi với 12 bổ sung2 xóa
  1. 4 1
      appveyor.yml
  2. 7 0
      tests/RunCi.hx
  3. 1 1
      tests/sys/src/TestFileSystem.hx

+ 4 - 1
appveyor.yml

@@ -15,7 +15,7 @@ environment:
         ADD_REVISION: 1
         OCAMLOPT: ocamlopt.opt
     matrix:
-        - TEST: "neko,cs,java,macro"
+        - TEST: "neko,python,cs,java,macro"
         - TEST: "cpp"
 
 skip_tags: true
@@ -44,6 +44,9 @@ install:
     - neko ../boot/nekoc tools/install.neko
     - neko tools/install -nolibs > log.txt || type log.txt
     - neko -version
+    # setup python
+    - cmd: mklink C:\Python34-x64\python3.exe C:\Python34-x64\python.exe
+    - set PATH=C:\Python34-x64;%PATH%
 
 build_script:
     - 'cd %APPVEYOR_BUILD_FOLDER%'

+ 7 - 0
tests/RunCi.hx

@@ -475,6 +475,13 @@ class RunCi {
 				runCommand("pypy3", ["-V"]);
 
 				return ["python3", "pypy3"];
+			case "Windows":
+				if (commandSucceed("python3", ["-V"]))
+					infoMsg('python3 has already been installed.');
+				else
+					throw "please install python 3.x and make it available as python3 in PATH";
+				runCommand("python3", ["-V"]);
+				return ["python3"];
 		}
 
 		return [];

+ 1 - 1
tests/sys/src/TestFileSystem.hx

@@ -93,7 +93,7 @@ class TestFileSystem extends haxe.unit.TestCase {
 	}
 
 	function testWindowsSpecialCases() {
-		if (Sys.systemName() != "Windows") {
+		if (Sys.systemName() != "Windows" #if python || true #end) {
 			assertTrue(true);
 			return;
 		}