Changeset 220246 in webkit
- Timestamp:
- Aug 3, 2017 6:12:52 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r220243 r220246 1 2017-08-03 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 REGRESSION(r219850): run-benchmark script broken on Linux 4 https://bugs.webkit.org/show_bug.cgi?id=175126 5 6 Reviewed by Stephanie Lewis. 7 8 The run-benchmark script dynamically generates the list of supported 9 browsers and platforms (currently Linux and OSX) by loading all 10 python files from Tools/Scripts/webkitpy/benchmark_runner/browser_driver 11 and getting the browser_name and platform variables from the 12 classes defined there. 13 14 This means that this classes should not raise an exception when 15 loaded on other platforms or otherwise they will broke the whole 16 script. Its fine if they raise an exception when executing any of 17 the methods they implement, but not when just loading/importing 18 the class. 19 20 Move the argument variable definitions that call on the platform 21 specific OSXBrowserDriver._screen_size() function from beeing 22 variables that are evaluated when loading the file, to be functions 23 that are only evaluated when the actual functionality needs to be 24 executed. 25 26 * Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py: 27 (OSXChromeDriver.launch_url): 28 (OSXChromeCanaryDriver.launch_url): 29 (create_args): 30 (create_chrome_options): 31 (create_window_size_arg): 32 * Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: 33 (OSXFirefoxDriver.launch_url): 34 (OSXFirefoxNightlyDriver.launch_url): 35 (OSXFirefoxNightlyDriver.launch_driver): 36 (create_args): 37 1 38 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp> 2 39 -
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py
r219860 r220246 8 8 9 9 _log = logging.getLogger(__name__) 10 window_size_arg = '--window-size={width},{height}'.format(width=int(OSXBrowserDriver._screen_size().width), height=int(OSXBrowserDriver._screen_size().height))11 args = ['--args', '--homepage', window_size_arg]12 10 13 11 class OSXChromeDriver(OSXBrowserDriver): … … 17 15 18 16 def launch_url(self, url, options, browser_build_path): 19 args_with_url = self._insert_url( args, 2, url)17 args_with_url = self._insert_url(create_args(), 2, url) 20 18 self._launch_process(build_dir=browser_build_path, app_name=self.app_name, url=url, args=args_with_url) 21 19 … … 39 37 40 38 def launch_url(self, url, options, browser_build_path): 41 args_with_url = self._insert_url( args, 2, url)39 args_with_url = self._insert_url(create_args(), 2, url) 42 40 self._launch_process(build_dir=browser_build_path, app_name=self.app_name, url=url, args=args_with_url) 43 41 … … 56 54 57 55 56 def create_args(): 57 args = ['--args', '--homepage', create_window_size_arg()] 58 return args 59 58 60 def create_chrome_options(): 59 61 from webkitpy.thirdparty.autoinstalled.selenium.webdriver.chrome.options import Options … … 62 64 chrome_options.add_argument("--user-data-dir") 63 65 chrome_options.add_argument("--disable-extensions") 64 chrome_options.add_argument( window_size_arg)66 chrome_options.add_argument(create_window_size_arg()) 65 67 return chrome_options 68 69 70 def create_window_size_arg(): 71 window_size_arg = '--window-size={width},{height}'.format(width=int(OSXBrowserDriver._screen_size().width), height=int(OSXBrowserDriver._screen_size().height)) 72 return window_size_arg -
trunk/Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py
r219860 r220246 9 9 _log = logging.getLogger(__name__) 10 10 11 args = ['--args', '-width', str(int(OSXBrowserDriver._screen_size().width)), '-height', str(int(OSXBrowserDriver._screen_size().height))]12 13 11 14 12 class OSXFirefoxDriver(OSXBrowserDriver): … … 18 16 19 17 def launch_url(self, url, options, browser_build_path): 20 args_with_url = self._insert_url( args, 0, url)18 args_with_url = self._insert_url(create_args(), 0, url) 21 19 self._launch_process(build_dir=browser_build_path, app_name=self.app_name, url=url, args=args_with_url) 22 20 … … 41 39 42 40 def launch_url(self, url, options, browser_build_path): 43 args_with_url = self._insert_url( args, 0, url)41 args_with_url = self._insert_url(create_args(), 0, url) 44 42 self._launch_process(build_dir=browser_build_path, app_name=self.app_name, url=url, args=args_with_url) 45 43 … … 57 55 self._launch_webdriver(url=url, driver=driver) 58 56 return driver 57 58 59 def create_args(): 60 args = ['--args', '-width', str(int(OSXBrowserDriver._screen_size().width)), '-height', str(int(OSXBrowserDriver._screen_size().height))] 61 return args
Note: See TracChangeset
for help on using the changeset viewer.