OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze
ged |
3 # Copyright (C) 2011 Apple Inc. All rights reserved. | 3 # Copyright (C) 2011 Apple Inc. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 22 matching lines...) Expand all Loading... |
33 import os | 33 import os |
34 import sys | 34 import sys |
35 import traceback | 35 import traceback |
36 | 36 |
37 from webkitpy.common.host import Host | 37 from webkitpy.common.host import Host |
38 from webkitpy.layout_tests.controllers.manager import Manager | 38 from webkitpy.layout_tests.controllers.manager import Manager |
39 from webkitpy.layout_tests.models import test_run_results | 39 from webkitpy.layout_tests.models import test_run_results |
40 from webkitpy.layout_tests.port import configuration_options, platform_options | 40 from webkitpy.layout_tests.port import configuration_options, platform_options |
41 from webkitpy.layout_tests.views import buildbot_results | 41 from webkitpy.layout_tests.views import buildbot_results |
42 from webkitpy.layout_tests.views import printing | 42 from webkitpy.layout_tests.views import printing |
43 from webkitpy.layout_tests.generate_results_dashboard import GenerateDashBoard | 43 from webkitpy.layout_tests.generate_results_dashboard import DashBoardGenerator |
44 | 44 |
45 _log = logging.getLogger(__name__) | 45 _log = logging.getLogger(__name__) |
46 | 46 |
47 | 47 |
48 | 48 |
49 def main(argv, stdout, stderr): | 49 def main(argv, stdout, stderr): |
50 options, args = parse_args(argv) | 50 options, args = parse_args(argv) |
51 | 51 |
52 if options.platform and 'test' in options.platform and not 'browser_test' in
options.platform: | 52 if options.platform and 'test' in options.platform and not 'browser_test' in
options.platform: |
53 # It's a bit lame to import mocks into real code, but this allows the us
er | 53 # It's a bit lame to import mocks into real code, but this allows the us
er |
(...skipping 16 matching lines...) Expand all Loading... |
70 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS | 70 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS |
71 | 71 |
72 try: | 72 try: |
73 run_details = run(port, options, args, stderr) | 73 run_details = run(port, options, args, stderr) |
74 if ((run_details.exit_code not in test_run_results.ERROR_CODES or | 74 if ((run_details.exit_code not in test_run_results.ERROR_CODES or |
75 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and | 75 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and |
76 not run_details.initial_results.keyboard_interrupted): | 76 not run_details.initial_results.keyboard_interrupted): |
77 bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug
_rwt_logging) | 77 bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug
_rwt_logging) |
78 bot_printer.print_results(run_details) | 78 bot_printer.print_results(run_details) |
79 | 79 |
80 gen_dash_board = GenerateDashBoard(port) | 80 gen_dash_board = DashBoardGenerator(port) |
81 gen_dash_board.generate() | 81 gen_dash_board.generate() |
82 | 82 |
83 return run_details.exit_code | 83 return run_details.exit_code |
84 | 84 |
85 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c
ases. | 85 # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest c
ases. |
86 except KeyboardInterrupt: | 86 except KeyboardInterrupt: |
87 return test_run_results.INTERRUPTED_EXIT_STATUS | 87 return test_run_results.INTERRUPTED_EXIT_STATUS |
88 except test_run_results.TestRunException as e: | 88 except test_run_results.TestRunException as e: |
89 print >> stderr, e.msg | 89 print >> stderr, e.msg |
90 return e.code | 90 return e.code |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 printer.print_config(port.results_directory()) | 377 printer.print_config(port.results_directory()) |
378 | 378 |
379 run_details = manager.run(args) | 379 run_details = manager.run(args) |
380 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) | 380 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) |
381 return run_details | 381 return run_details |
382 finally: | 382 finally: |
383 printer.cleanup() | 383 printer.cleanup() |
384 | 384 |
385 if __name__ == '__main__': | 385 if __name__ == '__main__': |
386 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) | 386 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) |
OLD | NEW |