Changeset 212182 in webkit
- Timestamp:
- Feb 10, 2017 10:01:20 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r212173 r212182 1 2017-02-10 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 REGRESSION(r182916) run-perf-tests never timeouts 4 https://bugs.webkit.org/show_bug.cgi?id=167626 5 6 Reviewed by Ryosuke Niwa. 7 8 The --time-out-ms value (defaults to 600 seconds) of run-perf-tests 9 was beeing ignored because the driver was created with no_timeout=True 10 unconditionally. 11 This adds a new parameter --no-timeout (disabled by default), that 12 allows to use the driver with the expected timeout values. 13 It also passes --no-timeout to DRT/WTR to ensure that timeouts 14 are always controlled by the Python Driver. 15 16 * Scripts/webkitpy/performance_tests/perftest.py: 17 (PerfTest._create_driver): Only disable timeout if --no-timeout is passed. 18 (PerfTest.run): Disabling timeout should be done when the Driver is created. 19 * Scripts/webkitpy/performance_tests/perftestsrunner.py: 20 (PerfTestsRunner.__init__): Ensure --no-timeout is passed to DRT/WTR 21 (PerfTestsRunner._parse_args): Add a --no-timeout parameter. 22 (_run_tests_set): Pass the no-timeout parameter. 23 * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: 24 (MainTest.test_drt_notimeout): Test --no-timeout is passed to DRT/WTR 25 (MainTest.test_default_args): Test default values for additional_drt_flag and no_timeout. 26 (MainTest.test_parse_args): Test that the argument no-timeout. 27 1 28 2017-02-10 Daniel Bates <dabates@apple.com> 2 29 -
trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py
r190535 r212182 123 123 return True 124 124 125 def _create_driver(self ):126 return self._port.create_driver(worker_number=0, no_timeout= True)127 128 def run(self, time_out_ms ):125 def _create_driver(self, no_timeout): 126 return self._port.create_driver(worker_number=0, no_timeout=no_timeout) 127 128 def run(self, time_out_ms, no_timeout=False): 129 129 for _ in xrange(self._test_runner_count): 130 driver = self._create_driver( )130 driver = self._create_driver(no_timeout) 131 131 try: 132 132 if not self._run_with_driver(driver, time_out_ms): -
trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
r210523 r212182 67 67 self._port = self._host.port_factory.get(self._options.platform, self._options) 68 68 69 # Timeouts are controlled by the Python Driver, so DRT/WTR runs with no-timeout. 70 self._options.additional_drt_flag.append('--no-timeout') 71 69 72 # The GTK+ and EFL ports only supports WebKit2, so they always use WKTR. 70 73 if self._port.name().startswith("gtk") or self._port.name().startswith("efl"): … … 101 104 optparse.make_option("--time-out-ms", default=600 * 1000, 102 105 help="Set the timeout for each test"), 106 optparse.make_option("--no-timeout", action="store_true", default=False, 107 help="Disable test timeouts"), 103 108 optparse.make_option("--no-results", action="store_false", dest="generate_results", default=True, 104 109 help="Do no generate results JSON and results page."), … … 376 381 _log.info('Running %s (%d of %d)' % (test.test_name(), i + 1, len(tests))) 377 382 start_time = time.time() 378 metrics = test.run(self._options.time_out_ms) 383 metrics = test.run(self._options.time_out_ms, self._options.no_timeout) 384 379 385 if metrics: 380 386 self._results += metrics -
trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
r174136 r212182 56 56 runner._host.filesystem.files[runner._host.filesystem.join(dirname, filename)] = content 57 57 58 def test_drt_notimeout(self): 59 runner, port = self.create_runner() 60 self.assertEqual(runner._options.additional_drt_flag, ['--no-timeout']) 61 58 62 def test_collect_tests(self): 59 63 runner, port = self.create_runner() … … 117 121 self.assertTrue(options.build) 118 122 self.assertEqual(options.time_out_ms, 600 * 1000) 123 self.assertEqual(options.additional_drt_flag, []) 119 124 self.assertTrue(options.generate_results) 120 125 self.assertTrue(options.show_results) … … 122 127 self.assertEqual(options.repeat, 1) 123 128 self.assertEqual(options.test_runner_count, -1) 129 self.assertEqual(options.no_timeout, False) 124 130 125 131 def test_parse_args(self): … … 140 146 '--repeat=5', 141 147 '--test-runner-count=5', 142 '--debug']) 148 '--debug', 149 '--no-timeout']) 143 150 self.assertTrue(options.build) 144 151 self.assertEqual(options.build_directory, 'folder42') … … 156 163 self.assertEqual(options.repeat, 5) 157 164 self.assertEqual(options.test_runner_count, 5) 165 self.assertEqual(options.no_timeout, True) 158 166 159 167 def test_upload_json(self):
Note: See TracChangeset
for help on using the changeset viewer.