Diff
Modified: trunk/Tools/ChangeLog (205350 => 205351)
--- trunk/Tools/ChangeLog 2016-09-02 17:58:13 UTC (rev 205350)
+++ trunk/Tools/ChangeLog 2016-09-02 17:59:18 UTC (rev 205351)
@@ -1,5 +1,24 @@
2016-09-02 Jonathan Bedard <[email protected]>
+ Fix --no-sample-on-timeout command line argument
+ https://bugs.webkit.org/show_bug.cgi?id=161507
+
+ Reviewed by Alexey Proskuryakov.
+
+ This patch fixes the —no-sample-on-timeout flag and correctly names spindumps as spindump.txt.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args): Fixed —-no-sample-on-timeout.
+ * Scripts/webkitpy/port/apple.py:
+ (ApplePort.sample_process): Use correct file name.
+ (ApplePort.spindump_file_path): Spindump and sample file names are different.
+ * Scripts/webkitpy/port/driver.py:
+ (Driver._check_for_driver_timeout): Check “sample_on_timeout” flag.
+ * Scripts/webkitpy/port/mac_unittest.py:
+ (MacTest.test_spindump): Modified for correct filename.
+
+2016-09-02 Jonathan Bedard <[email protected]>
+
Unreviewed: moved myself to the reviewers list.
* Scripts/webkitpy/common/config/contributors.json:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (205350 => 205351)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2016-09-02 17:58:13 UTC (rev 205350)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2016-09-02 17:59:18 UTC (rev 205351)
@@ -139,7 +139,7 @@
dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"),
optparse.make_option("--no-pixel", "--no-pixel-tests", action=""
dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
- optparse.make_option("--no-sample-on-timeout", action=""
+ optparse.make_option("--no-sample-on-timeout", action="" default=True,
dest="sample_on_timeout", help="Don't run sample on timeout (OS X only)"),
optparse.make_option("--no-ref-tests", action=""
dest="no_ref_tests", help="Skip all ref tests"),
Modified: trunk/Tools/Scripts/webkitpy/port/apple.py (205350 => 205351)
--- trunk/Tools/Scripts/webkitpy/port/apple.py 2016-09-02 17:58:13 UTC (rev 205350)
+++ trunk/Tools/Scripts/webkitpy/port/apple.py 2016-09-02 17:59:18 UTC (rev 205351)
@@ -198,7 +198,6 @@
return self._merge_crash_logs(crash_logs, all_crash_log, crashed_processes)
def sample_process(self, name, pid):
- hang_report = self.sample_file_path(name, pid)
exit_status = self._executive.run_command([
"/usr/bin/sudo",
"-n",
@@ -207,7 +206,7 @@
10,
10,
"-file",
- hang_report,
+ self.spindump_file_path(name, pid),
], return_exit_code=True)
if exit_status:
try:
@@ -217,7 +216,7 @@
10,
10,
"-file",
- hang_report,
+ self.sample_file_path(name, pid),
])
except ScriptError as e:
_log.warning('Unable to sample process:' + str(e))
@@ -225,6 +224,9 @@
def sample_file_path(self, name, pid):
return self._filesystem.join(self.results_directory(), "{0}-{1}-sample.txt".format(name, pid))
+ def spindump_file_path(self, name, pid):
+ return self._filesystem.join(self.results_directory(), "{0}-{1}-spindump.txt".format(name, pid))
+
def look_for_new_samples(self, unresponsive_processes, start_time):
sample_files = {}
for (test_name, process_name, pid) in unresponsive_processes:
Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (205350 => 205351)
--- trunk/Tools/Scripts/webkitpy/port/driver.py 2016-09-02 17:58:13 UTC (rev 205350)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py 2016-09-02 17:59:18 UTC (rev 205351)
@@ -430,7 +430,8 @@
err_line = 'Wait on notifyDone timed out, process ' + child_process_name + ' pid = ' + str(child_process_pid)
self.error_from_test += err_line
_log.debug(err_line)
- self._port.sample_process(child_process_name, child_process_pid)
+ if self._port.get_option("sample_on_timeout"):
+ self._port.sample_process(child_process_name, child_process_pid)
if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
self._driver_timed_out = True
Modified: trunk/Tools/Scripts/webkitpy/port/mac_unittest.py (205350 => 205351)
--- trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2016-09-02 17:58:13 UTC (rev 205350)
+++ trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2016-09-02 17:59:18 UTC (rev 205351)
@@ -204,7 +204,7 @@
port = self.make_port()
port._executive = MockExecutive2(run_command_fn=logging_run_command)
- expected_stdout = "['/usr/bin/sudo', '-n', '/usr/sbin/spindump', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42-sample.txt']\n"
+ expected_stdout = "['/usr/bin/sudo', '-n', '/usr/sbin/spindump', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42-spindump.txt']\n"
OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout)
def test_sample_process(self):