瀏覽代碼

TravisCI: Run optimization test on TARGET=js build.

Andy Li 11 年之前
父節點
當前提交
458c9f71fc
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 1 0
      tests/optimization/src/Macro.hx
  2. 5 0
      tests/unit/RunTravis.hx

+ 1 - 0
tests/optimization/src/Macro.hx

@@ -27,6 +27,7 @@ class Macro {
 		}
 		}
 		trace('Done $tests tests ($failures failures)');
 		trace('Done $tests tests ($failures failures)');
 		trace("SUCCESS: " + (failures == 0));
 		trace("SUCCESS: " + (failures == 0));
+		Sys.exit(failures == 0 ? 0 : 1);
 	}
 	}
 	
 	
 	static function test(className:String) {
 	static function test(className:String) {

+ 5 - 0
tests/unit/RunTravis.hx

@@ -82,6 +82,11 @@ class RunTravis {
 			case "js":
 			case "js":
 				runCommand("haxe", ["compile-js.hxml"]);
 				runCommand("haxe", ["compile-js.hxml"]);
 				runCommand("node", ["-e", "var unit = require('./unit.js').unit; unit.Test.main(); process.exit(unit.Test.success ? 0 : 1);"]);
 				runCommand("node", ["-e", "var unit = require('./unit.js').unit; unit.Test.main(); process.exit(unit.Test.success ? 0 : 1);"]);
+
+				Sys.println("Test optimization:");
+				Sys.setCwd("../optimization/");
+				runCommand("haxe", ["run.hxml"]);
+				Sys.setCwd(cwd);
 			case "java":
 			case "java":
 				runCommand("haxelib", ["git", "hxjava", "https://github.com/HaxeFoundation/hxjava.git"]);
 				runCommand("haxelib", ["git", "hxjava", "https://github.com/HaxeFoundation/hxjava.git"]);
 				runCommand("haxe", ["compile-java.hxml"]);
 				runCommand("haxe", ["compile-java.hxml"]);