Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 except BaseException as e: | 77 except BaseException as e: |
| 78 if isinstance(e, Exception): | 78 if isinstance(e, Exception): |
| 79 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) | 79 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) |
| 80 traceback.print_exc(file=stderr) | 80 traceback.print_exc(file=stderr) |
| 81 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS | 81 return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS |
| 82 | 82 |
| 83 | 83 |
| 84 def parse_args(args): | 84 def parse_args(args): |
| 85 option_group_definitions = [] | 85 option_group_definitions = [] |
| 86 | 86 |
| 87 # Internal / hidden options which shouldn't be used by users. | |
| 88 option_group_definitions.append( | |
| 89 ("Internal / Hidden Options", [ | |
| 90 optparse.make_option( | |
| 91 "--dummy-arg", | |
| 92 action="append", | |
| 93 default=[], | |
| 94 help=optparse.SUPPRESS_HELP), | |
| 95 ])) | |
|
Dirk Pranke
2016/06/21 21:57:54
Don't add stuff to the main code just for testing
| |
| 96 | |
| 87 option_group_definitions.append( | 97 option_group_definitions.append( |
| 88 ("Platform options", platform_options())) | 98 ("Platform options", platform_options())) |
| 89 | 99 |
| 90 option_group_definitions.append( | 100 option_group_definitions.append( |
| 91 ("Configuration options", configuration_options())) | 101 ("Configuration options", configuration_options())) |
| 92 | 102 |
| 93 option_group_definitions.append( | 103 option_group_definitions.append( |
| 94 ("Printing Options", printing.print_options())) | 104 ("Printing Options", printing.print_options())) |
| 95 | 105 |
| 96 option_group_definitions.append( | 106 option_group_definitions.append( |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 _log.debug("\t%s" % process) | 586 _log.debug("\t%s" % process) |
| 577 | 587 |
| 578 return run_details | 588 return run_details |
| 579 | 589 |
| 580 finally: | 590 finally: |
| 581 printer.cleanup() | 591 printer.cleanup() |
| 582 | 592 |
| 583 if __name__ == '__main__': | 593 if __name__ == '__main__': |
| 584 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) | 594 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) |
| 585 sys.exit(exit_code) | 595 sys.exit(exit_code) |
| OLD | NEW |