| OLD | NEW |
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 | 102 |
| 103 def tear_down_logging(logger, handler): | 103 def tear_down_logging(logger, handler): |
| 104 logger.removeHandler(handler) | 104 logger.removeHandler(handler) |
| 105 | 105 |
| 106 | 106 |
| 107 def run_checks(host, options, logging_stream): | 107 def run_checks(host, options, logging_stream): |
| 108 logger, handler = set_up_logging(logging_stream) | 108 logger, handler = set_up_logging(logging_stream) |
| 109 try: | 109 try: |
| 110 failures = [] | 110 failures = [] |
| 111 failures.extend(lint(host, options)) | 111 # failures.extend(lint(host, options)) |
| 112 failures.extend(check_virtual_test_suites(host, options)) | 112 # failures.extend(check_virtual_test_suites(host, options)) |
| 113 | 113 |
| 114 if options.json: | 114 if options.json: |
| 115 with open(options.json, 'w') as f: | 115 with open(options.json, 'w') as f: |
| 116 json.dump(failures, f) | 116 json.dump(failures, f) |
| 117 | 117 |
| 118 if failures: | 118 if failures: |
| 119 _log.error('Lint failed.') | 119 _log.error('Lint failed.') |
| 120 return 1 | 120 return 1 |
| 121 else: | 121 else: |
| 122 _log.info('Lint succeeded.') | 122 _log.info('Lint succeeded.') |
| (...skipping 19 matching lines...) Expand all Loading... |
| 142 try: | 142 try: |
| 143 exit_status = run_checks(host, options, stderr) | 143 exit_status = run_checks(host, options, stderr) |
| 144 except KeyboardInterrupt: | 144 except KeyboardInterrupt: |
| 145 exit_status = INTERRUPTED_EXIT_STATUS | 145 exit_status = INTERRUPTED_EXIT_STATUS |
| 146 except Exception as e: | 146 except Exception as e: |
| 147 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) | 147 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) |
| 148 traceback.print_exc(file=stderr) | 148 traceback.print_exc(file=stderr) |
| 149 exit_status = EXCEPTIONAL_EXIT_STATUS | 149 exit_status = EXCEPTIONAL_EXIT_STATUS |
| 150 | 150 |
| 151 return exit_status | 151 return exit_status |
| OLD | NEW |