Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py

Issue 2800853003: webkitpy: Unify the exit status codes. (Closed)
Patch Set: webkitpy: Unify the exit status codes. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 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 11 matching lines...) Expand all
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 import base64 29 import base64
30 import time 30 import time
31 31
32 from webkitpy.common import exit_codes
32 from webkitpy.common.system.crash_logs import CrashLogs 33 from webkitpy.common.system.crash_logs import CrashLogs
33 from webkitpy.layout_tests.models import test_run_results 34 from webkitpy.layout_tests.models import test_run_results
34 from webkitpy.layout_tests.models.test_configuration import TestConfiguration 35 from webkitpy.layout_tests.models.test_configuration import TestConfiguration
35 from webkitpy.layout_tests.port.base import Port, VirtualTestSuite 36 from webkitpy.layout_tests.port.base import Port, VirtualTestSuite
36 from webkitpy.layout_tests.port.driver import DeviceFailure, Driver, DriverOutpu t 37 from webkitpy.layout_tests.port.driver import DeviceFailure, Driver, DriverOutpu t
37 38
38 39
39 # Here we use a non-standard location for the layout tests, to ensure that 40 # Here we use a non-standard location for the layout tests, to ensure that
40 # this works. The path contains a '.' in the name because we've seen bugs 41 # this works. The path contains a '.' in the name because we've seen bugs
41 # related to this before. 42 # related to this before.
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 433
433 def _path_to_driver(self): 434 def _path_to_driver(self):
434 # This routine shouldn't normally be called, but it is called by 435 # This routine shouldn't normally be called, but it is called by
435 # the mock_drt Driver. We return something, but make sure it's useless. 436 # the mock_drt Driver. We return something, but make sure it's useless.
436 return 'MOCK _path_to_driver' 437 return 'MOCK _path_to_driver'
437 438
438 def default_child_processes(self): 439 def default_child_processes(self):
439 return 1 440 return 1
440 441
441 def check_build(self, needs_http, printer): 442 def check_build(self, needs_http, printer):
442 return test_run_results.OK_EXIT_STATUS 443 return exit_codes.OK_EXIT_STATUS
443 444
444 def check_sys_deps(self, needs_http): 445 def check_sys_deps(self, needs_http):
445 return test_run_results.OK_EXIT_STATUS 446 return exit_codes.OK_EXIT_STATUS
446 447
447 def default_configuration(self): 448 def default_configuration(self):
448 return 'Release' 449 return 'Release'
449 450
450 def diff_image(self, expected_contents, actual_contents): 451 def diff_image(self, expected_contents, actual_contents):
451 diffed = actual_contents != expected_contents 452 diffed = actual_contents != expected_contents
452 if not actual_contents and not expected_contents: 453 if not actual_contents and not expected_contents:
453 return (None, None) 454 return (None, None)
454 if not actual_contents or not expected_contents: 455 if not actual_contents or not expected_contents:
455 return (True, None) 456 return (True, None)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 else: 630 else:
630 image = test.actual_image 631 image = test.actual_image
631 return DriverOutput(actual_text, image, test.actual_checksum, audio, 632 return DriverOutput(actual_text, image, test.actual_checksum, audio,
632 crash=(crash or web_process_crash), crashed_process_ name=crashed_process_name, 633 crash=(crash or web_process_crash), crashed_process_ name=crashed_process_name,
633 crashed_pid=crashed_pid, crash_log=crash_log, 634 crashed_pid=crashed_pid, crash_log=crash_log,
634 test_time=time.time() - start_time, timeout=test.tim eout, error=test.error, pid=self.pid, 635 test_time=time.time() - start_time, timeout=test.tim eout, error=test.error, pid=self.pid,
635 leak=test.leak) 636 leak=test.leak)
636 637
637 def stop(self): 638 def stop(self):
638 self.started = False 639 self.started = False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698