فهرست منبع

Merge pull request #3283 from andyli/travis

TravisCI fix, close #3282
Andy Li 11 سال پیش
والد
کامیت
4ac49ed6a1
1فایلهای تغییر یافته به همراه12 افزوده شده و 5 حذف شده
  1. 12 5
      tests/RunTravis.hx

+ 12 - 5
tests/RunTravis.hx

@@ -148,15 +148,19 @@ class RunTravis {
 				runCommand(Sys.getEnv("HOME") + "/flashplayerdebugger", ["-v"]);
 			case "Mac":
 				runCommand("brew", ["cask", "install", "flash-player-debugger"]);
-				runCommand("sudo", ["mkdir", "-p", Path.directory(mmcfgPath)]);
-				runCommand("printf", ["ErrorReportingEnable=1\nTraceOutputFileEnable=1" , "|", "sudo", "tee", mmcfgPath, ">", "/dev/null"]);
+				var dir = Path.directory(mmcfgPath);
+				runCommand("sudo", ["mkdir", "-p", dir]);
+				runCommand("sudo", ["chmod", "a+w", dir]);
+				File.saveContent(mmcfgPath, "ErrorReportingEnable=1\nTraceOutputFileEnable=1");
 		}
 	}
 
 	static function runFlash(swf:String):Void {
+		swf = FileSystem.fullPath(swf);
+		Sys.println('going to run $swf');
 		switch (systemName) {
 			case "Linux":
-				Sys.command(Sys.getEnv("HOME") + "/flashplayerdebugger", [swf, "&"]);
+				new Process(Sys.getEnv("HOME") + "/flashplayerdebugger", [swf]);
 			case "Mac":
 				Sys.command("open", ["-a", Sys.getEnv("HOME") + "/Applications/Flash Player Debugger.app", swf]);
 		}
@@ -452,11 +456,14 @@ class RunTravis {
 				if (Sys.getEnv("TRAVIS_SECURE_ENV_VARS") == "true" && systemName == "Linux") {
 					//https://saucelabs.com/opensource/travis
 					runCommand("npm", ["install", "wd"], true);
-					runCommand("curl", ["https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh", "-L", "|", "bash"], true);
+					runCommand("wget", ["-nv", "https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh"], true);
+					runCommand("chmod", ["a+x", "sauce_connect_setup.sh"]);
+					runCommand("./sauce_connect_setup.sh", []);
 					haxelibInstallGit("dionjwa", "nodejs-std", "master", "src", true, "nodejs");
 					runCommand("haxe", ["compile-saucelabs-runner.hxml"]);
-					runCommand("nekotools", ["server", "&"]);
+					var server = new Process("nekotools", ["server"]);
 					runCommand("node", ["RunSauceLabs.js"]);
+					server.close();
 				}
 
 				infoMsg("Test optimization:");