Changeset 90074 in webkit
- Timestamp:
- Jun 29, 2011 5:42:39 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90070 r90074 1 2011-06-29 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 new-run-webkit-tests doesn't support sample-on-timeout 6 https://bugs.webkit.org/show_bug.cgi?id=56731 7 8 * Scripts/webkitpy/layout_tests/port/server_process.py: 9 * Scripts/webkitpy/layout_tests/port/server_process_unittest.py: 10 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 11 1 12 2011-06-29 Eric Seidel <eric@webkit.org> 2 13 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
r89899 r90074 42 42 from webkitpy.common.system.executive import Executive 43 43 44 _log = logging.getLogger( "webkitpy.layout_tests.port.server_process")44 _log = logging.getLogger(__file__) 45 45 46 46 … … 167 167 self.handle_interrupt() 168 168 169 def _sample(self): 170 if sys.platform != "darwin": 171 return 172 _log.warning('Sampling process... (use --no-sample-on-timeout to skip this step)') 173 hang_report = os.path.join(self._port.results_directory(), "%s-%s.sample.txt" % (self._name, self._proc.pid)) 174 self._executive.run_command([ 175 "/usr/bin/sample", 176 self._proc.pid, 177 10, 178 10, 179 "-file", 180 hang_report, 181 ]) 182 169 183 def _read(self, timeout, size): 170 184 """Internal routine that actually does the read.""" … … 185 199 self._check_for_crash() 186 200 self.timed_out = True 201 if not self.crashed: 202 self._sample() 187 203 188 204 # Check to see if we have any output we can return. -
trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
r77592 r90074 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 import sys 29 30 import unittest 30 31 31 32 from webkitpy.layout_tests.port import server_process 33 from webkitpy.common.system.executive_mock import MockExecutive2 34 from webkitpy.common.system.outputcapture import OutputCapture 35 36 37 def _logging_run_command(args): 38 print args 39 40 41 class TrivialMockPort(object): 42 def results_directory(self): 43 return "/mock/results" 32 44 33 45 … … 73 85 self.assertEquals(server_process.broken_pipes, [server_process.stdin]) 74 86 75 76 if __name__ == '__main__': 77 unittest.main() 87 def test_sample_process(self): 88 # Currently, sample-on-timeout only works on Darwin. 89 if sys.platform != "darwin": 90 return 91 server_process = FakeServerProcess(port_obj=TrivialMockPort(), name="test", cmd=["test"], executive=MockExecutive2(run_command_fn=_logging_run_command)) 92 server_process._proc = MockProc(server_process) 93 expected_stdout = "['/usr/bin/sample', 1, 10, 10, '-file', '/mock/results/test-1.sample.txt']\n" 94 OutputCapture().assert_outputs(self, server_process._sample, expected_stdout=expected_stdout) -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r90055 r90074 277 277 # FIXME: Need: -g, --guard for guard malloc support on Mac. 278 278 # FIXME: Need: -l --leaks Enable leaks checking. 279 # FIXME: Need: --sample-on-timeout Run sample on timeout280 279 281 280 old_run_webkit_tests_compat = [ 282 # NRWT doesn't sample on timeout yet anyway.283 _compat_shim_option("--no-sample-on-timeout"),284 281 # FIXME: NRWT needs to support remote links eventually. 285 282 _compat_shim_option("--use-remote-links-to-tests"), … … 293 290 optparse.make_option("--no-pixel-tests", action="store_false", 294 291 dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"), 292 optparse.make_option("--no-sample-on-timeout", action="store_false", 293 dest="sample_on_timeout", help="Don't run sample on timeout (Mac OS X only)"), 295 294 optparse.make_option("--tolerance", 296 295 help="Ignore image differences less than this percentage (some "
Note: See TracChangeset
for help on using the changeset viewer.