2011-06-14 Lucas Forschler <lforschler@apple.com>
[WebKit-https.git] / Tools / BuildSlaveSupport / kill-old-processes
similarity index 60%
rename from Tools/BuildSlaveSupport/mac/kill-old-processes
rename to Tools/BuildSlaveSupport/kill-old-processes
index c6ae037..f42fbfc 100755 (executable)
 import os, sys\r
 \r
 def main():\r
-    tasksToKill = [ "DumpRenderTree", \r
+\r
+    tasksToKillWin = [ "cl.exe", \r
+                                       "devenv.com", \r
+                                       "devenv.exe", \r
+                                       "DumpRenderTree.exe", \r
+                                       "DumpRenderTree_debug.exe",\r
+                                       "httpd.exe", \r
+                                       "imagediff.exe", \r
+                                       "imagediff_debug.exe", \r
+                                       "jsc.exe", \r
+                                       "jsc_debug.exe",\r
+                                       "LightTPD.exe", \r
+                                       "link.exe", \r
+                                       "midl.exe", \r
+                                       "perl.exe", \r
+                                       "Safari.exe", \r
+                                       "svn.exe", \r
+                                       "testapi.exe", \r
+                                       "testapi_debug.exe", \r
+                                       "VcBuildHelper.exe", \r
+                                       "wdiff.exe", \r
+                                       "WebKit2WebProcess.exe", \r
+                                       "WebKit2WebProcess_debug.exe", \r
+                                       "WebKitTestRunner.exe", \r
+                                       "WebKitTestRunner_debug.exe" ]\r
+\r
+    tasksToKillMac = [ "DumpRenderTree", \r
                                        "make",\r
                                        "perl", \r
                                        "per5.12",\r
@@ -41,10 +67,16 @@ def main():
                                        "TestWebKitAPI Web Content",\r
                                        "jsc",\r
                                        "Problem Reporter",\r
-                                       "WebKitPluginAgen"]\r
-                                       \r
-    for task in tasksToKill:\r
-        os.system("killall -9 -v -m " + task)\r
+                                       "WebKitPluginAgen" ]\r
+\r
+    if sys.platform == 'darwin':\r
+        for task in tasksToKillMac:\r
+            os.system("killall -9 -v -m " + task)\r
+    elif sys.platform == 'cygwin' or sys.platform == 'win32':\r
+        for task in tasksToKillWin:\r
+            os.system("taskkill /t /f /im " + task)\r
+    else:\r
+        raise Exception("Have not implemented kill-old-processes for this platform")  \r
 \r
 if __name__ == '__main__':\r
     sys.exit(main())\r