Simon Krajewski před 11 roky
rodič
revize
91d810961d

+ 3 - 2
.travis.yml

@@ -18,14 +18,15 @@ env:
     - TARGET=cs
     - TARGET=python
     - TARGET=flash8
+    - TARGET=neko-sys
+    - TARGET=python-sys
+    - TARGET=cpp-sys
     - TARGET=polygonal-ds
     - TARGET=flambe
     - TARGET=hxtemplo
     - TARGET=munit
     - TARGET=openfl-samples
     - TARGET=flixel-demos
-    - TARGET=neko-sys
-    - TARGET=python-sys
     - TARGET=bytecode
 
 matrix:

+ 12 - 5
tests/RunTravis.hx

@@ -194,15 +194,16 @@ class RunTravis {
 		runCommand("sudo", ["apt-get", "install", "php5", "-y"], true);
 	}
 
-	static function getCppDependencies(unitDir:String) {
+	static function getCppDependencies() {
 		//hxcpp dependencies
 		runCommand("sudo", ["apt-get", "install", "gcc-multilib", "g++-multilib", "-y"], true);
 
 		//install and build hxcpp
 		haxelibInstallGit("HaxeFoundation", "hxcpp", true);
+		var oldDir = Sys.getCwd();
 		Sys.setCwd(Sys.getEnv("HOME") + "/haxelib/hxcpp/git/project/");
 		runCommand("neko", ["build.n"]);
-		Sys.setCwd(unitDir);
+		Sys.setCwd(oldDir);
 	}
 
 	static function getJavaDependencies() {
@@ -215,7 +216,7 @@ class RunTravis {
 	}
 
 	static function getOpenFLDependencies(unitDir:String) {
-		getCppDependencies(unitDir);
+		getCppDependencies();
 
 		haxelibInstallGit("HaxeFoundation", "format");
 		haxelibInstallGit("haxenme", "nme");
@@ -272,7 +273,7 @@ class RunTravis {
 				runCommand("haxe", ["compile-python.hxml"]);
 				runCommand("python3", ["unit.py"]);
 			case "cpp":
-				getCppDependencies(unitDir);
+				getCppDependencies();
 				runCommand("haxe", ["compile-cpp.hxml"]);
 				runCommand("./cpp/Test-debug", []);
 
@@ -338,6 +339,12 @@ class RunTravis {
 				runCommand("haxe", ["compile-neko.hxml"]);
 				Sys.setCwd("bin/neko");
 				runCommand("neko", ["sys.n", "foo", "12", "a b c\\\\"]);
+			case "cpp-sys":
+				//getCppDependencies();
+				Sys.setCwd("../sys");
+				runCommand("haxe", ["compile-cpp.hxml"]);
+				Sys.setCwd("bin/cpp");
+				runCommand("./Main-debug", ["foo", "12", "a b c\\\\"]);
 			case "python-sys":
 				getPythonDependencies();
 				Sys.setCwd("../sys");
@@ -375,7 +382,7 @@ class RunTravis {
 			case "hxtemplo":
 				getJavaDependencies();
 				getPhpDependencies();
-				getCppDependencies(unitDir);
+				getCppDependencies();
 				haxelibInstallGit("Simn", "hxparse", "development", "src");
 				haxelibInstallGit("Simn", "hxtemplo");
 

+ 2 - 0
tests/sys/compile-cpp.hxml

@@ -0,0 +1,2 @@
+compile-each.hxml
+-cpp bin/cpp

+ 2 - 1
tests/sys/compile.hxml

@@ -1,2 +1,3 @@
 --next compile-neko.hxml
---next compile-python.hxml
+--next compile-python.hxml
+--next compile-cpp.hxml

+ 1 - 1
tests/sys/src/io/TestFileInput.hx

@@ -24,7 +24,7 @@ class TestFileInput extends haxe.unit.TestCase {
 	}
 
 	override public function tearDown() {
-		FileSystem.deleteFile(path);
+		//FileSystem.deleteFile(path);
 	}
 
 	public function testRead() {