Changeset 245824 in webkit
- Timestamp:
- May 28, 2019 2:04:44 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r245819 r245824 1 2019-05-28 David Xiong <w_xiong@apple.com> 2 3 webkitpy: Switch run-webkit-tests to tailspin 4 https://bugs.webkit.org/show_bug.cgi?id=198144 5 <rdar://problem/32463212> 6 7 Reviewed by Jonathan Bedard. 8 9 Changes run-webkit-tests to run tailspin on test time out 10 rather than spindump, and edited tests to look for tailspin logs 11 instead. 12 13 * Scripts/webkitpy/port/darwin.py: 14 (DarwinPort.sample_process): Replaced spindump with tailspin (+ symbolication) 15 (DarwinPort): 16 (DarwinPort.tailspin_file_path): 17 (DarwinTest.spindump_file_path): Deleted. 18 * Scripts/webkitpy/port/darwin_testcase.py: 19 (DarwinTest.test_tailspin): Changed spindump test (below) to test for tailspin instead 20 (DarwinTest.test_spindump): Deleted. 21 (DarwinTest.test_spindump.logging_run_command): Deleted. 22 * Scripts/webkitpy/port/ios_device_unittest.py: 23 (IOSDeviceTest.test_tailspin): Changed spindump tests (inc. below) to test for tailspin instead 24 (IOSDeviceTest.test_sample_process.logging_run_command): 25 (IOSDeviceTest.test_sample_process_exception.throwing_run_command): 26 (IOSDeviceTest.test_spindump): Deleted. 27 (IOSDeviceTest.test_spindump.logging_run_command): Deleted. 28 1 29 2019-05-28 David Xiong <w_xiong@apple.com> 2 30 -
trunk/Tools/Scripts/webkitpy/port/darwin.py
r245819 r245824 161 161 host = target_host or self.host 162 162 tempdir = host.filesystem.mkdtemp() 163 temp_tailspin_file_path = host.filesystem.join(str(tempdir), "{0}-{1}-tailspin-temp.txt".format(name, pid)) 163 164 command = [ 164 '/usr/sbin/spindump', 165 pid, 166 10, 167 10, 168 '-file', 169 DarwinPort.spindump_file_path(host, name, pid, str(tempdir)), 165 '/usr/bin/tailspin', 166 'save', 167 '-n', 168 temp_tailspin_file_path, 170 169 ] 171 170 if host.platform.is_mac(): 172 171 command = ['/usr/bin/sudo', '-n'] + command 172 173 173 exit_status = host.executive.run_command(command, return_exit_code=True) 174 if exit_status: 174 if not exit_status: # Symbolicate tailspin log using spindump 175 try: 176 host.executive.run_command([ 177 '/usr/sbin/spindump', 178 '-i', 179 temp_tailspin_file_path, 180 '-file', 181 DarwinPort.tailspin_file_path(host, name, pid, str(tempdir)), 182 ]) 183 host.filesystem.move_to_base_host(DarwinPort.tailspin_file_path(host, name, pid, str(tempdir)), 184 DarwinPort.tailspin_file_path(self.host, name, pid, self.results_directory())) 185 except IOError as e: 186 _log.warning('Unable to symbolicate tailspin log of process:' + str(e)) 187 else: # Tailspin failed, run sample instead 175 188 try: 176 189 host.executive.run_command([ … … 186 199 except ScriptError as e: 187 200 _log.warning('Unable to sample process:' + str(e)) 188 else:189 host.filesystem.move_to_base_host(DarwinPort.spindump_file_path(host, name, pid, str(tempdir)),190 DarwinPort.spindump_file_path(self.host, name, pid, self.results_directory()))191 201 host.filesystem.rmtree(str(tempdir)) 192 202 … … 196 206 197 207 @staticmethod 198 def spindump_file_path(host, name, pid, directory):199 return host.filesystem.join(directory, "{0}-{1}- spindump.txt".format(name, pid))208 def tailspin_file_path(host, name, pid, directory): 209 return host.filesystem.join(directory, "{0}-{1}-tailspin.txt".format(name, pid)) 200 210 201 211 def look_for_new_samples(self, unresponsive_processes, start_time): -
trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py
r225856 r245824 99 99 self.assertEqual(port.path_to_crash_logs(), '/Users/mock/Library/Logs/DiagnosticReports') 100 100 101 def test_ spindump(self):101 def test_tailspin(self): 102 102 103 103 def logging_run_command(args): … … 105 105 106 106 port = self.make_port() 107 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file' 107 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt'] = 'Temporary tailspin output file' 108 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt'] = 'Symbolocated tailspin file' 108 109 port.host.executive = MockExecutive2(run_command_fn=logging_run_command) 109 expected_stdout = "['/usr/bin/sudo', '-n', '/usr/ sbin/spindump', 42, 10, 10, '-file', '/__im_tmp/tmp_0_/test-42-spindump.txt']\n"110 expected_stdout = "['/usr/bin/sudo', '-n', '/usr/bin/tailspin', 'save', '-n', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']\n['/usr/sbin/spindump', '-i', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt', '-file', '/__im_tmp/tmp_0_/test-42-tailspin.txt']\n" 110 111 OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout) 111 self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-spindump.txt'], 'Spindump file') 112 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt']) 112 self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-tailspin.txt'], 'Symbolocated tailspin file') 113 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']) 114 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt']) 113 115 114 116 def test_sample_process(self): -
trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py
r239875 r245824 46 46 port.path_to_crash_logs() 47 47 48 def test_ spindump(self):48 def test_tailspin(self): 49 49 def logging_run_command(args): 50 50 print(args) 51 51 52 52 port = self.make_port() 53 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file' 53 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt'] = 'Temporary tailspin output file' 54 port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt'] = 'Symbolocated tailspin file' 54 55 port.host.executive = MockExecutive2(run_command_fn=logging_run_command) 55 expected_stdout = "['/usr/ sbin/spindump', 42, 10, 10, '-file', '/__im_tmp/tmp_0_/test-42-spindump.txt']\n"56 expected_stdout = "['/usr/bin/tailspin', 'save', '-n', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']\n['/usr/sbin/spindump', '-i', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt', '-file', '/__im_tmp/tmp_0_/test-42-tailspin.txt']\n" 56 57 OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout) 57 self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-spindump.txt'], 'Spindump file') 58 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt']) 58 self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-tailspin.txt'], 'Symbolocated tailspin file') 59 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']) 60 self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt']) 59 61 60 62 def test_sample_process(self): 61 63 def logging_run_command(args): 62 if args[0] == '/usr/ sbin/spindump':64 if args[0] == '/usr/bin/tailspin': 63 65 return 1 64 66 print(args) … … 75 77 def test_sample_process_exception(self): 76 78 def throwing_run_command(args): 77 if args[0] == '/usr/ sbin/spindump':79 if args[0] == '/usr/bin/tailspin': 78 80 return 1 79 81 raise ScriptError('MOCK script error')
Note: See TracChangeset
for help on using the changeset viewer.