Changeset 83327 in webkit
- Timestamp:
- Apr 8, 2011 12:48:47 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r83310 r83327 1 2011-04-08 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Ojan Vafai. 4 5 new-run-webkit-tests: clean up the way we handle missing files, 6 to be consistent. With this change, the Port.expected_X() and 7 Driver.run_test() routines should return None if there is no 8 output, not ''. 9 10 https://bugs.webkit.org/show_bug.cgi?id=58101 11 12 * Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py: 13 * Scripts/webkitpy/layout_tests/port/base.py: 14 * Scripts/webkitpy/layout_tests/port/chromium.py: 15 * Scripts/webkitpy/layout_tests/port/webkit.py: 16 1 17 2011-04-08 Pere Martir <pere.martir4@gmail.com> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py
r81127 r83327 223 223 def _compare_text(self, actual_text, expected_text): 224 224 failures = [] 225 if self._port.compare_text(self._get_normalized_output_text(actual_text), 226 # Assuming expected_text is already normalized. 227 expected_text): 228 if expected_text == '': 229 failures.append(test_failures.FailureMissingResult()) 230 else: 231 failures.append(test_failures.FailureTextMismatch()) 225 if (expected_text and actual_text and 226 # Assuming expected_text is already normalized. 227 self._port.compare_text(self._get_normalized_output_text(actual_text), expected_text)): 228 failures.append(test_failures.FailureTextMismatch()) 229 elif actual_text and not expected_text: 230 failures.append(test_failures.FailureMissingResult()) 232 231 return failures 233 232 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
r82972 r83327 353 353 354 354 def expected_text(self, test): 355 """Returns the text output we expect the test to produce. 355 """Returns the text output we expect the test to produce, or None 356 if we don't expect there to be any text output. 356 357 End-of-line characters are normalized to '\n'.""" 357 358 # FIXME: DRT output is actually utf-8, but since we don't decode the … … 360 361 path = self.expected_filename(test, '.txt') 361 362 if not self.path_exists(path): 362 return ''363 return None 363 364 text = self._filesystem.read_binary_file(path) 364 365 return text.replace("\r\n", "\n") -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r83250 r83327 426 426 return self._port._filesystem.read_binary_file(png_path) 427 427 else: 428 return ''428 return None 429 429 430 430 def _output_image_with_retry(self): … … 503 503 run_time = time.time() - start_time 504 504 output_image = self._output_image_with_retry() 505 assert output_image is not None 506 return base.DriverOutput(''.join(output), output_image, actual_checksum, 505 text = ''.join(output) 506 if not text: 507 text = None 508 509 return base.DriverOutput(text, output_image, actual_checksum, 507 510 crash, run_time, timeout, ''.join(error)) 508 511 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
r82753 r83327 410 410 actual_image_hash = None 411 411 output = str() # Use a byte array for output, even though it should be UTF-8. 412 image = str() 412 text = None 413 image = None 413 414 414 415 timeout = int(driver_input.timeout) / 1000.0 … … 429 430 line = self._server_process.read_line(timeout) 430 431 timeout = deadline - time.time() 432 433 if output: 434 text = output 431 435 432 436 # Now read a second block of text for the optional image data … … 459 463 # this reset in. 460 464 self._server_process.error = "" 461 return base.DriverOutput( output, image, actual_image_hash,465 return base.DriverOutput(text, image, actual_image_hash, 462 466 self._server_process.crashed, 463 467 time.time() - start_time,
Note: See TracChangeset
for help on using the changeset viewer.