<!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>[178757] 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/178757">178757</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-20 14:43:36 -0800 (Tue, 20 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix EWS python unit tests and address code comments as per 140476
https://bugs.webkit.org/show_bug.cgi?id=140637
Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2015-01-20
Reviewed by David Kilzer.
* Scripts/webkitpy/port/base.py:
(Port):
(Port.__init__):
Adds DEFAULT_ARCHITECTURE member.
(Port.architecture):
Removes architecture member and instead uses
self.get_option('architecture'). Also removes redundant architecture
method.
(Port.set_architecture):
Adds a setter for the architecture variable to be able to set a flag
upon modification.
(Port.test_configuration):
Uses self.architecture() instead of self._architecture.
* Scripts/webkitpy/port/ios.py:
Overrides DEFAULT_ARCHITECTURE.
(IOSPort):
(IOSPort.determine_full_port_name):
Uses subprocess.check_output instead of Popen. Uses rstrip instead of
strip. Fixes regex to not match arbitrary characters after the
relevent digits are matched.
(IOSPort.__init__):
Removes old _architecture defaulting strategy.
(IOSPort._build_driver_flags):
Uses self.architecture() instead of self._architecture.
(IOSSimulatorPort):
Overrides DEFAULT_ARCHITECTURE.
(IOSSimulatorPort.__init__):
Removes old _architecture defaulting strategy.
* Scripts/webkitpy/port/mac.py:
(MacPort):
Overrides DEFAULT_ARCHITECTURE.
(MacPort.__init__):
Removes old _architecture defaulting strategy.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.run_command):
Checks the did_override_architecture flag to determine whether to add
the --architecture option.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
Uses ews.architecture rather than trying to discern the correct
architecture using a port object.
(EarlyWarningSystemTest._default_expected_logs):
* Scripts/webkitpy/tool/commands/queues.py:
Removes use of optparse, and removes the import statement.
(AbstractQueue.__init__):
(PatchProcessingQueue.begin_work_queue):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpyportbasepy">trunk/Tools/Scripts/webkitpy/port/base.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportiospy">trunk/Tools/Scripts/webkitpy/port/ios.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportmacpy">trunk/Tools/Scripts/webkitpy/port/mac.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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/ChangeLog        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2015-01-20 Jake Nielsen <jacob_nielsen@apple.com>
+
+ Fix EWS python unit tests and address code comments as per 140476
+ https://bugs.webkit.org/show_bug.cgi?id=140637
+
+ Reviewed by David Kilzer.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port):
+ (Port.__init__):
+ Adds DEFAULT_ARCHITECTURE member.
+ (Port.architecture):
+ Removes architecture member and instead uses
+ self.get_option('architecture'). Also removes redundant architecture
+ method.
+ (Port.set_architecture):
+ Adds a setter for the architecture variable to be able to set a flag
+ upon modification.
+ (Port.test_configuration):
+ Uses self.architecture() instead of self._architecture.
+ * Scripts/webkitpy/port/ios.py:
+ Overrides DEFAULT_ARCHITECTURE.
+ (IOSPort):
+ (IOSPort.determine_full_port_name):
+ Uses subprocess.check_output instead of Popen. Uses rstrip instead of
+ strip. Fixes regex to not match arbitrary characters after the
+ relevent digits are matched.
+ (IOSPort.__init__):
+ Removes old _architecture defaulting strategy.
+ (IOSPort._build_driver_flags):
+ Uses self.architecture() instead of self._architecture.
+ (IOSSimulatorPort):
+ Overrides DEFAULT_ARCHITECTURE.
+ (IOSSimulatorPort.__init__):
+ Removes old _architecture defaulting strategy.
+ * Scripts/webkitpy/port/mac.py:
+ (MacPort):
+ Overrides DEFAULT_ARCHITECTURE.
+ (MacPort.__init__):
+ Removes old _architecture defaulting strategy.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem.run_command):
+ Checks the did_override_architecture flag to determine whether to add
+ the --architecture option.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ Uses ews.architecture rather than trying to discern the correct
+ architecture using a port object.
+ (EarlyWarningSystemTest._default_expected_logs):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ Removes use of optparse, and removes the import statement.
+ (AbstractQueue.__init__):
+ (PatchProcessingQueue.begin_work_queue):
+
</ins><span class="cx"> 2015-01-20 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Attempt to fix Mountain Lion and EFL tests.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportbasepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/base.py (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/base.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/port/base.py        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -78,6 +78,8 @@
</span><span class="cx">
</span><span class="cx"> ALL_BUILD_TYPES = ('debug', 'release')
</span><span class="cx">
</span><ins>+ DEFAULT_ARCHITECTURE = 'x86'
+
</ins><span class="cx"> @classmethod
</span><span class="cx"> def determine_full_port_name(cls, host, options, port_name):
</span><span class="cx"> """Return a fully-specified port name that can be used to construct objects."""
</span><span class="lines">@@ -96,13 +98,20 @@
</span><span class="cx">
</span><span class="cx"> # These are default values that should be overridden in a subclasses.
</span><span class="cx"> self._version = ''
</span><del>- self._architecture = 'x86'
</del><span class="cx">
</span><ins>+ # FIXME: This can be removed once default architectures for GTK and EFL EWS bots are set.
+ self.did_override_architecture = False
+
</ins><span class="cx"> # FIXME: Ideally we'd have a package-wide way to get a
</span><span class="cx"> # well-formed options object that had all of the necessary
</span><span class="cx"> # options defined on it.
</span><span class="cx"> self._options = options or optparse.Values()
</span><span class="cx">
</span><ins>+ if self.get_option('architecture'):
+ self.did_override_architecture = True
+ else:
+ self.set_option('architecture', self.DEFAULT_ARCHITECTURE)
+
</ins><span class="cx"> if self._name and '-wk2' in self._name:
</span><span class="cx"> self._options.webkit_test_runner = True
</span><span class="cx">
</span><span class="lines">@@ -128,8 +137,12 @@
</span><span class="cx"> self._jhbuild_wrapper = []
</span><span class="cx">
</span><span class="cx"> def architecture(self):
</span><del>- return self._architecture
</del><ins>+ return self.get_option('architecture')
</ins><span class="cx">
</span><ins>+ def set_architecture(self, arch):
+ self.did_override_architecture = True
+ self.set_option('architecture', arch)
+
</ins><span class="cx"> def additional_drt_flag(self):
</span><span class="cx"> return []
</span><span class="cx">
</span><span class="lines">@@ -713,9 +726,6 @@
</span><span class="cx"> expectations, determining search paths, and logging information."""
</span><span class="cx"> return self._version
</span><span class="cx">
</span><del>- def architecture(self):
- return self._architecture
-
</del><span class="cx"> def get_option(self, name, default_value=None):
</span><span class="cx"> return getattr(self._options, name, default_value)
</span><span class="cx">
</span><span class="lines">@@ -923,7 +933,7 @@
</span><span class="cx"> def test_configuration(self):
</span><span class="cx"> """Returns the current TestConfiguration for the port."""
</span><span class="cx"> if not self._test_configuration:
</span><del>- self._test_configuration = TestConfiguration(self._version, self._architecture, self._options.configuration.lower())
</del><ins>+ self._test_configuration = TestConfiguration(self._version, self.architecture(), self._options.configuration.lower())
</ins><span class="cx"> return self._test_configuration
</span><span class="cx">
</span><span class="cx"> # FIXME: Belongs on a Platform object.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportiospy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/ios.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -46,35 +46,30 @@
</span><span class="cx"> port_name = "ios"
</span><span class="cx">
</span><span class="cx"> ARCHITECTURES = ['armv7', 'armv7s', 'arm64']
</span><del>- VERSION_FALLBACK_ORDER = ['ios-7', 'ios-8']
</del><ins>+ DEFAULT_ARCHITECTURE = 'armv7'
+ VERSION_FALLBACK_ORDER = ['ios-7', 'ios-8', 'ios-9']
</ins><span class="cx">
</span><span class="cx"> @classmethod
</span><span class="cx"> def determine_full_port_name(cls, host, options, port_name):
</span><span class="cx"> if port_name == cls.port_name:
</span><span class="cx"> sdk_version = '8.0'
</span><span class="cx"> if host.platform.is_mac():
</span><del>- sdk_command_process = subprocess.Popen('xcrun --sdk iphoneos --show-sdk-version', stdout=subprocess.PIPE, stderr=None, shell=True)
- sdk_command_output = sdk_command_process.communicate()[0].strip()
</del><ins>+ sdk_command_output = subprocess.check_output(['/usr/bin/xcrun', '--sdk', 'iphoneos', '--show-sdk-version'], stderr=None).rstrip()
</ins><span class="cx"> if sdk_command_output:
</span><span class="cx"> sdk_version = sdk_command_output
</span><span class="cx">
</span><del>- port_name = port_name + '-' + re.match('^([0-9]+).*', sdk_version).group(1)
</del><ins>+ port_name = port_name + '-' + re.match('^([0-9]+)', sdk_version).group(1)
</ins><span class="cx">
</span><span class="cx"> return port_name
</span><span class="cx">
</span><span class="cx"> def __init__(self, *args, **kwargs):
</span><span class="cx"> super(IOSPort, self).__init__(*args, **kwargs)
</span><span class="cx">
</span><del>- self._architecture = self.get_option('architecture')
-
- if not self._architecture:
- self._architecture = 'armv7'
-
</del><span class="cx"> self._testing_device = None
</span><span class="cx">
</span><span class="cx"> # Despite their names, these flags do not actually get passed all the way down to webkit-build.
</span><span class="cx"> def _build_driver_flags(self):
</span><del>- return ['--sdk', 'iphoneos'] + (['ARCHS=%s' % self._architecture] if self._architecture else [])
</del><ins>+ return ['--sdk', 'iphoneos'] + (['ARCHS=%s' % self.architecture()] if self.architecture() else [])
</ins><span class="cx">
</span><span class="cx"> def operating_system(self):
</span><span class="cx"> return 'ios'
</span><span class="lines">@@ -87,16 +82,13 @@
</span><span class="cx">
</span><span class="cx"> ARCHITECTURES = ['x86_64', 'x86']
</span><span class="cx">
</span><ins>+ DEFAULT_ARCHITECTURE = 'x86_64'
+
</ins><span class="cx"> relay_name = 'LayoutTestRelay'
</span><span class="cx">
</span><span class="cx"> def __init__(self, *args, **kwargs):
</span><span class="cx"> super(IOSSimulatorPort, self).__init__(*args, **kwargs)
</span><span class="cx">
</span><del>- self._architecture = self.get_option('architecture')
-
- if not self._architecture:
- self._architecture = 'x86_64'
-
</del><span class="cx"> self._leak_detector = LeakDetector(self)
</span><span class="cx"> if self.get_option("leaks"):
</span><span class="cx"> # DumpRenderTree slows down noticably if we run more than about 1000 tests in a batch
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportmacpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/mac.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -48,13 +48,11 @@
</span><span class="cx">
</span><span class="cx"> ARCHITECTURES = ['x86_64', 'x86']
</span><span class="cx">
</span><ins>+ DEFAULT_ARCHITECTURE = 'x86_64'
+
</ins><span class="cx"> def __init__(self, host, port_name, **kwargs):
</span><span class="cx"> ApplePort.__init__(self, host, port_name, **kwargs)
</span><del>- self._architecture = self.get_option('architecture')
</del><span class="cx">
</span><del>- if not self._architecture:
- self._architecture = 'x86_64'
-
</del><span class="cx"> self._leak_detector = LeakDetector(self)
</span><span class="cx"> if self.get_option("leaks"):
</span><span class="cx"> # DumpRenderTree slows down noticably if we run more than about 1000 tests in a batch
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py        2015-01-20 22:43:36 UTC (rev 178757)
</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()] + (['--architecture=%s' % self._port.architecture()] if self._port.architecture() else []))
</del><ins>+ self.run_webkit_patch(command + [self._deprecated_port.flag()] + (['--architecture=%s' % self._port.architecture()] if self._port.architecture() and self._port.did_override_architecture else []))
</ins><span class="cx">
</span><span class="cx"> def command_passed(self, message, patch):
</span><span class="cx"> pass
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystem_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -60,26 +60,23 @@
</span><span class="cx">
</span><span class="cx"> class EarlyWarningSystemTest(QueuesTest):
</span><span class="cx"> def _default_expected_logs(self, ews):
</span><del>- 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)
</del><span class="cx"> string_replacements = {
</span><span class="cx"> "name": ews.name,
</span><span class="cx"> "port": ews.port_name,
</span><del>- "architecture": real_port.architecture(),
</del><ins>+ "architecture": " --architecture=%s" % ews.architecture if ews.architecture else "",
</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 --architecture=%(architecture)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)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 --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
</del><ins>+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s%(architecture)s
+Running: webkit-patch --status-host=example.com update --port=%(port)s%(architecture)s
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=%(port)s%(architecture)s
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=%(port)s%(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 (178756 => 178757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/queues.py        2015-01-20 22:43:06 UTC (rev 178756)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues.py        2015-01-20 22:43:36 UTC (rev 178757)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx">
</span><span class="cx"> import codecs
</span><span class="cx"> import logging
</span><del>-import optparse
</del><span class="cx"> import os
</span><span class="cx"> import re
</span><span class="cx"> import sys
</span><span class="lines">@@ -75,7 +74,8 @@
</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><del>- self.architecture = None
</del><ins>+ if not hasattr(self, 'architecture'):
+ 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">@@ -277,10 +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>- port_options = optparse.Values()
</del><ins>+
+ self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
</ins><span class="cx"> if self.architecture:
</span><del>- 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)
</del><ins>+ self._port.set_architecture(self.architecture)
</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>
</div>
</body>
</html>