[GTK][WPE] kill-old-process should kill more webkit related process
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2017 00:46:53 +0000 (00:46 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2017 00:46:53 +0000 (00:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174220

Reviewed by Michael Catanzaro.

Generate list of possible webkit-related process names and add
them to the list of process to kill.
Also update the possible system related process for GTK+/WPE.

* BuildSlaveSupport/kill-old-processes:
(listAllWebKitPrograms):
(main):

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

Tools/BuildSlaveSupport/kill-old-processes
Tools/ChangeLog

index c0a683a..0f81c16 100755 (executable)
 
 import os, sys
 
+def listAllWebKitPrograms(builddir_bin):
+    foundWebKitPrograms = []
+    for root, dirs, files in os.walk(builddir_bin):
+        for file in files:
+            if os.access(os.path.join(root, file), os.X_OK):
+                foundWebKitPrograms.append(file)
+    return foundWebKitPrograms
+
 
 def main(user=None):
     tasksToKillWin = [
@@ -93,18 +101,20 @@ def main(user=None):
     ]
 
     taskToKillUnix = [
-        "apache2",
+        # System process that are executed as part of the build process
         "cc1plus",
-        "DumpRenderTree",
-        "gold",
-        "httpd",
+        "ld.gold",
         "ld",
         "make",
-        "ruby",
+        "cmake",
         "svn",
-        "webkit_unit_tests",
-        "WebKitTestRunner",
+        # System process that are executed as part of the test steps
         "Xvfb",
+        "gdb",
+        "ruby",
+        "apache2",
+        "httpd",
+        # WebKit related process names are automatically generated for GTK+/WPE/JSCOnly
     ]
 
     # This allows to specify on the environment of the bot a list of process that should be killed.
@@ -123,7 +133,8 @@ def main(user=None):
         for task in tasksToKill + tasksToKillWin:
             os.system("taskkill /t /f /im " + task)
     elif sys.platform.startswith('linux'):
-        for task in tasksToKill + taskToKillUnix:
+        builddir_bin = "WebKitBuild/Release/bin" if os.path.isdir("WebKitBuild/Release/bin") else "WebKitBuild/Debug/bin"
+        for task in tasksToKill + taskToKillUnix + listAllWebKitPrograms(builddir_bin):
             os.system("killall -9 -v " + task)
         os.system("ps aux | grep -P '.+/python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
     else:
index cf482b1..d9103fc 100644 (file)
@@ -1,3 +1,18 @@
+2017-07-06  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK][WPE] kill-old-process should kill more webkit related process
+        https://bugs.webkit.org/show_bug.cgi?id=174220
+
+        Reviewed by Michael Catanzaro.
+
+        Generate list of possible webkit-related process names and add
+        them to the list of process to kill.
+        Also update the possible system related process for GTK+/WPE.
+
+        * BuildSlaveSupport/kill-old-processes:
+        (listAllWebKitPrograms):
+        (main):
+
 2017-07-06  Chris Dumez  <cdumez@apple.com>
 
         FileMonitor should not be ref counted