| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 if options.enable_versioned_results: | 80 gen_dash_board = GenerateDashBoard(port) |
| 81 gen_dash_board = GenerateDashBoard(port) | 81 gen_dash_board.generate() |
| 82 gen_dash_board.generate() | |
| 83 | 82 |
| 84 return run_details.exit_code | 83 return run_details.exit_code |
| 85 | 84 |
| 86 # 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. |
| 87 except KeyboardInterrupt: | 86 except KeyboardInterrupt: |
| 88 return test_run_results.INTERRUPTED_EXIT_STATUS | 87 return test_run_results.INTERRUPTED_EXIT_STATUS |
| 89 except test_run_results.TestRunException as e: | 88 except test_run_results.TestRunException as e: |
| 90 print >> stderr, e.msg | 89 print >> stderr, e.msg |
| 91 return e.code | 90 return e.code |
| 92 except BaseException as e: | 91 except BaseException as e: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 "baselines (will take precendence over platform baselines). " | 127 "baselines (will take precendence over platform baselines). " |
| 129 "Specify multiple times to add multiple search path entries."), | 128 "Specify multiple times to add multiple search path entries."), |
| 130 optparse.make_option("--build-directory", | 129 optparse.make_option("--build-directory", |
| 131 help="Path to the directory under which build files are kept (should
not include configuration)"), | 130 help="Path to the directory under which build files are kept (should
not include configuration)"), |
| 132 optparse.make_option("--clobber-old-results", action="store_true", | 131 optparse.make_option("--clobber-old-results", action="store_true", |
| 133 default=False, help="Clobbers test results from previous runs."), | 132 default=False, help="Clobbers test results from previous runs."), |
| 134 optparse.make_option("--compare-port", action="store", default=None, | 133 optparse.make_option("--compare-port", action="store", default=None, |
| 135 help="Use the specified port's baselines first"), | 134 help="Use the specified port's baselines first"), |
| 136 optparse.make_option("--driver-name", type="string", | 135 optparse.make_option("--driver-name", type="string", |
| 137 help="Alternative driver binary to use"), | 136 help="Alternative driver binary to use"), |
| 138 optparse.make_option("--enable-versioned-results", action="store_true", | |
| 139 default=False, help="Archive the test results for later access."), | |
| 140 optparse.make_option("--full-results-html", action="store_true", | 137 optparse.make_option("--full-results-html", action="store_true", |
| 141 default=False, | 138 default=False, |
| 142 help="Show all failures in results.html, rather than only regression
s"), | 139 help="Show all failures in results.html, rather than only regression
s"), |
| 143 optparse.make_option("--new-baseline", action="store_true", | 140 optparse.make_option("--new-baseline", action="store_true", |
| 144 default=False, help="Save generated results as new baselines " | 141 default=False, help="Save generated results as new baselines " |
| 145 "into the *most-specific-platform* directory, overwriting whate
ver's " | 142 "into the *most-specific-platform* directory, overwriting whate
ver's " |
| 146 "already there. Equivalent to --reset-results --add-platform-ex
ceptions"), | 143 "already there. Equivalent to --reset-results --add-platform-ex
ceptions"), |
| 147 optparse.make_option("--no-new-test-results", action="store_false", | 144 optparse.make_option("--no-new-test-results", action="store_false", |
| 148 dest="new_test_results", default=True, | 145 dest="new_test_results", default=True, |
| 149 help="Don't create new baselines when no expected results exist"), | 146 help="Don't create new baselines when no expected results exist"), |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 printer.print_config(port.results_directory()) | 377 printer.print_config(port.results_directory()) |
| 381 | 378 |
| 382 run_details = manager.run(args) | 379 run_details = manager.run(args) |
| 383 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) | 380 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) |
| 384 return run_details | 381 return run_details |
| 385 finally: | 382 finally: |
| 386 printer.cleanup() | 383 printer.cleanup() |
| 387 | 384 |
| 388 if __name__ == '__main__': | 385 if __name__ == '__main__': |
| 389 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) | 386 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) |
| OLD | NEW |