Browse Source

TravisCI: Run optimization test on TARGET=js build.

Andy Li 11 years ago
parent
commit
458c9f71fc
2 changed files with 6 additions and 0 deletions
  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("SUCCESS: " + (failures == 0));
+		Sys.exit(failures == 0 ? 0 : 1);
 	}
 	
 	static function test(className:String) {

+ 5 - 0
tests/unit/RunTravis.hx

@@ -82,6 +82,11 @@ class RunTravis {
 			case "js":
 				runCommand("haxe", ["compile-js.hxml"]);
 				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":
 				runCommand("haxelib", ["git", "hxjava", "https://github.com/HaxeFoundation/hxjava.git"]);
 				runCommand("haxe", ["compile-java.hxml"]);