Changeset 290905 in webkit
- Timestamp:
- Mar 7, 2022, 1:16:48 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
CISupport/kill-old-processes (modified) (4 diffs)
-
ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/CISupport/kill-old-processes
r284854 r290905 25 25 26 26 from __future__ import print_function 27 import os, sys 27 import json 28 import os 28 29 import getpass 29 30 import re 30 31 import subprocess 32 import sys 33 import time 34 31 35 32 36 def listAllWebKitPrograms(builddir_bin): … … 76 80 continue 77 81 return ret 82 83 def are_simulators_booted(): 84 simctl_output = dict() 85 try: 86 simctl_output = json.loads(subprocess.check_output( 87 ['xcrun', 'simctl', 'list', '--json'], 88 **(dict(encoding='utf-8') if sys.version_info > (3, 0) else dict()) 89 )) 90 except json.decoder.JSONDecodeError: 91 return False 92 for runtime, devices in simctl_output.get('devices', {}).items(): 93 for device in devices: 94 state = device.get('state', '(unavailable)') 95 if state not in ('(unavailable)', 'Shutdown'): 96 print('{} is still {}'.format(device.get('udid', '?'), state)) 97 return True 98 return False 78 99 79 100 def main(user=None): … … 143 164 "xcodebuild", 144 165 # FIXME: Consider moving iOS-specific tasks to their own list. 145 "Simulator .app",166 "Simulator", 146 167 ] 147 168 … … 166 187 tasksToKill = os.getenv("WEBKITBOT_TASKSTOKILL", "").split() 167 188 if sys.platform == 'darwin': 189 # Shutdown any simulators 190 if os.geteuid() == 0 and user: 191 os.system("sudo -u {} xcrun simctl shutdown all".format(user)) 192 else: 193 os.system("xcrun simctl shutdown all") 194 195 # Ensure that simulators are shut down 196 start = time.time() 197 while are_simulators_booted() and start + 60 > time.time(): 198 print('Waiting on simulators to shut down...') 199 time.sleep(10) 200 168 201 os.system("ps aux") 169 202 for task in tasksToKill + tasksToKillMac: 170 203 os.system("killall -9 -v -m " + task) 171 # Shutdown any simulators 172 if os.geteuid() == 0 and user: 173 os.system("sudo -u {} xcrun simctl shutdown booted".format(user)) 174 else: 175 os.system("xcrun simctl shutdown booted") 204 176 205 # Kill all instances of python executing run-webkit-tests 177 206 os.system("ps aux | grep -E '.+/Python3? .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill") -
trunk/Tools/ChangeLog
r290901 r290905 1 2022-03-07 Jonathan Bedard <jbedard@apple.com> 2 3 [iOS] editing/async-clipboard/* 20 tests are flaky timeouts on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=237372 5 <rdar://problem/89689914> 6 7 Reviewed by Alexey Proskuryakov. 8 9 * CISupport/kill-old-processes: Kill "Simulator" process (since killing Simulator.app 10 won't do anything), shutdown simulators before killing processes. Check that simulators 11 are shut down before continuing. 12 1 13 2022-03-07 Chris Dumez <cdumez@apple.com> 2 14
Note:
See TracChangeset
for help on using the changeset viewer.