Title: [263610] trunk/Tools
- Revision
- 263610
- Author
- [email protected]
- Date
- 2020-06-26 21:37:12 -0700 (Fri, 26 Jun 2020)
Log 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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (263609 => 263610)
--- trunk/Tools/ChangeLog 2020-06-27 04:20:55 UTC (rev 263609)
+++ trunk/Tools/ChangeLog 2020-06-27 04:37:12 UTC (rev 263610)
@@ -1,5 +1,20 @@
2020-06-26 Jonathan Bedard <[email protected]>
+ [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.
+
+2020-06-26 Jonathan Bedard <[email protected]>
+
[webkitpy] Automatically detect hw architecture for supporting Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=213653
<rdar://problem/64817656>
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (263609 => 263610)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2020-06-27 04:20:55 UTC (rev 263609)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2020-06-27 04:37:12 UTC (rev 263610)
@@ -1578,6 +1578,7 @@
style=style,
sdk=host.platform.build_version(),
flavor=self.get_option('result_report_flavor'),
+ model=self.get_option('model'),
)
@memoized
Modified: trunk/Tools/Scripts/webkitpy/port/factory.py (263609 => 263610)
--- trunk/Tools/Scripts/webkitpy/port/factory.py 2020-06-27 04:20:55 UTC (rev 263609)
+++ trunk/Tools/Scripts/webkitpy/port/factory.py 2020-06-27 04:37:12 UTC (rev 263610)
@@ -87,8 +87,11 @@
help='use 32-bit binaries by default (x86 instead of x86_64)'),
optparse.make_option('--arm', action='', const='arm64e', default=None, dest="architecture",
help='Use arm64e binaries by default'),
- optparse.make_option('--architecture', action='', const='x86', default=None, dest="architecture",
+ optparse.make_option('--architecture', action='', default=None, dest="architecture",
help='Use binaries of the specified architecture by default.'),
+ # FIXME https://bugs.webkit.org/213677: This should effect the models used by simulator ports
+ optparse.make_option('--model', action='', default=None, dest="model",
+ help='Override the model details on upload.'),
]
Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (263609 => 263610)
--- trunk/Tools/Scripts/webkitpy/port/mac.py 2020-06-27 04:20:55 UTC (rev 263609)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py 2020-06-27 04:37:12 UTC (rev 263610)
@@ -292,10 +292,12 @@
host = host or self.host
configuration = super(MacPort, self).configuration_for_upload(host=host)
- output = host.executive.run_command(['/usr/sbin/sysctl', 'hw.model']).rstrip()
- match = re.match(r'hw.model: (?P<model>.*)', output)
- if match:
- configuration['model'] = match.group('model')
+ # --model should override the detected model
+ if not configuration.get('model'):
+ output = host.executive.run_command(['/usr/sbin/sysctl', 'hw.model']).rstrip()
+ match = re.match(r'hw.model: (?P<model>.*)', output)
+ if match:
+ configuration['model'] = match.group('model')
return configuration
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes