Add a way for the buildbot to kill any old processes that are running. This
authorbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Apr 2010 20:32:50 +0000 (20:32 +0000)
committerbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Apr 2010 20:32:50 +0000 (20:32 +0000)
is useful because the Windows bots can get in states where a process remains
running (httpd.exe, DumpRenderTree.exe), which causes the bots to get in a red
state, and the processes must be killed manually.

Reviewed by Adam Roben.

* BuildSlaveSupport/build.webkit.org-config/master.cfg: If we are on Windows, kill
    the old processes that might be running.
* BuildSlaveSupport/win/kill-old-processes: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57602 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
WebKitTools/BuildSlaveSupport/win/kill-old-processes [new file with mode: 0755]
WebKitTools/ChangeLog

index 4859277..43a5c2b 100644 (file)
@@ -53,6 +53,10 @@ class InstallWin32Dependencies(shell.Compile):
     descriptionDone = ["installed dependencies"]
     command = ["perl", "./WebKitTools/Scripts/update-webkit-auxiliary-libs"]
 
+class KillOldProcesses(shell.Compile):
+    description = ["killing old processes"]
+    descriptionDone = ["killed old processes"]
+    command = ["python", "./WebKitTools/BuildSlaveSupport/win/kill-old-processes"]
 
 class InstallChromiumDependencies(shell.ShellCommand):
     name = "gclient"
@@ -320,6 +324,7 @@ class Factory(factory.BuildFactory):
         self.addStep(ConfigureBuild, platform=platform, configuration=configuration, architecture=" ".join(architectures), buildOnly=buildOnly)
         self.addStep(CheckOutSource)
         if platform == "win":
+            self.addStep(KillOldProcesses)
             self.addStep(InstallWin32Dependencies)
         if platform == "chromium":
             self.addStep(InstallChromiumDependencies)
diff --git a/WebKitTools/BuildSlaveSupport/win/kill-old-processes b/WebKitTools/BuildSlaveSupport/win/kill-old-processes
new file mode 100755 (executable)
index 0000000..50fb8a5
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/python\r
+\r
+# Copyright (C) 2010 Apple 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
+# 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
+#\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
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\r
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+import os, sys\r
+\r
+def main():\r
+    tasksToKill = ["DumpRenderTree.exe", "DumpRenderTree_debug.exe", "testapi.exe", "testapi_debug.exe",\r
+                "svn.exe", "httpd.exe", "cl.exe", "link.exe", "midl.exe", "devenv.exe", "perl.exe",\r
+                "imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe"]\r
+\r
+    for task in tasksToKill:\r
+        os.system("taskkill /f /im " + task)\r
+\r
+if __name__ == '__main__':\r
+    sys.exit(main())\r
index 952fb4b..2321d92 100644 (file)
@@ -1,3 +1,16 @@
+2010-04-14  Brian Weinstein  <bweinstein@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Add a way for the buildbot to kill any old processes that are running. This
+        is useful because the Windows bots can get in states where a process remains
+        running (httpd.exe, DumpRenderTree.exe), which causes the bots to get in a red
+        state, and the processes must be killed manually.
+
+        * BuildSlaveSupport/build.webkit.org-config/master.cfg: If we are on Windows, kill
+            the old processes that might be running.
+        * BuildSlaveSupport/win/kill-old-processes: Added.
+
 2010-04-14  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.