Changeset 263610 in webkit


Ignore:
Timestamp:
Jun 26, 2020 9:37:12 PM (4 years ago)
Author:
Jonathan Bedard
Message:

[webkitpy] Allow callers to override the reported model (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=213677
<rdar://problem/64834043>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/port/base.py:

(Port.configuration_for_upload): Set the model based on --model.

  • Scripts/webkitpy/port/factory.py:

(configuration_options): Add --model option, drive-by fix for --architecture.

  • Scripts/webkitpy/port/mac.py:

(MacPort.configuration_for_upload): --model overrides detected model.

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r263592 r263610  
     12020-06-26  Jonathan Bedard  <jbedard@apple.com>
     2
     3        [webkitpy] Allow callers to override the reported model (Part 1)
     4        https://bugs.webkit.org/show_bug.cgi?id=213677
     5        <rdar://problem/64834043>
     6
     7        Reviewed by Dewei Zhu.
     8
     9        * Scripts/webkitpy/port/base.py:
     10        (Port.configuration_for_upload): Set the model based on --model.
     11        * Scripts/webkitpy/port/factory.py:
     12        (configuration_options): Add --model option, drive-by fix for --architecture.
     13        * Scripts/webkitpy/port/mac.py:
     14        (MacPort.configuration_for_upload): --model overrides detected model.
     15
    1162020-06-26  Jonathan Bedard  <jbedard@apple.com>
    217
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r263592 r263610  
    15791579            sdk=host.platform.build_version(),
    15801580            flavor=self.get_option('result_report_flavor'),
     1581            model=self.get_option('model'),
    15811582        )
    15821583
  • trunk/Tools/Scripts/webkitpy/port/factory.py

    r263592 r263610  
    8888        optparse.make_option('--arm', action='store_const', const='arm64e', default=None, dest="architecture",
    8989             help='Use arm64e binaries by default'),
    90         optparse.make_option('--architecture', action='store_const', const='x86', default=None, dest="architecture",
     90        optparse.make_option('--architecture', action='store', default=None, dest="architecture",
    9191             help='Use binaries of the specified architecture by default.'),
     92        # FIXME https://bugs.webkit.org/213677: This should effect the models used by simulator ports
     93        optparse.make_option('--model', action='store', default=None, dest="model",
     94             help='Override the model details on upload.'),
    9295    ]
    9396
  • trunk/Tools/Scripts/webkitpy/port/mac.py

    r263592 r263610  
    293293        configuration = super(MacPort, self).configuration_for_upload(host=host)
    294294
    295         output = host.executive.run_command(['/usr/sbin/sysctl', 'hw.model']).rstrip()
    296         match = re.match(r'hw.model: (?P<model>.*)', output)
    297         if match:
    298             configuration['model'] = match.group('model')
     295        # --model should override the detected model
     296        if not configuration.get('model'):
     297            output = host.executive.run_command(['/usr/sbin/sysctl', 'hw.model']).rstrip()
     298            match = re.match(r'hw.model: (?P<model>.*)', output)
     299            if match:
     300                configuration['model'] = match.group('model')
    299301
    300302        return configuration
Note: See TracChangeset for help on using the changeset viewer.