Browse Source

do not compile -each.hxml files in misc tests and grab stdout/stderr output to avoid locks

Simon Krajewski 11 years ago
parent
commit
3958a2f924
1 changed files with 3 additions and 2 deletions
  1. 3 2
      tests/misc/src/Main.hx

+ 3 - 2
tests/misc/src/Main.hx

@@ -26,7 +26,7 @@ class Main {
 				var path = Path.join([dirPath, file]);
 				var path = Path.join([dirPath, file]);
 				if (FileSystem.isDirectory(path)) {
 				if (FileSystem.isDirectory(path)) {
 					browse(path);
 					browse(path);
-				} else if (file.endsWith(".hxml")) {
+				} else if (file.endsWith(".hxml") && !file.endsWith("-each.hxml")) {
 					var old = Sys.getCwd();
 					var old = Sys.getCwd();
 					Sys.setCwd(dirPath);
 					Sys.setCwd(dirPath);
 					Sys.println('Running haxe $path');
 					Sys.println('Running haxe $path');
@@ -73,6 +73,8 @@ class Main {
 
 
 	static function runCommand(command:String, args:Array<String>, expectFailure:Bool, expectStderr:String) {
 	static function runCommand(command:String, args:Array<String>, expectFailure:Bool, expectStderr:String) {
 		var proc = new sys.io.Process(command, args);
 		var proc = new sys.io.Process(command, args);
+		var stderr = proc.stderr.readAll().toString();
+		proc.stdout.readAll();
 		var exit = proc.exitCode();
 		var exit = proc.exitCode();
 		var success = exit == 0;
 		var success = exit == 0;
 		var result = switch [success, expectFailure] {
 		var result = switch [success, expectFailure] {
@@ -84,7 +86,6 @@ class Main {
 			case [false, true]:
 			case [false, true]:
 				true;
 				true;
 			case [false, false]:
 			case [false, false]:
-				var stderr = proc.stderr.readAll().toString();
 				Sys.print(stderr);
 				Sys.print(stderr);
 				false;
 				false;
 		}
 		}