Changeset 205351 in webkit


Ignore:
Timestamp:
Sep 2, 2016 10:59:18 AM (8 years ago)
Author:
Jonathan Bedard
Message:

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.

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r205345 r205351  
     12016-09-02  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Fix --no-sample-on-timeout command line argument
     4        https://bugs.webkit.org/show_bug.cgi?id=161507
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        This patch fixes the —no-sample-on-timeout flag and correctly names spindumps as spindump.txt.
     9
     10        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     11        (parse_args): Fixed —-no-sample-on-timeout.
     12        * Scripts/webkitpy/port/apple.py:
     13        (ApplePort.sample_process): Use correct file name.
     14        (ApplePort.spindump_file_path): Spindump and sample file names are different.
     15        * Scripts/webkitpy/port/driver.py:
     16        (Driver._check_for_driver_timeout): Check “sample_on_timeout” flag.
     17        * Scripts/webkitpy/port/mac_unittest.py:
     18        (MacTest.test_spindump): Modified for correct filename.
     19
    1202016-09-02  Jonathan Bedard  <jbedard@apple.com>
    221
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r205080 r205351  
    140140        optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_false",
    141141            dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
    142         optparse.make_option("--no-sample-on-timeout", action="store_false",
     142        optparse.make_option("--no-sample-on-timeout", action="store_false", default=True,
    143143            dest="sample_on_timeout", help="Don't run sample on timeout (OS X only)"),
    144144        optparse.make_option("--no-ref-tests", action="store_true",
  • trunk/Tools/Scripts/webkitpy/port/apple.py

    r204271 r205351  
    199199
    200200    def sample_process(self, name, pid):
    201         hang_report = self.sample_file_path(name, pid)
    202201        exit_status = self._executive.run_command([
    203202            "/usr/bin/sudo",
     
    208207            10,
    209208            "-file",
    210             hang_report,
     209            self.spindump_file_path(name, pid),
    211210        ], return_exit_code=True)
    212211        if exit_status:
     
    218217                    10,
    219218                    "-file",
    220                     hang_report,
     219                    self.sample_file_path(name, pid),
    221220                ])
    222221            except ScriptError as e:
     
    225224    def sample_file_path(self, name, pid):
    226225        return self._filesystem.join(self.results_directory(), "{0}-{1}-sample.txt".format(name, pid))
     226
     227    def spindump_file_path(self, name, pid):
     228        return self._filesystem.join(self.results_directory(), "{0}-{1}-spindump.txt".format(name, pid))
    227229
    228230    def look_for_new_samples(self, unresponsive_processes, start_time):
  • trunk/Tools/Scripts/webkitpy/port/driver.py

    r205123 r205351  
    431431            self.error_from_test += err_line
    432432            _log.debug(err_line)
    433             self._port.sample_process(child_process_name, child_process_pid)
     433            if self._port.get_option("sample_on_timeout"):
     434                self._port.sample_process(child_process_name, child_process_pid)
    434435        if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
    435436            self._driver_timed_out = True
  • trunk/Tools/Scripts/webkitpy/port/mac_unittest.py

    r204271 r205351  
    205205        port = self.make_port()
    206206        port._executive = MockExecutive2(run_command_fn=logging_run_command)
    207         expected_stdout = "['/usr/bin/sudo', '-n', '/usr/sbin/spindump', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42-sample.txt']\n"
     207        expected_stdout = "['/usr/bin/sudo', '-n', '/usr/sbin/spindump', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42-spindump.txt']\n"
    208208        OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout)
    209209
Note: See TracChangeset for help on using the changeset viewer.