瀏覽代碼

[CI] clean up

Andy Li 8 年之前
父節點
當前提交
92c6bcf57d
共有 1 個文件被更改,包括 0 次插入224 次删除
  1. 0 224
      tests/RunCi.hx

+ 0 - 224
tests/RunCi.hx

@@ -1,17 +1,10 @@
 using StringTools;
 
-import yaml.*;
-
 import sys.*;
 import sys.io.*;
 import haxe.*;
 import haxe.io.*;
 
-private typedef TravisConfig = {
-	before_install: Array<String>,
-	script: Array<String>
-}
-
 /**
 	List of "TEST" defined in the "matrix" section of ".travis.yml".
 */
@@ -272,69 +265,6 @@ class RunCi {
 		runCommand(bin, args);
 	}
 
-	static function parseCommand(cmd:String) {
-		var args = [];
-		var offset = 0;
-		var cur = new StringBuf();
-		var inString = false;
-
-		while(true) {
-			switch(cmd.fastCodeAt(offset++)) {
-				case '"'.code:
-					inString = !inString;
-				case ' '.code if (!inString):
-					if (cur.length > 0) {
-						args.push(cur.toString());
-						cur = new StringBuf();
-					}
-				case '\\'.code:
-					cur.addChar(cmd.fastCodeAt(offset++));
-				case "$".code:
-					switch (cmd.fastCodeAt(offset)) {
-						case '('.code:
-							++offset;
-							var env = new StringBuf();
-							while(true) {
-								switch(cmd.fastCodeAt(offset++)) {
-									case ')'.code:
-										break;
-									case c:
-										env.addChar(c);
-								}
-							}
-							cur.add(Sys.getEnv(env.toString()));
-						case _:
-							cur.addChar("$".code);
-					}
-				case c:
-					cur.addChar(c);
-			}
-			if (offset == cmd.length) {
-				break;
-			}
-		}
-		if (cur.length > 0) {
-			args.push(cur.toString());
-		}
-		return args;
-	}
-
-	//static function parseTravisFile(path:String, ignoreBeforeInstall = false) {
-		//var yaml:TravisConfig = yaml.Yaml.read(path, Parser.options().useObjects());
-		//if (!ignoreBeforeInstall) {
-			//for (code in yaml.before_install) {
-				//var args = parseCommand(code);
-				//var cmd = args.shift();
-				//runCommand(cmd, args);
-			//}
-		//}
-		//for (code in yaml.script) {
-			//var args = parseCommand(code);
-			//var cmd = args.shift();
-			//runCommand(cmd, args);
-		//}
-	//}
-
 	static function commandSucceed(cmd:String, args:Array<String>):Bool {
 		return try {
 			var p = new Process(cmd, args);
@@ -507,33 +437,6 @@ class RunCi {
 		haxelibInstallGit("HaxeFoundation", "hxcs", true);
 	}
 
-	static var gotOpenFLDependencies = false;
-	static function getOpenFLDependencies() {
-		if (gotOpenFLDependencies) return;
-
-		getCppDependencies();
-
-		haxelibInstallGit("HaxeFoundation", "format");
-		haxelibInstallGit("haxenme", "nme");
-		haxelibInstallGit("haxenme", "nme-dev");
-		haxelibInstallGit("openfl", "svg");
-		haxelibInstallGit("openfl", "lime");
-		haxelibInstallGit("openfl", "lime-tools");
-		haxelibInstallGit("openfl", "openfl-native");
-		haxelibInstallGit("openfl", "openfl-html5");
-		haxelibInstallGit("openfl", "openfl");
-
-		switch (systemName) {
-			case "Linux":
-				haxelibRun(["openfl", "rebuild", "linux"]);
-			case "Mac":
-				haxelibRun(["openfl", "rebuild", "mac"]);
-		}
-		haxelibRun(["openfl", "rebuild", "tools"]);
-
-		gotOpenFLDependencies = true;
-	}
-
 	/**
 		Install python and return the names of the installed pythons.
 	*/
@@ -1067,22 +970,6 @@ class RunCi {
 							fail();
 					case Hl:
 						runCommand("haxe", ["compile-hl.hxml"]);
-					case ThirdParty:
-						getPhpDependencies();
-						getJavaDependencies();
-						getJSDependencies();
-						getCsDependencies();
-						getPythonDependencies();
-						getCppDependencies();
-						//getOpenFLDependencies();
-
-						//testPolygonalDs();
-						// if (systemName == "Linux") testFlambe(); //#3439
-						testHxTemplo();
-						testMUnit();
-						testHaxeQuake();
-						//testOpenflSamples();
-						//testFlixelDemos();
 					case t:
 						throw "unknown target: " + t;
 				}
@@ -1110,116 +997,5 @@ class RunCi {
 			Sys.exit(1);
 		}
 	}
-
-	static function testHxTemplo() {
-		infoMsg("Test hx-templo:");
-
-		changeDirectory(unitDir);
-
-		haxelibInstallGit("Simn", "hxparse", "master", "src");
-		haxelibInstallGit("Simn", "hxtemplo");
-
-		var buildArgs = [
-			"-cp", "src",
-			"-cp", "test",
-			"-main", "Test",
-			"-lib", "hxparse",
-			"-dce", "full"
-		];
-
-		changeDirectory(getHaxelibPath("hxtemplo") + "..");
-		runCommand("haxe", ["build.hxml"]);
-	}
-
-	static function testPolygonalDs() {
-		infoMsg("Test polygonal-ds:");
-
-		changeDirectory(unitDir);
-		haxelibInstallGit("Simn", "ds", "python-support", null, false, "polygonal-ds");
-		haxelibInstallGit("polygonal", "core", "master", "src", false, "polygonal-core");
-		haxelibInstallGit("polygonal", "printf", "master", "src", false, "polygonal-printf");
-		changeDirectory(getHaxelibPath("polygonal-ds"));
-		runCommand("haxe", ["build.hxml"]);
-		runCommand("python3", ["unit.py"]);
-		runCommand("node", ["unit.js"]);
-	}
-
-	static function testMUnit() {
-		infoMsg("Test MUnit:");
-
-		changeDirectory(unitDir);
-
-		haxelibInstallGit("massiveinteractive", "mconsole", "master", "src");
-		haxelibInstallGit("massiveinteractive", "MassiveCover", "master", "src", false, "mcover");
-		haxelibInstallGit("massiveinteractive", "MassiveLib", "master", "src", false, "mlib");
-		haxelibInstallGit("massiveinteractive", "MassiveUnit", "2.1.2", "src", false, "munit");
-		changeDirectory(Path.join([getHaxelibPath("munit"), "..", "tool"]));
-		runCommand("haxe", ["build.hxml"]);
-		haxelibRun(["munit", "test", "-result-exit-code", "-neko"], true);
-		changeDirectory("../");
-		haxelibRun(["munit", "test", "-result-exit-code", "-neko"], true);
-	}
-
-	static function testHaxeQuake() {
-		infoMsg("Test HaxeQuake:");
-
-		changeDirectory(unitDir);
-		runCommand("git", ["clone", "https://github.com/nadako/HaxeQuake"]);
-		changeDirectory("HaxeQuake/Client");
-		runCommand("haxe", ["build.hxml"]);
-	}
-
-	static function testFlambe() {
-		infoMsg("Test Flambe:");
-
-		changeDirectory(unitDir);
-		runCommand("git", ["clone", "https://github.com/aduros/flambe"]);
-		runCommand("sh", ["flambe/bin/run-travis"]);
-	}
-
-	//static function testOpenflSamples() {
-		//infoMsg("Test OpenFL Samples:");
-//
-		//changeDirectory(unitDir);
-//
-		//haxelibInstallGit("jgranick", "actuate");
-		//haxelibInstallGit("jgranick", "box2d");
-		//haxelibInstallGit("jgranick", "layout");
-		//haxelibInstallGit("openfl", "swf");
-		//haxelibInstallGit("openfl", "openfl-samples");
-//
-		//var path = getHaxelibPath("openfl-samples");
-		//var old = Sys.getEnv("pwd");
-		//Sys.putEnv("pwd", path);
-		//parseTravisFile(haxe.io.Path.join([path, ".travis.yml"]), true);
-		//if (old != null) {
-			//Sys.putEnv("pwd", old);
-		//}
-	//}
-
-	static function testFlixelDemos() {
-		infoMsg("Test Flixel Demos:");
-
-		changeDirectory(unitDir);
-		getOpenFLDependencies();
-
-		haxelibInstall("systools");
-		haxelibInstall("spinehx");
-		haxelibInstall("nape");
-		haxelibInstall("task");
-
-		haxelibInstallGit("larsiusprime", "firetongue");
-		haxelibInstallGit("YellowAfterLife", "openfl-bitfive");
-
-		haxelibInstallGit("HaxeFlixel", "flixel");
-		haxelibInstallGit("HaxeFlixel", "flixel-addons");
-		haxelibInstallGit("HaxeFlixel", "flixel-ui");
-		haxelibInstallGit("HaxeFlixel", "flixel-demos");
-		haxelibInstallGit("HaxeFlixel", "flixel-tools");
-
-		haxelibRun(["flixel-tools", "testdemos", "-flash"]);
-		haxelibRun(["flixel-tools", "testdemos", "-neko"]);
-		haxelibRun(["flixel-tools", "testdemos", "-html5"]);
-	}
 }