OLD | NEW |
1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 has_stderr = reference_driver_output.has_stderr() or actual_driver_outpu
t.has_stderr() | 451 has_stderr = reference_driver_output.has_stderr() or actual_driver_outpu
t.has_stderr() |
452 failures = [] | 452 failures = [] |
453 failures.extend(self._handle_error(actual_driver_output)) | 453 failures.extend(self._handle_error(actual_driver_output)) |
454 if failures: | 454 if failures: |
455 # Don't continue any more if we already have crash or timeout. | 455 # Don't continue any more if we already have crash or timeout. |
456 return TestResult(self._test_name, failures, 0, has_stderr) | 456 return TestResult(self._test_name, failures, 0, has_stderr) |
457 failures.extend(self._handle_error(reference_driver_output, reference_fi
lename=reference_filename)) | 457 failures.extend(self._handle_error(reference_driver_output, reference_fi
lename=reference_filename)) |
458 if failures: | 458 if failures: |
459 return TestResult(self._test_name, failures, 0, has_stderr, pid=actu
al_driver_output.pid) | 459 return TestResult(self._test_name, failures, 0, has_stderr, pid=actu
al_driver_output.pid) |
460 | 460 |
461 if not reference_driver_output.image_hash and not actual_driver_output.i
mage_hash: | 461 if not actual_driver_output.image_hash: |
462 failures.append(test_failures.FailureReftestNoImagesGenerated(refere
nce_filename)) | 462 failures.append(test_failures.FailureReftestNoImageGenerated(referen
ce_filename)) |
| 463 elif not reference_driver_output.image_hash: |
| 464 failures.append(test_failures.FailureReftestNoReferenceImageGenerate
d(reference_filename)) |
463 elif mismatch: | 465 elif mismatch: |
464 if reference_driver_output.image_hash == actual_driver_output.image_
hash: | 466 if reference_driver_output.image_hash == actual_driver_output.image_
hash: |
465 failures.append(test_failures.FailureReftestMismatchDidNotOccur(
reference_filename)) | 467 failures.append(test_failures.FailureReftestMismatchDidNotOccur(
reference_filename)) |
466 elif reference_driver_output.image_hash != actual_driver_output.image_ha
sh: | 468 elif reference_driver_output.image_hash != actual_driver_output.image_ha
sh: |
467 diff, err_str = self._port.diff_image(reference_driver_output.image,
actual_driver_output.image) | 469 diff, err_str = self._port.diff_image(reference_driver_output.image,
actual_driver_output.image) |
468 if diff: | 470 if diff: |
469 failures.append(test_failures.FailureReftestMismatch(reference_f
ilename)) | 471 failures.append(test_failures.FailureReftestMismatch(reference_f
ilename)) |
470 elif err_str: | 472 elif err_str: |
471 _log.error(err_str) | 473 _log.error(err_str) |
472 else: | 474 else: |
473 _log.warning(" %s -> ref test hashes didn't match but diff pass
ed", self._test_name) | 475 _log.warning(" %s -> ref test hashes didn't match but diff pass
ed", self._test_name) |
474 | 476 |
475 return TestResult(self._test_name, failures, 0, has_stderr, pid=actual_d
river_output.pid) | 477 return TestResult(self._test_name, failures, 0, has_stderr, pid=actual_d
river_output.pid) |
OLD | NEW |