Diff
Modified: trunk/Tools/ChangeLog (120251 => 120252)
--- trunk/Tools/ChangeLog 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/ChangeLog 2012-06-13 22:37:11 UTC (rev 120252)
@@ -1,3 +1,35 @@
+2012-06-13 Dirk Pranke <[email protected]>
+
+ new-run-webkit-tests does not support --32-bit like ORWT did
+ https://bugs.webkit.org/show_bug.cgi?id=71634
+
+ Reviewed by Ojan Vafai.
+
+ This patch adds support for 32-bit apple mac builds, adding the
+ --32-bit flag for compatibility with ORWT and fixing the port
+ architecture() definition to actually return the correct values.
+
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort._generate_all_test_configurations):
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (port_options):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort):
+ (MacPort.__init__):
+ (MacPort._build_driver_flags):
+ (MacPort.setup_environ_for_server):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_sample_process_throws_exception):
+ (test_32bit):
+ (test_32bit.run_script):
+ (test_64bit):
+ (test_64bit.run_script):
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ (WebKitPort._build_driver):
+ (WebKitPort._build_driver_flags):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort):
+
2012-06-13 Ryosuke Niwa <[email protected]>
Remove webkitpy code to support legacy test_expectations.txt files
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -90,6 +90,6 @@
version = self.FUTURE_VERSION
for build_type in self.ALL_BUILD_TYPES:
- # But at some later point we may need to make these configurable by the MacPort and WinPort subclasses.
- configurations.append(TestConfiguration(version=version, architecture='x86', build_type=build_type))
+ for architecture in self.ARCHITECTURES:
+ configurations.append(TestConfiguration(version=version, architecture=architecture, build_type=build_type))
return configurations
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/factory.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/factory.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/factory.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -53,7 +53,9 @@
optparse.make_option('--gtk', action='', const='gtk', dest="platform",
help='Alias for --platform=gtk'),
optparse.make_option('--qt', action='', const='qt', dest="platform",
- help='Alias for --platform=qt')]
+ help='Alias for --platform=qt'),
+ optparse.make_option('--32-bit', action='', const='x86', default=None, dest="architecture",
+ help='use 32-bit binaries by default (x86 instead of x86_64)')]
class BuilderOptions(object):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -49,14 +49,20 @@
# and the order of fallback between them. Matches ORWT.
VERSION_FALLBACK_ORDER = ["mac-leopard", "mac-snowleopard", "mac-lion", "mac"]
+ ARCHITECTURES = ['x86_64', 'x86']
+
def __init__(self, host, port_name, **kwargs):
ApplePort.__init__(self, host, port_name, **kwargs)
+ self._architecture = self.get_option('architecture', 'x86_64')
self._leak_detector = LeakDetector(self)
if self.get_option("leaks"):
# DumpRenderTree slows down noticably if we run more than about 1000 tests in a batch
# with MallocStackLogging enabled.
self.set_option_default("batch_size", 1000)
+ def _build_driver_flags(self):
+ return ['ARCHS=i386'] if self.architecture() == 'x86' else []
+
def _most_recent_version(self):
# This represents the most recently-shipping version of the operating system.
return self.VERSION_FALLBACK_ORDER[-2]
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -253,3 +253,26 @@
port = self.make_port()
port._executive = MockExecutive2(run_command_fn=throwing_run_command)
OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42])
+
+ def test_32bit(self):
+ port = self.make_port(options=MockOptions(architecture='x86'))
+
+ def run_script(script, args=None, env=None):
+ self.args = args
+
+ port._run_script = run_script
+ self.assertEquals(port.architecture(), 'x86')
+ port._build_driver()
+ self.assertEquals(self.args, ['ARCHS=i386'])
+
+ def test_64bit(self):
+ # Apple Mac port is 64-bit by default
+ port = self.make_port()
+ self.assertEquals(port.architecture(), 'x86_64')
+
+ def run_script(script, args=None, env=None):
+ self.args = args
+
+ port._run_script = run_script
+ port._build_driver()
+ self.assertEquals(self.args, [])
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -114,14 +114,17 @@
# These two projects should be factored out into their own
# projects.
try:
- self._run_script("build-dumprendertree", env=env)
+ self._run_script("build-dumprendertree", args=self._build_driver_flags(), env=env)
if self.get_option('webkit_test_runner'):
- self._run_script("build-webkittestrunner", env=env)
+ self._run_script("build-webkittestrunner", args=self._build_driver_flags(), env=env)
except ScriptError, e:
_log.error(e.message_with_output(output_limit=None))
return False
return True
+ def _build_driver_flags(self):
+ return []
+
def _check_driver(self):
driver_path = self._path_to_driver()
if not self._filesystem.exists(driver_path):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (120251 => 120252)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-06-13 21:59:01 UTC (rev 120251)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-06-13 22:37:11 UTC (rev 120252)
@@ -46,6 +46,8 @@
# and the order of fallback between them. Matches ORWT.
VERSION_FALLBACK_ORDER = ["win-xp", "win-vista", "win-7sp0", "win"]
+ ARCHITECTURES = ['x86']
+
def do_text_results_differ(self, expected_text, actual_text):
# Sanity was restored in WK2, so we don't need this hack there.
if self.get_option('webkit_test_runner'):