Modified: trunk/Tools/BuildSlaveSupport/kill-old-processes (90411 => 90412)
--- trunk/Tools/BuildSlaveSupport/kill-old-processes 2011-07-05 22:54:50 UTC (rev 90411)
+++ trunk/Tools/BuildSlaveSupport/kill-old-processes 2011-07-05 22:59:53 UTC (rev 90412)
@@ -1,16 +1,16 @@
#!/usr/bin/python
-
# Copyright (C) 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
+# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
+# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -25,50 +25,54 @@
import os, sys
+
def main():
+ tasksToKillWin = [
+ "cl.exe",
+ "devenv.com",
+ "devenv.exe",
+ "DumpRenderTree.exe",
+ "DumpRenderTree_debug.exe",
+ "httpd.exe",
+ "imagediff.exe",
+ "imagediff_debug.exe",
+ "jsc.exe",
+ "jsc_debug.exe",
+ "LightTPD.exe",
+ "link.exe",
+ "midl.exe",
+ "perl.exe",
+ "Safari.exe",
+ "svn.exe",
+ "testapi.exe",
+ "testapi_debug.exe",
+ "VcBuildHelper.exe",
+ "wdiff.exe",
+ "WebKit2WebProcess.exe",
+ "WebKit2WebProcess_debug.exe",
+ "WebKitTestRunner.exe",
+ "WebKitTestRunner_debug.exe",
+ ]
- tasksToKillWin = [ "cl.exe",
- "devenv.com",
- "devenv.exe",
- "DumpRenderTree.exe",
- "DumpRenderTree_debug.exe",
- "httpd.exe",
- "imagediff.exe",
- "imagediff_debug.exe",
- "jsc.exe",
- "jsc_debug.exe",
- "LightTPD.exe",
- "link.exe",
- "midl.exe",
- "perl.exe",
- "Safari.exe",
- "svn.exe",
- "testapi.exe",
- "testapi_debug.exe",
- "VcBuildHelper.exe",
- "wdiff.exe",
- "WebKit2WebProcess.exe",
- "WebKit2WebProcess_debug.exe",
- "WebKitTestRunner.exe",
- "WebKitTestRunner_debug.exe" ]
+ tasksToKillMac = [
+ "jsc",
+ "make",
+ "per5.12",
+ "perl",
+ "Problem Reporter",
+ "ruby",
+ "Safari Web Content",
+ "Safari",
+ "svn",
+ "DumpRenderTree",
+ "TestWebKitAPI Web Content",
+ "TestWebKitAPI",
+ "WebKitPluginAgen", # Why no 't'?
+ "WebKitTestRunner Web Content",
+ "WebKitTestRunner",
+ "WebProcess",
+ ]
- tasksToKillMac = [ "DumpRenderTree",
- "make",
- "perl",
- "per5.12",
- "ruby",
- "Safari",
- "Safari Web Content",
- "WebProcess"
- "svn",
- "WebKitTestRunner",
- "WebKitTestRunner Web Content",
- "TestWebKitAPI",
- "TestWebKitAPI Web Content",
- "jsc",
- "Problem Reporter",
- "WebKitPluginAgen" ]
-
if sys.platform == 'darwin':
for task in tasksToKillMac:
os.system("killall -9 -v -m " + task)
@@ -76,7 +80,9 @@
for task in tasksToKillWin:
os.system("taskkill /t /f /im " + task)
else:
- raise Exception("Have not implemented kill-old-processes for this platform")
+ raise Exception("Have not implemented kill-old-processes for this platform")
+ # FIXME: Should we return an exit code based on how the kills went?
+
if __name__ == '__main__':
sys.exit(main())