<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178622] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178622">178622</a></dd>
<dt>Author</dt> <dd>ddkilzer@apple.com</dd>
<dt>Date</dt> <dd>2015-01-17 00:42:20 -0800 (Sat, 17 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Create iOS-EWS client queue
https://bugs.webkit.org/show_bug.cgi?id=140476
Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2015-01-17
Reviewed by Alexey Proskuryakov.
* EWSTools/start-queue-mac.sh:
Adds call to configure-xcode-for-ios-development for iOS EWS.
* Scripts/webkitpy/common/config/ews.json:
Adds the iOS EWS config entry.
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
Adds IOSPort to the port map.
(IOSPort):
(IOSPort.build_webkit_command):
Adds --sdk=iphoneos to the webkit build command.
* Scripts/webkitpy/port/base.py:
(Port.architecture):
Adds an accessor for the architecture member variable.
* Scripts/webkitpy/port/factory.py:
(PortFactory):
Adds IOSPort to the port class list.
* Scripts/webkitpy/port/ios.py:
Adds the IOSPort to encapsulate iOS-specific things.
(IOSPort):
(IOSPort.determine_full_port_name):
(IOSPort.__init__):
(IOSPort._build_driver_flags):
(IOSPort.operating_system):
* Scripts/webkitpy/tool/commands/download_unittest.py:
Adds the archetecture option to the mock options.
(DownloadCommandsTest._default_options):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
Appends the archetecture option into calls to webkit-patch.
(AbstractEarlyWarningSystem.review_patch):
(AbstractEarlyWarningSystem.run_command):
(AbstractEarlyWarningSystem.load_ews_classes):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
Adds logic to soothe the unittest now that --architecture is being
thrown around everywhere.
(EarlyWarningSystemTest._default_expected_logs):
* Scripts/webkitpy/tool/commands/queues.py:
Adds glue code to ferry the --architecture option around.
(AbstractQueue.__init__):
(PatchProcessingQueue.begin_work_queue):
* Scripts/webkitpy/tool/steps/abstractstep.py:
Adds the archetecture option to all AbstractSteps so that
EarlyWarningSystem doesn't start shoving --architecture into
unsuspecting commands.
(AbstractStep.options):
* Scripts/webkitpy/tool/steps/build.py:
Translates the --architecture option into an ARCHS= format to pass to
build-webkit.
(Build.build):
* Scripts/webkitpy/tool/steps/options.py:
Adds a definition for the --architecture option.
(Options):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsEWSToolsstartqueuemacsh">trunk/Tools/EWSTools/start-queue-mac.sh</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonconfigewsjson">trunk/Tools/Scripts/webkitpy/common/config/ews.json</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonconfigportspy">trunk/Tools/Scripts/webkitpy/common/config/ports.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportbasepy">trunk/Tools/Scripts/webkitpy/port/base.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportfactorypy">trunk/Tools/Scripts/webkitpy/port/factory.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportiospy">trunk/Tools/Scripts/webkitpy/port/ios.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy">trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy">trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsearlywarningsystem_unittestpy">trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsqueuespy">trunk/Tools/Scripts/webkitpy/tool/commands/queues.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepsabstractsteppy">trunk/Tools/Scripts/webkitpy/tool/steps/abstractstep.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepsbuildpy">trunk/Tools/Scripts/webkitpy/tool/steps/build.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepsoptionspy">trunk/Tools/Scripts/webkitpy/tool/steps/options.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/ChangeLog        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2015-01-17 Jake Nielsen <jacob_nielsen@apple.com>
+
+ Create iOS-EWS client queue
+ https://bugs.webkit.org/show_bug.cgi?id=140476
+
+ Reviewed by Alexey Proskuryakov.
+
+ * EWSTools/start-queue-mac.sh:
+ Adds call to configure-xcode-for-ios-development for iOS EWS.
+ * Scripts/webkitpy/common/config/ews.json:
+ Adds the iOS EWS config entry.
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ Adds IOSPort to the port map.
+ (IOSPort):
+ (IOSPort.build_webkit_command):
+ Adds --sdk=iphoneos to the webkit build command.
+ * Scripts/webkitpy/port/base.py:
+ (Port.architecture):
+ Adds an accessor for the architecture member variable.
+ * Scripts/webkitpy/port/factory.py:
+ (PortFactory):
+ Adds IOSPort to the port class list.
+ * Scripts/webkitpy/port/ios.py:
+ Adds the IOSPort to encapsulate iOS-specific things.
+ (IOSPort):
+ (IOSPort.determine_full_port_name):
+ (IOSPort.__init__):
+ (IOSPort._build_driver_flags):
+ (IOSPort.operating_system):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ Adds the archetecture option to the mock options.
+ (DownloadCommandsTest._default_options):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ Appends the archetecture option into calls to webkit-patch.
+ (AbstractEarlyWarningSystem.review_patch):
+ (AbstractEarlyWarningSystem.run_command):
+ (AbstractEarlyWarningSystem.load_ews_classes):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ Adds logic to soothe the unittest now that --architecture is being
+ thrown around everywhere.
+ (EarlyWarningSystemTest._default_expected_logs):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ Adds glue code to ferry the --architecture option around.
+ (AbstractQueue.__init__):
+ (PatchProcessingQueue.begin_work_queue):
+ * Scripts/webkitpy/tool/steps/abstractstep.py:
+ Adds the archetecture option to all AbstractSteps so that
+ EarlyWarningSystem doesn't start shoving --architecture into
+ unsuspecting commands.
+ (AbstractStep.options):
+ * Scripts/webkitpy/tool/steps/build.py:
+ Translates the --architecture option into an ARCHS= format to pass to
+ build-webkit.
+ (Build.build):
+ * Scripts/webkitpy/tool/steps/options.py:
+ Adds a definition for the --architecture option.
+ (Options):
+
</ins><span class="cx"> 2015-01-16 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Add a basic configuration object for WKView
</span></span></pre></div>
<a id="trunkToolsEWSToolsstartqueuemacsh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/EWSTools/start-queue-mac.sh (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/EWSTools/start-queue-mac.sh        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/EWSTools/start-queue-mac.sh        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> #!/bin/sh
</span><span class="cx"> # Copyright (c) 2012 Google Inc. All rights reserved.
</span><del>-# Copyright (c) 2014 Apple Inc. All rights reserved.
</del><ins>+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -39,20 +39,28 @@
</span><span class="cx"> shift 3
</span><span class="cx"> QUEUE_PARAMS="$@"
</span><span class="cx">
</span><ins>+EWS_HOME=/Volumes/Data/EWS
+WEBKIT_HOME=$EWS_HOME/WebKit
+
+# If building for iOS, make sure we run this script to make it possible to build frameworks.
+if [ "$QUEUE_NAME" == "ios-ews" ]; then
+ (cd $WEBKIT_HOME; sudo ./Tools/Scripts/configure-xcode-for-ios-development)
+fi
+
</ins><span class="cx"> # We reboot every night between 1 and 6 to reduce the likelihood of unexpected reboots while people are looking into things.
</span><span class="cx"> TIME_TO_REBOOT=$(( $(date +%s) + 3600 * 12))
</span><span class="cx">
</span><span class="cx"> while [ $TIME_TO_REBOOT -gt $(date +%s) ] || [ $(date +%H) -lt 1 ] || [ $(date +%H) -ge 6 ]; do
</span><del>- # Delete log files older than 14 days, move aside the main mac-ews.log file to prevent it from growing extra large.
- cd /Volumes/Data/EWS/$QUEUE_NAME-logs
</del><ins>+ # Delete log files older than 14 days, move aside the main $QUEUE_NAME-ews.log file to prevent it from growing extra large.
+ cd $EWS_HOME/$QUEUE_NAME-logs
</ins><span class="cx"> find . -mtime +14 -delete
</span><span class="cx"> if [ -s $QUEUE_NAME.log ]; then
</span><span class="cx"> mv -f $QUEUE_NAME.log ${QUEUE_NAME}_$(date +%Y-%m-%d_%H-%m).log
</span><span class="cx"> fi
</span><del>- cd /Volumes/Data/EWS/Webkit
</del><ins>+ cd $WEBKIT_HOME
</ins><span class="cx">
</span><span class="cx"> # Delete WebKitBuild to force a clean build
</span><del>- rm -rf /Volumes/Data/EWS/WebKit/WebKitBuild
</del><ins>+ rm -rf $WEBKIT_HOME/WebKitBuild
</ins><span class="cx">
</span><span class="cx"> # This somewhat quirky sequence of steps seems to clear up all the broken
</span><span class="cx"> # git situations we've gotten ourself into in the past.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonconfigewsjson"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/config/ews.json (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/config/ews.json        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/common/config/ews.json        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -14,6 +14,10 @@
</span><span class="cx"> "Win EWS": {
</span><span class="cx"> "port": "win"
</span><span class="cx"> },
</span><ins>+ "iOS EWS": {
+ "port": "ios-device",
+ "architecture": "armv7"
+ },
</ins><span class="cx"> "Mac EWS": {
</span><span class="cx"> "port": "mac",
</span><span class="cx"> "watchers": [
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonconfigportspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/config/ports.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/config/ports.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/common/config/ports.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> # Copyright (C) 2009, Google Inc. All rights reserved.
</span><span class="cx"> # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
</span><ins>+# Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -63,6 +64,7 @@
</span><span class="cx"> def port(port_name):
</span><span class="cx"> ports = {
</span><span class="cx"> "gtk-wk2": GtkWK2Port,
</span><ins>+ "ios-device": IOSPort,
</ins><span class="cx"> "mac": MacPort,
</span><span class="cx"> "mac-wk2": MacWK2Port,
</span><span class="cx"> "win": WinPort,
</span><span class="lines">@@ -118,6 +120,15 @@
</span><span class="cx"> return self.script_shell_command("run-bindings-tests")
</span><span class="cx">
</span><span class="cx">
</span><ins>+class IOSPort(DeprecatedPort):
+ port_flag_name = "ios-device"
+
+ def build_webkit_command(self, build_style=None):
+ command = super(IOSPort, self).build_webkit_command(build_style=build_style)
+ command.append("--sdk=iphoneos")
+ return command
+
+
</ins><span class="cx"> class MacPort(DeprecatedPort):
</span><span class="cx"> port_flag_name = "mac"
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportbasepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/base.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/base.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/port/base.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -127,6 +127,9 @@
</span><span class="cx"> self._root_was_set = hasattr(options, 'root') and options.root
</span><span class="cx"> self._jhbuild_wrapper = []
</span><span class="cx">
</span><ins>+ def architecture(self):
+ return self._architecture
+
</ins><span class="cx"> def additional_drt_flag(self):
</span><span class="cx"> return []
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportfactorypy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/factory.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/factory.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/port/factory.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> PORT_CLASSES = (
</span><span class="cx"> 'efl.EflPort',
</span><span class="cx"> 'gtk.GtkPort',
</span><ins>+ 'ios.IOSPort',
</ins><span class="cx"> 'ios.IOSSimulatorPort',
</span><span class="cx"> 'mac.MacPort',
</span><span class="cx"> 'mock_drt.MockDRTPort',
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportiospy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/ios.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-# Copyright (C) 2014 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> from webkitpy.layout_tests.models.test_configuration import TestConfiguration
</span><span class="cx"> from webkitpy.common.system.crashlogs import CrashLogs
</span><span class="cx"> from webkitpy.common.system.executive import ScriptError
</span><ins>+from webkitpy.port.apple import ApplePort
</ins><span class="cx"> from webkitpy.port import driver, image_diff
</span><span class="cx"> from webkitpy.port.base import Port
</span><span class="cx"> from webkitpy.port.leakdetector import LeakDetector
</span><span class="lines">@@ -41,6 +42,42 @@
</span><span class="cx"> _log = logging.getLogger(__name__)
</span><span class="cx">
</span><span class="cx">
</span><ins>+class IOSPort(ApplePort):
+ port_name = "ios-device"
+
+ ARCHITECTURES = ['armv7', 'armv7s', 'arm64']
+ VERSION_FALLBACK_ORDER = ['ios-device-8']
+
+ @classmethod
+ def determine_full_port_name(cls, host, options, port_name):
+ if port_name == cls.port_name:
+ sdk_command_process = subprocess.Popen('xcrun --sdk iphoneos --show-sdk-version', stdout=subprocess.PIPE, stderr=None, shell=True)
+ sdk_command_stdout = sdk_command_process.communicate()[0].strip()
+
+ assert sdk_command_stdout, "Xcode is not installed, and hence we cannot construct an iOS port object!"
+
+ port_name = port_name + '-' + re.match('^([0-9]+).*', sdk_command_stdout).group(1)
+
+ return port_name
+
+ def __init__(self, *args, **kwargs):
+ super(IOSPort, self).__init__(*args, **kwargs)
+
+ self._architecture = self.get_option('architecture')
+
+ if not self._architecture:
+ self._architecture = 'armv7'
+
+ self._testing_device = None
+
+ # Despite their names, these flags do not actually get passed all the way down to webkit-build.
+ def _build_driver_flags(self):
+ return ['--sdk', 'iphoneos'] + (['ARCHS=%s' % self._architecture] if self._architecture else [])
+
+ def operating_system(self):
+ return 'ios'
+
+
</ins><span class="cx"> class IOSSimulatorPort(Port):
</span><span class="cx"> port_name = "ios-simulator"
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> options.quiet = False
</span><span class="cx"> options.test = True
</span><span class="cx"> options.update = True
</span><ins>+ options.architecture = 'MOCK ARCH'
</ins><span class="cx"> return options
</span><span class="cx">
</span><span class="cx"> def test_build(self):
</span><span class="lines">@@ -162,7 +163,7 @@
</span><span class="cx"> MOCK: user.open_url: file://...
</span><span class="cx"> Was that diff correct?
</span><span class="cx"> Building WebKit
</span><del>-MOCK run_and_throw_if_fail: ['mock-build-webkit'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'TERM': 'none', 'MOCK_ENVIRON_COPY': '1'}
</del><ins>+MOCK run_and_throw_if_fail: ['mock-build-webkit', 'ARCHS=MOCK ARCH'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'TERM': 'none', 'MOCK_ENVIRON_COPY': '1'}
</ins><span class="cx"> Running Python unit tests
</span><span class="cx"> MOCK run_and_throw_if_fail: ['mock-test-webkitpy'], cwd=/mock-checkout
</span><span class="cx"> Running Perl unit tests
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> return self.name
</span><span class="cx">
</span><span class="cx"> def run_command(self, command):
</span><del>- self.run_webkit_patch(command + [self._deprecated_port.flag()])
</del><ins>+ self.run_webkit_patch(command + [self._deprecated_port.flag()] + (['--architecture=%s' % self._port.architecture()] if self._port.architecture() else []))
</ins><span class="cx">
</span><span class="cx"> def command_passed(self, message, patch):
</span><span class="cx"> pass
</span><span class="lines">@@ -153,6 +153,7 @@
</span><span class="cx"> classes.append(type(str(name.replace(' ', '')), (AbstractEarlyWarningSystem,), {
</span><span class="cx"> 'name': config['port'] + '-ews',
</span><span class="cx"> 'port_name': config['port'],
</span><ins>+ 'architecture': config.get('architecture', None),
</ins><span class="cx"> 'watchers': config.get('watchers', []),
</span><span class="cx"> 'run_tests': config.get('runTests', cls.run_tests),
</span><span class="cx"> }))
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystem_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -27,12 +27,15 @@
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><span class="cx"> from webkitpy.thirdparty.mock import Mock
</span><ins>+from webkitpy.common.host import Host
</ins><span class="cx"> from webkitpy.common.net.layouttestresults import LayoutTestResults
</span><span class="cx"> from webkitpy.common.system.outputcapture import OutputCapture
</span><span class="cx"> from webkitpy.layout_tests.models import test_results
</span><span class="cx"> from webkitpy.layout_tests.models import test_failures
</span><ins>+from webkitpy.port.factory import PortFactory
</ins><span class="cx"> from webkitpy.tool.bot.queueengine import QueueEngine
</span><span class="cx"> from webkitpy.tool.commands.earlywarningsystem import *
</span><ins>+from webkitpy.tool.commands.queues import PatchProcessingQueue
</ins><span class="cx"> from webkitpy.tool.commands.queuestest import QueuesTest
</span><span class="cx"> from webkitpy.tool.mocktool import MockTool, MockOptions
</span><span class="cx">
</span><span class="lines">@@ -57,22 +60,26 @@
</span><span class="cx">
</span><span class="cx"> class EarlyWarningSystemTest(QueuesTest):
</span><span class="cx"> def _default_expected_logs(self, ews):
</span><ins>+ host = Host()
+ real_port_name = PatchProcessingQueue()._new_port_name_from_old(ews.port_name, host.platform)
+ real_port = Host().port_factory.get(real_port_name)
</ins><span class="cx"> string_replacements = {
</span><span class="cx"> "name": ews.name,
</span><span class="cx"> "port": ews.port_name,
</span><ins>+ "architecture": real_port.architecture(),
</ins><span class="cx"> }
</span><span class="cx"> if ews.run_tests:
</span><del>- run_tests_line = "Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=%(port)s\n" % string_replacements
</del><ins>+ run_tests_line = "Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=%(port)s --architecture=%(architecture)s\n" % string_replacements
</ins><span class="cx"> else:
</span><span class="cx"> run_tests_line = ""
</span><span class="cx"> string_replacements['run_tests_line'] = run_tests_line
</span><span class="cx">
</span><span class="cx"> expected_logs = {
</span><span class="cx"> "begin_work_queue": self._default_begin_work_queue_logs(ews.name),
</span><del>- "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s
-Running: webkit-patch --status-host=example.com update --port=%(port)s
-Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=%(port)s
-Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=%(port)s
</del><ins>+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s --architecture=%(architecture)s
+Running: webkit-patch --status-host=example.com update --port=%(port)s --architecture=%(architecture)s
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=%(port)s --architecture=%(architecture)s
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=%(port)s --architecture=%(architecture)s
</ins><span class="cx"> %(run_tests_line)sMOCK: update_status: %(name)s Pass
</span><span class="cx"> MOCK: release_work_item: %(name)s 10000
</span><span class="cx"> """ % string_replacements,
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsqueuespy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queues.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/queues.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">
</span><span class="cx"> import codecs
</span><span class="cx"> import logging
</span><ins>+import optparse
</ins><span class="cx"> import os
</span><span class="cx"> import re
</span><span class="cx"> import sys
</span><span class="lines">@@ -74,6 +75,7 @@
</span><span class="cx"> self.help_text = "Run the %s" % self.name
</span><span class="cx"> Command.__init__(self, options=options_list)
</span><span class="cx"> self._iteration_count = 0
</span><ins>+ self.architecture = None
</ins><span class="cx">
</span><span class="cx"> def _cc_watchers(self, bug_id):
</span><span class="cx"> try:
</span><span class="lines">@@ -275,7 +277,10 @@
</span><span class="cx"> self._deprecated_port = DeprecatedPort.port(self.port_name)
</span><span class="cx"> # FIXME: This violates abstraction
</span><span class="cx"> self._tool._deprecated_port = self._deprecated_port
</span><del>- self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
</del><ins>+ port_options = optparse.Values()
+ if self.architecture:
+ setattr(port_options, 'architecture', self.architecture)
+ self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform), port_options)
</ins><span class="cx">
</span><span class="cx"> def _upload_results_archive_for_patch(self, patch, results_archive_zip):
</span><span class="cx"> if not self._port:
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsabstractsteppy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/abstractstep.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/abstractstep.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/abstractstep.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> return [
</span><span class="cx"> # We need this option here because cached_lookup uses it. :(
</span><span class="cx"> Options.git_commit,
</span><ins>+ Options.architecture,
</ins><span class="cx"> ]
</span><span class="cx">
</span><span class="cx"> def run(self, state):
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsbuildpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/build.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/build.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/build.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -50,6 +50,10 @@
</span><span class="cx"> env = environment.to_dictionary()
</span><span class="cx">
</span><span class="cx"> build_webkit_command = self._tool.deprecated_port().build_webkit_command(build_style=build_style)
</span><ins>+
+ if self._options.architecture:
+ build_webkit_command += ['ARCHS=%s' % self._options.architecture]
+
</ins><span class="cx"> self._tool.executive.run_and_throw_if_fail(build_webkit_command, self._options.quiet,
</span><span class="cx"> cwd=self._tool.scm().checkout_root, env=env)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsoptionspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/options.py (178621 => 178622)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/options.py        2015-01-17 02:53:28 UTC (rev 178621)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/options.py        2015-01-17 08:42:20 UTC (rev 178622)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> from optparse import make_option
</span><span class="cx">
</span><span class="cx"> class Options(object):
</span><ins>+ architecture = make_option("--architecture", action="store", type="string", dest="architecture", default=None, help="Target architecture")
</ins><span class="cx"> blocks = make_option("--blocks", action="store", type="string", dest="blocks", default=None, help="Bug number which the created bug blocks.")
</span><span class="cx"> build = make_option("--build", action="store_true", dest="build", default=False, help="Build and run run-webkit-tests before committing.")
</span><span class="cx"> build_style = make_option("--build-style", action="store", dest="build_style", default=None, help="Whether to build debug, release, or both.")
</span></span></pre>
</div>
</div>
</body>
</html>