| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 for port_to_lint in ports_to_lint: | 58 for port_to_lint in ports_to_lint: |
| 59 expectations_dict = port_to_lint.expectations_dict() | 59 expectations_dict = port_to_lint.expectations_dict() |
| 60 | 60 |
| 61 for expectations_file in expectations_dict.keys(): | 61 for expectations_file in expectations_dict.keys(): |
| 62 if expectations_file in files_linted: | 62 if expectations_file in files_linted: |
| 63 continue | 63 continue |
| 64 | 64 |
| 65 try: | 65 try: |
| 66 test_expectations.TestExpectations(port_to_lint, | 66 test_expectations.TestExpectations(port_to_lint, |
| 67 expectations_dict={expectations_file: expectations_dict[expe
ctations_file]}, | 67 expectations_dict={expectatio
ns_file: expectations_dict[expectations_file]}, |
| 68 is_lint_mode=True) | 68 is_lint_mode=True) |
| 69 except test_expectations.ParseError as e: | 69 except test_expectations.ParseError as e: |
| 70 lint_failed = True | 70 lint_failed = True |
| 71 _log.error('') | 71 _log.error('') |
| 72 for warning in e.warnings: | 72 for warning in e.warnings: |
| 73 _log.error(warning) | 73 _log.error(warning) |
| 74 _log.error('') | 74 _log.error('') |
| 75 files_linted.add(expectations_file) | 75 files_linted.add(expectations_file) |
| 76 return lint_failed | 76 return lint_failed |
| 77 | 77 |
| 78 | 78 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 try: | 137 try: |
| 138 exit_status = run_checks(host, options, stderr) | 138 exit_status = run_checks(host, options, stderr) |
| 139 except KeyboardInterrupt: | 139 except KeyboardInterrupt: |
| 140 exit_status = INTERRUPTED_EXIT_STATUS | 140 exit_status = INTERRUPTED_EXIT_STATUS |
| 141 except Exception as e: | 141 except Exception as e: |
| 142 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) | 142 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) |
| 143 traceback.print_exc(file=stderr) | 143 traceback.print_exc(file=stderr) |
| 144 exit_status = EXCEPTIONAL_EXIT_STATUS | 144 exit_status = EXCEPTIONAL_EXIT_STATUS |
| 145 | 145 |
| 146 return exit_status | 146 return exit_status |
| OLD | NEW |