2011-07-05 Eric Seidel <eric@webkit.org>
[WebKit-https.git] / Tools / BuildSlaveSupport / kill-old-processes
index f42fbfc..3fa1fbc 100755 (executable)
@@ -1,16 +1,16 @@
 #!/usr/bin/python\r
-\r
 # Copyright (C) 2010 Apple Inc.  All rights reserved.\r
+# Copyright (C) 2011 Google Inc.  All rights reserved.\r
 #\r
 # Redistribution and use in source and binary forms, with or without\r
 # modification, are permitted provided that the following conditions\r
 # are met:\r
 #\r
 # 1.  Redistributions of source code must retain the above copyright\r
-#     notice, this list of conditions and the following disclaimer. \r
+#     notice, this list of conditions and the following disclaimer.\r
 # 2.  Redistributions in binary form must reproduce the above copyright\r
 #     notice, this list of conditions and the following disclaimer in the\r
-#     documentation and/or other materials provided with the distribution. \r
+#     documentation and/or other materials provided with the distribution.\r
 #\r
 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY\r
 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
 \r
 import os, sys\r
 \r
-def main():\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
+def main():\r
+    tasksToKillWin = [\r
+        "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
 \r
-    tasksToKillMac = [ "DumpRenderTree", \r
-                                       "make",\r
-                                       "perl", \r
-                                       "per5.12",\r
-                                       "ruby",\r
-                                       "Safari", \r
-                                       "Safari Web Content",\r
-                                       "WebProcess"\r
-                                       "svn", \r
-                                       "WebKitTestRunner",\r
-                                       "WebKitTestRunner Web Content",\r
-                                       "TestWebKitAPI",\r
-                                       "TestWebKitAPI Web Content",\r
-                                       "jsc",\r
-                                       "Problem Reporter",\r
-                                       "WebKitPluginAgen" ]\r
+    tasksToKillMac = [\r
+               "jsc",\r
+               "make",\r
+               "per5.12",\r
+               "perl",\r
+               "Problem Reporter",\r
+               "ruby",\r
+               "Safari Web Content",\r
+               "Safari",\r
+               "svn",\r
+               "DumpRenderTree",\r
+               "TestWebKitAPI Web Content",\r
+               "TestWebKitAPI",\r
+               "WebKitPluginAgen", # Why no 't'?\r
+               "WebKitTestRunner Web Content",\r
+               "WebKitTestRunner",\r
+               "WebProcess",\r
+       ]\r
 \r
     if sys.platform == 'darwin':\r
         for task in tasksToKillMac:\r
@@ -76,7 +80,9 @@ def main():
         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
+        raise Exception("Have not implemented kill-old-processes for this platform")\r
+    # FIXME: Should we return an exit code based on how the kills went?\r
+\r
 \r
 if __name__ == '__main__':\r
     sys.exit(main())\r