Modified: trunk/Tools/CISupport/kill-old-processes (290904 => 290905)
--- trunk/Tools/CISupport/kill-old-processes 2022-03-07 21:11:28 UTC (rev 290904)
+++ trunk/Tools/CISupport/kill-old-processes 2022-03-07 21:16:48 UTC (rev 290905)
@@ -24,11 +24,15 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
-import os, sys
+import json
+import os
import getpass
import re
import subprocess
+import sys
+import time
+
def listAllWebKitPrograms(builddir_bin):
foundWebKitPrograms = []
for root, dirs, files in os.walk(builddir_bin):
@@ -76,6 +80,23 @@
continue
return ret
+def are_simulators_booted():
+ simctl_output = dict()
+ try:
+ simctl_output = json.loads(subprocess.check_output(
+ ['xcrun', 'simctl', 'list', '--json'],
+ **(dict(encoding='utf-8') if sys.version_info > (3, 0) else dict())
+ ))
+ except json.decoder.JSONDecodeError:
+ return False
+ for runtime, devices in simctl_output.get('devices', {}).items():
+ for device in devices:
+ state = device.get('state', '(unavailable)')
+ if state not in ('(unavailable)', 'Shutdown'):
+ print('{} is still {}'.format(device.get('udid', '?'), state))
+ return True
+ return False
+
def main(user=None):
tasksToKillWin = [
"cl.exe",
@@ -142,7 +163,7 @@
"WebProcess",
"xcodebuild",
# FIXME: Consider moving iOS-specific tasks to their own list.
- "Simulator.app",
+ "Simulator",
]
taskToKillUnix = [
@@ -165,14 +186,22 @@
# This allows to specify on the environment of the bot a list of process that should be killed.
tasksToKill = os.getenv("WEBKITBOT_TASKSTOKILL", "").split()
if sys.platform == 'darwin':
+ # Shutdown any simulators
+ if os.geteuid() == 0 and user:
+ os.system("sudo -u {} xcrun simctl shutdown all".format(user))
+ else:
+ os.system("xcrun simctl shutdown all")
+
+ # Ensure that simulators are shut down
+ start = time.time()
+ while are_simulators_booted() and start + 60 > time.time():
+ print('Waiting on simulators to shut down...')
+ time.sleep(10)
+
os.system("ps aux")
for task in tasksToKill + tasksToKillMac:
os.system("killall -9 -v -m " + task)
- # Shutdown any simulators
- if os.geteuid() == 0 and user:
- os.system("sudo -u {} xcrun simctl shutdown booted".format(user))
- else:
- os.system("xcrun simctl shutdown booted")
+
# Kill all instances of python executing run-webkit-tests
os.system("ps aux | grep -E '.+/Python3? .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
# FIXME: <rdar://problem/81476546> Remove stale simulator temp files
Modified: trunk/Tools/ChangeLog (290904 => 290905)
--- trunk/Tools/ChangeLog 2022-03-07 21:11:28 UTC (rev 290904)
+++ trunk/Tools/ChangeLog 2022-03-07 21:16:48 UTC (rev 290905)
@@ -1,3 +1,15 @@
+2022-03-07 Jonathan Bedard <[email protected]>
+
+ [iOS] editing/async-clipboard/* 20 tests are flaky timeouts on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=237372
+ <rdar://problem/89689914>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * CISupport/kill-old-processes: Kill "Simulator" process (since killing Simulator.app
+ won't do anything), shutdown simulators before killing processes. Check that simulators
+ are shut down before continuing.
+
2022-03-07 Chris Dumez <[email protected]>
Optimize the passing of data across threads