| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Top-level presubmit script for depot tools. | 5 """Top-level presubmit script for depot tools. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for |
| 8 details on the presubmit API built into gcl. | 8 details on the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 print('Running %s' % test) | 57 print('Running %s' % test) |
| 58 proc = input_api.subprocess.Popen( | 58 proc = input_api.subprocess.Popen( |
| 59 [input_api.os_path.join(test_path, test)], | 59 [input_api.os_path.join(test_path, test)], |
| 60 cwd=test_path, | 60 cwd=test_path, |
| 61 stdout=stdout, | 61 stdout=stdout, |
| 62 stderr=stderr) | 62 stderr=stderr) |
| 63 proc.communicate() | 63 proc.communicate() |
| 64 if proc.returncode != 0: | 64 if proc.returncode != 0: |
| 65 output.append(output_api.PresubmitError('%s failed' % test)) | 65 output.append(output_api.PresubmitError('%s failed' % test)) |
| 66 except setup_mock.Failure, e: | 66 except local_rietveld.Failure, e: |
| 67 output.append(output_api.PresubmitError('\n'.join(str(i) for i in e.args))) | 67 output.append(output_api.PresubmitError('\n'.join(str(i) for i in e.args))) |
| 68 finally: | 68 finally: |
| 69 server.stop_server() | 69 server.stop_server() |
| 70 return output | 70 return output |
| OLD | NEW |