Diff
Modified: trunk/Tools/ChangeLog (253909 => 253910)
--- trunk/Tools/ChangeLog 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/ChangeLog 2019-12-25 17:50:57 UTC (rev 253910)
@@ -1,3 +1,29 @@
+2019-12-25 Dean Jackson <[email protected]>
+
+ WKTR/DRT always trigger the Discrete GPU on dual GPU systems
+ https://bugs.webkit.org/show_bug.cgi?id=205546
+ <rdar://problem/58139610>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add an option "--prefer-integrated-gpu" to run-webkit-test
+ that causes the LayoutTestHelper to NOT lock the
+ machine to a discrete GPU on a dual-GPU system.
+ The default is false.
+
+ * DumpRenderTree/mac/LayoutTestHelper.m:
+ (main):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._set_up_run):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/port/base.py:
+ (Port.start_helper):
+ * Scripts/webkitpy/port/mac.py:
+ (MacPort.start_helper):
+ * Scripts/webkitpy/port/mock_drt.py:
+ (MockDRTPort.start_helper):
+
2019-12-25 Wenson Hsieh <[email protected]>
REGRESSION (r253282): Tests that use applyAutocorrection assert in UIScriptContext::requestUIScriptCompletion
Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m (253909 => 253910)
--- trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m 2019-12-25 17:50:57 UTC (rev 253910)
@@ -57,6 +57,7 @@
// running layout tests.
static int installColorProfile = false;
+static int preferIntegratedGPU = false;
static uint32_t assertionIDForDisplaySleep = 0;
static uint32_t assertionIDForSystemSleep = 0;
@@ -261,6 +262,7 @@
{
struct option options[] = {
{ "install-color-profile", no_argument, &installColorProfile, true },
+ { "prefer-integrated-gpu", no_argument, &preferIntegratedGPU, true },
};
int option;
@@ -279,7 +281,8 @@
signal(SIGTERM, simpleSignalHandler);
addSleepAssertions();
- lockDownDiscreteGraphics();
+ if (!preferIntegratedGPU)
+ lockDownDiscreteGraphics();
// Save off the current profile, and then install the layout test profile.
installLayoutTestColorProfile();
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (253909 => 253910)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2019-12-25 17:50:57 UTC (rev 253910)
@@ -160,7 +160,7 @@
# 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 ...")
- if not self._port.start_helper(self._options.pixel_tests):
+ if not self._port.start_helper(pixel_tests=self._options.pixel_tests, prefer_integrated_gpu=self._options.prefer_integrated_gpu):
return False
self._update_worker_count(test_names, device_type=device_type)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (253909 => 253910)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2019-12-25 17:50:57 UTC (rev 253910)
@@ -327,6 +327,9 @@
optparse.make_option(
"--use-gpu-process", action="" default=False,
help=("Enable all GPU process related features, also set additional expectations and the result report flavor.")),
+ optparse.make_option(
+ "--prefer-integrated-gpu", action="" default=False,
+ help=("Prefer using the lower-power integrated GPU on a dual-GPU system. Note that other running applications and the tests themselves can override this request.")),
]))
option_group_definitions.append(("Web Platform Test Server Options", [
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (253909 => 253910)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2019-12-25 17:50:57 UTC (rev 253910)
@@ -949,7 +949,7 @@
"""Return a newly created Driver subclass for starting/stopping the test driver."""
return driver.DriverProxy(self, worker_number, self._driver_class(), pixel_tests=self.get_option('pixel_tests'), no_timeout=no_timeout)
- def start_helper(self, pixel_tests=False):
+ def start_helper(self, pixel_tests=False, prefer_integrated_gpu=False):
"""If a port needs to reconfigure graphics settings or do other
things to ensure a known test configuration, it should override this
method."""
Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (253909 => 253910)
--- trunk/Tools/Scripts/webkitpy/port/mac.py 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py 2019-12-25 17:50:57 UTC (rev 253910)
@@ -212,7 +212,7 @@
supportable_instances = default_count
return min(supportable_instances, default_count)
- def start_helper(self, pixel_tests=False):
+ def start_helper(self, pixel_tests=False, prefer_integrated_gpu=False):
helper_path = self._path_to_helper()
if not helper_path:
_log.error("No path to LayoutTestHelper binary")
@@ -219,6 +219,8 @@
return False
_log.debug("Starting layout helper %s" % helper_path)
arguments = [helper_path, '--install-color-profile']
+ if prefer_integrated_gpu:
+ arguments.append('--prefer-integrated-gpu')
self._helper = self._executive.popen(arguments,
stdin=self._executive.PIPE, stdout=self._executive.PIPE, stderr=None)
is_ready = self._helper.stdout.readline()
Modified: trunk/Tools/Scripts/webkitpy/port/mock_drt.py (253909 => 253910)
--- trunk/Tools/Scripts/webkitpy/port/mock_drt.py 2019-12-25 15:52:28 UTC (rev 253909)
+++ trunk/Tools/Scripts/webkitpy/port/mock_drt.py 2019-12-25 17:50:57 UTC (rev 253910)
@@ -101,7 +101,7 @@
return new_cmd_line
- def start_helper(self, pixel_tests=False):
+ def start_helper(self, pixel_tests=False, prefer_integrated_gpu=False):
pass
def start_http_server(self, number_of_servers):