⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 290905 in webkit


Ignore:
Timestamp:
Mar 7, 2022, 1:16:48 PM (5 years ago)
Author:
Jonathan Bedard
Message:

[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.

  • Tools/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.

Canonical link: ​https://commits.webkit.org/248136@main

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/CISupport/kill-old-processes

    r284854 r290905  
    2525
    2626from __future__ import print_function
    27 import os, sys
     27import json
     28import os
    2829import getpass
    2930import re
    3031import subprocess
     32import sys
     33import time
     34
    3135
    3236def listAllWebKitPrograms(builddir_bin):
    … …  
    7680            continue
    7781    return ret
     82
     83def 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
    7899
    79100def main(user=None):
    … …  
    143164        "xcodebuild",
    144165        # FIXME: Consider moving iOS-specific tasks to their own list.
    145         "Simulator.app",
     166        "Simulator",
    146167    ]
    147168
    … …  
    166187    tasksToKill = os.getenv("WEBKITBOT_TASKSTOKILL", "").split()
    167188    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
    168201        os.system("ps aux")
    169202        for task in tasksToKill + tasksToKillMac:
    170203            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
    176205        # Kill all instances of python executing run-webkit-tests
    177206        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  
     12022-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
    1132022-03-07  Chris Dumez  <cdumez@apple.com>
    214
Note: See TracChangeset for help on using the changeset viewer.