Changeset 277105 in webkit


Ignore:
Timestamp:
May 6, 2021 11:58:21 AM (3 years ago)
Author:
fpizlo@apple.com
Message:

Make it easy to pass XPC variables to run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=225473

Reviewed by Stephanie Lewis.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.launch_url):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:

(config_argument_parser):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r277103 r277105  
     12021-05-06  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Make it easy to pass __XPC variables to run-benchmark
     4        https://bugs.webkit.org/show_bug.cgi?id=225473
     5
     6        Reviewed by Stephanie Lewis.
     7
     8        * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
     9        (OSXSafariDriver.launch_url):
     10        * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
     11        (config_argument_parser):
     12
    1132021-05-06  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py

    r265866 r277105  
    33import logging
    44import os
     5import re
    56import subprocess
    67import time
     
    2728        args = ['/Applications/Safari.app/Contents/MacOS/Safari']
    2829        env = {}
     30        for key, value in os.environ.items():
     31            if re.match(r"^__XPC_", key):
     32                env[key] = value
    2933        if browser_build_path:
    3034            browser_build_absolute_path = os.path.abspath(browser_build_path)
     
    3842
    3943            if contains_frameworks:
    40                 env = {'DYLD_FRAMEWORK_PATH': browser_build_absolute_path, 'DYLD_LIBRARY_PATH': browser_build_absolute_path,
    41                     '__XPC_DYLD_FRAMEWORK_PATH': browser_build_absolute_path, '__XPC_DYLD_LIBRARY_PATH': browser_build_absolute_path}
     44                env['DYLD_FRAMEWORK_PATH'] = browser_build_absolute_path
     45                env['DYLD_LIBRARY_PATH'] = browser_build_absolute_path
     46                env['__XPC_DYLD_FRAMEWORK_PATH'] = browser_build_absolute_path
     47                env['__XPC_DYLD_LIBRARY_PATH'] = browser_build_absolute_path
    4248            elif not has_safari_app:
    4349                raise Exception('Could not find any framework "{}"'.format(browser_build_path))
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py

    r275152 r277105  
    3333
    3434def config_argument_parser():
    35     parser = argparse.ArgumentParser(description='Run browser based performance benchmarks. To run a single benchmark in the recommended way, use run-benchmark --plan. To see the vailable benchmarks, use run-benchmark --list-plans.')
     35    parser = argparse.ArgumentParser(description='Run browser based performance benchmarks. To run a single benchmark in the recommended way, use run-benchmark --plan. To see the vailable benchmarks, use run-benchmark --list-plans. This script passes through the __XPC variables in its environment to the Safari process.')
    3636    mutual_group = parser.add_mutually_exclusive_group(required=True)
    3737    mutual_group.add_argument('--plan', help='Run a specific benchmark plan (e.g. speedometer, jetstream).')
Note: See TracChangeset for help on using the changeset viewer.