소스 검색

[tests] add party tests

Simon Krajewski 3 년 전
부모
커밋
13732db36b
3개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      .gitignore
  2. 2 0
      tests/runci/Config.hx
  3. 18 0
      tests/runci/targets/Macro.hx

+ 1 - 0
.gitignore

@@ -135,3 +135,4 @@ tests/server/test.js.map
 *.merlin
 *.merlin
 lib.sexp
 lib.sexp
 src/compiler/version.ml
 src/compiler/version.ml
+tests/party

+ 2 - 0
tests/runci/Config.hx

@@ -19,6 +19,8 @@ class Config {
 	static public final sourcemapsDir = Path.join([cwd, "sourcemaps"]);
 	static public final sourcemapsDir = Path.join([cwd, "sourcemaps"]);
 	static public final nullSafetyDir = Path.join([cwd, "nullsafety"]);
 	static public final nullSafetyDir = Path.join([cwd, "nullsafety"]);
 	static public final threadsDir = Path.join([cwd, "threads"]);
 	static public final threadsDir = Path.join([cwd, "threads"]);
+	// this stands for third-party, but I've always wanted a party directory
+	static public final partyDir = Path.join([cwd, "party"]);
 
 
 	static public function getMiscSubDir(...subDir:String)
 	static public function getMiscSubDir(...subDir:String)
 		return Path.join([cwd, "misc"].concat(subDir.toArray()));
 		return Path.join([cwd, "misc"].concat(subDir.toArray()));

+ 18 - 0
tests/runci/targets/Macro.hx

@@ -1,5 +1,6 @@
 package runci.targets;
 package runci.targets;
 
 
+import sys.io.File;
 import runci.System.*;
 import runci.System.*;
 import runci.Config.*;
 import runci.Config.*;
 
 
@@ -38,5 +39,22 @@ class Macro {
 
 
 		changeDirectory(threadsDir);
 		changeDirectory(threadsDir);
 		runCommand("haxe", ["build.hxml", "--interp"]);
 		runCommand("haxe", ["build.hxml", "--interp"]);
+
+		deleteDirectoryRecursively(partyDir);
+		runCommand("mkdir", [partyDir]);
+		changeDirectory(partyDir);
+		party();
+	}
+
+	static function party() {
+		runCommand("git", ["clone", "https://github.com/haxetink/tink_core", "tink_core"]);
+		changeDirectory("tink_core");
+		runCommand("haxelib", ["install", "tests.hxml", "--always"]);
+		// <derp>
+		final c = File.getContent("tests/RunTests.hx");
+		final c = StringTools.replace(c, "new Futures(),", "");
+		File.saveContent("tests/RunTests.hx", c);
+		// </derp>
+		runCommand("haxe", ["tests.hxml", "-w", "-WDeprecated", "--interp"]);
 	}
 	}
 }
 }