REGRESSION(r219850): run-benchmark script broken on Linux
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 01:12:52 +0000 (01:12 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 01:12:52 +0000 (01:12 +0000)
commitc94c2696f7e3bbdbabfb5604279dc7ae3531dec2
treecc7dbef5d3dce34bf0a11b14b4500d835687129a
parent3a35575b3147af1db666f4eb8b46237be82cc679
REGRESSION(r219850): run-benchmark script broken on Linux
https://bugs.webkit.org/show_bug.cgi?id=175126

Reviewed by Stephanie Lewis.

The run-benchmark script dynamically generates the list of supported
browsers and platforms (currently Linux and OSX) by loading all
python files from Tools/Scripts/webkitpy/benchmark_runner/browser_driver
and getting the browser_name and platform variables from the
classes defined there.

This means that this classes should not raise an exception when
loaded on other platforms or otherwise they will broke the whole
script. Its fine if they raise an exception when executing any of
the methods they implement, but not when just loading/importing
the class.

Move the argument variable definitions that call on the platform
specific OSXBrowserDriver._screen_size() function from beeing
variables that are evaluated when loading the file, to be functions
that are only evaluated when the actual functionality needs to be
executed.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver.launch_url):
(OSXChromeCanaryDriver.launch_url):
(create_args):
(create_chrome_options):
(create_window_size_arg):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver.launch_url):
(OSXFirefoxNightlyDriver.launch_url):
(OSXFirefoxNightlyDriver.launch_driver):
(create_args):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py
Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py