Title: [182268] trunk/Tools
- Revision
- 182268
- Author
- [email protected]
- Date
- 2015-04-01 23:28:24 -0700 (Wed, 01 Apr 2015)
Log Message
When LayoutTestHelper fails to start, we continue to run the tests, ending up with mysterious failures
https://bugs.webkit.org/show_bug.cgi?id=143240
rdar://problem/19990425
Reviewed by Tim Horton.
* DumpRenderTree/mac/LayoutTestHelper.m:
(colorProfileURLForDisplay):
(saveDisplayColorProfiles):
Gracefully handle it when the current profile cannot be retrieved, fixing at
least one case when LayoutTestHelper couldn't start.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._set_up_run):
(Manager._force_pixel_tests_if_needed):
* Scripts/webkitpy/port/base.py: (Port.to.start_helper):
* Scripts/webkitpy/port/mac.py: (MacPort.start_helper):
Return and check an error from start_helper().
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (182267 => 182268)
--- trunk/Tools/ChangeLog 2015-04-02 05:58:20 UTC (rev 182267)
+++ trunk/Tools/ChangeLog 2015-04-02 06:28:24 UTC (rev 182268)
@@ -1,3 +1,24 @@
+2015-04-01 Alexey Proskuryakov <[email protected]>
+
+ When LayoutTestHelper fails to start, we continue to run the tests, ending up with mysterious failures
+ https://bugs.webkit.org/show_bug.cgi?id=143240
+ rdar://problem/19990425
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/mac/LayoutTestHelper.m:
+ (colorProfileURLForDisplay):
+ (saveDisplayColorProfiles):
+ Gracefully handle it when the current profile cannot be retrieved, fixing at
+ least one case when LayoutTestHelper couldn't start.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._set_up_run):
+ (Manager._force_pixel_tests_if_needed):
+ * Scripts/webkitpy/port/base.py: (Port.to.start_helper):
+ * Scripts/webkitpy/port/mac.py: (MacPort.start_helper):
+ Return and check an error from start_helper().
+
2015-04-01 Brent Fulgham <[email protected]>
[Win] Run test-webkitpy as part of EWS (just like we do on other platforms)
Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m (182267 => 182268)
--- trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m 2015-04-02 05:58:20 UTC (rev 182267)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m 2015-04-02 06:28:24 UTC (rev 182268)
@@ -73,7 +73,12 @@
profileURL = (CFURLRef)CFDictionaryGetValue(factoryProfile, kColorSyncDeviceProfileURL);
}
-
+ if (!profileURL) {
+ NSLog(@"Could not determine current color profile, so it will not be reset after running the tests.");
+ CFRelease(deviceInfo);
+ return nil;
+ }
+
NSURL *url = "" *)CFAutorelease(CFRetain(profileURL));
CFRelease(deviceInfo);
return url;
@@ -116,6 +121,9 @@
continue;
NSURL *colorProfileURL = colorProfileURLForDisplay(UUIDString);
+ if (!colorProfileURL)
+ continue;
+
[userColorProfiles setObject:colorProfileURL forKey:UUIDString];
}
}
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (182267 => 182268)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2015-04-02 05:58:20 UTC (rev 182267)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2015-04-02 06:28:24 UTC (rev 182268)
@@ -142,7 +142,8 @@
# This must be started before we check the system dependencies,
# since the helper may do things to make the setup correct.
self._printer.write_update("Starting helper ...")
- self._port.start_helper(self._options.pixel_tests)
+ if not self._port.start_helper(self._options.pixel_tests):
+ return False
self._port.reset_preferences()
@@ -267,10 +268,8 @@
_log.debug("Restarting helper")
self._port.stop_helper()
self._options.pixel_tests = True
- self._port.start_helper()
+ return self._port.start_helper()
- return True
-
def _look_for_new_crash_logs(self, run_results, start_time):
"""Since crash logs can take a long time to be written out if the system is
under stress do a second pass at the end of the test run.
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (182267 => 182268)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2015-04-02 05:58:20 UTC (rev 182267)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2015-04-02 06:28:24 UTC (rev 182268)
@@ -866,7 +866,7 @@
"""If a port needs to reconfigure graphics settings or do other
things to ensure a known test configuration, it should override this
method."""
- pass
+ return True
def reset_preferences(self):
"""If a port needs to reset platform-specific persistent preference
Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (182267 => 182268)
--- trunk/Tools/Scripts/webkitpy/port/mac.py 2015-04-02 05:58:20 UTC (rev 182267)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py 2015-04-02 06:28:24 UTC (rev 182268)
@@ -258,14 +258,18 @@
def start_helper(self, pixel_tests=False):
helper_path = self._path_to_helper()
- if helper_path:
- _log.debug("Starting layout helper %s" % helper_path)
- arguments = [helper_path, '--install-color-profile']
- self._helper = self._executive.popen(arguments,
- stdin=self._executive.PIPE, stdout=self._executive.PIPE, stderr=None)
- is_ready = self._helper.stdout.readline()
- if not is_ready.startswith('ready'):
- _log.error("LayoutTestHelper failed to be ready")
+ if not helper_path:
+ _log.error("No path to LayoutTestHelper binary")
+ return False
+ _log.debug("Starting layout helper %s" % helper_path)
+ arguments = [helper_path, '--install-color-profile']
+ self._helper = self._executive.popen(arguments,
+ stdin=self._executive.PIPE, stdout=self._executive.PIPE, stderr=None)
+ is_ready = self._helper.stdout.readline()
+ if not is_ready.startswith('ready'):
+ _log.error("LayoutTestHelper could not start")
+ return False
+ return True
def reset_preferences(self):
_log.debug("Resetting persistent preferences")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes