Commit ffa527c7 authored by Maksym Onufriienko's avatar Maksym Onufriienko Committed by Commit Bot

[iOS] Delete FramebufferServerRendererPolicy on test start and finish.

Per Xcode release notes, setting FramebufferServerRendererPolicy to 'none'
will allow CoreSimulator to skip compositing operations in the virtual
frame buffer.  This may improve test performance.

To avoid any unexpected complications, first delete this value before and
after each test run.  In a followup CL, this value can be set to 'none'
without potentially breaking other bots.

Bug: 989674
Change-Id: I90319a86364ee727bc751cb27ac9404f989deb69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854266Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Maksym Onufriienko <monufriienko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705254}
parent 76cc9db4
...@@ -32,6 +32,8 @@ def main(): ...@@ -32,6 +32,8 @@ def main():
logging.basicConfig(format='[%(asctime)s:%(levelname)s] %(message)s', logging.basicConfig(format='[%(asctime)s:%(levelname)s] %(message)s',
level=logging.DEBUG, datefmt='%I:%M:%S') level=logging.DEBUG, datefmt='%I:%M:%S')
test_runner.defaults_delete('com.apple.CoreSimulator',
'FramebufferServerRendererPolicy')
args, test_args = parse_args() args, test_args = parse_args()
summary = {} summary = {}
...@@ -142,6 +144,8 @@ def main(): ...@@ -142,6 +144,8 @@ def main():
if tr: if tr:
with open(os.path.join(args.out_dir, 'full_results.json'), 'w') as f: with open(os.path.join(args.out_dir, 'full_results.json'), 'w') as f:
json.dump(tr.test_results, f) json.dump(tr.test_results, f)
test_runner.defaults_delete('com.apple.CoreSimulator',
'FramebufferServerRendererPolicy')
def parse_args(): def parse_args():
......
...@@ -175,6 +175,29 @@ def is_iOS13_or_higher_device(udid): ...@@ -175,6 +175,29 @@ def is_iOS13_or_higher_device(udid):
distutils.version.LooseVersion('13.0')) distutils.version.LooseVersion('13.0'))
def defaults_write(d, key, value):
"""Run 'defaults write d key value' command.
Args:
d: (str) A dictionary.
key: (str) A key.
value: (str) A value.
"""
LOGGER.info('Run \'defaults write %s %s %s\'' % (d, key, value))
subprocess.call(['defaults', 'write', d, key, value])
def defaults_delete(d, key):
"""Run 'defaults delete d key' command.
Args:
d: (str) A dictionary.
key: (str) Key to delete.
"""
LOGGER.info('Run \'defaults delete %s %s\'' % (d, key))
subprocess.call(['defaults', 'delete', d, key])
def terminate_process(proc): def terminate_process(proc):
"""Terminates the process. """Terminates the process.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment