package functionalTests;

import java.io.File;
import java.io.IOException;


public class Helper {
	
	static public void killJVMs() {
		File dir = new File(System.getProperty("proactive.dir"));
		File cmd = new File(dir + "/dev/scripts/killTests");
		if (cmd.exists()) {
			try {
				Runtime.getRuntime().exec(cmd.toString(), null, dir);
			} catch (IOException e) {
				e.printStackTrace();
			}
		} else {
			System.err.println(cmd + "does not exist");
		}
	}
}

@@ -69,16 +69,75 @@
 ption;%0A%0A
+import org.objectweb.proactive.core.util.OperatingSystem;%0A%0A
 %0Apublic 
@@ -340,61 +340,270 @@
 %09%09%09%09
-Runtime.getRuntime().exec(cmd.toString(), null, dir);
+switch (OperatingSystem.getOperatingSystem()) %7B%0A%09%09%09%09case unix:%0A%09%09%09%09%09Runtime.getRuntime().exec(cmd.getAbsolutePath().replaceAll(%22 %22, %22%5C%5C %22), null, dir);%0A%09%09%09%09%09break;%0A%0A%09%09%09%09default:%0A%09%09%09%09%09System.err.println(%22TODO: Kill JVMs on Windows also !%22);%0A%09%09%09%09%09break;%0A%09%09%09%09%7D%0A%09%09%09%09
 %0A%09%09%09

Escape spaces in cmd.