| OLD | NEW |
| 1 # coding=utf8 | 1 # coding=utf8 |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 """Runs presubmit check on the source tree.""" | 5 """Runs presubmit check on the source tree.""" |
| 6 | 6 |
| 7 import find_depot_tools # pylint: disable=W0611 | 7 import find_depot_tools # pylint: disable=W0611 |
| 8 import presubmit_support | 8 import presubmit_support |
| 9 | 9 |
| 10 import model | 10 import model |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class PresubmitCheckVerifier(base.Verifier): | 30 class PresubmitCheckVerifier(base.Verifier): |
| 31 name = 'presubmit' | 31 name = 'presubmit' |
| 32 | 32 |
| 33 def verify(self, pending, revision): | 33 def verify(self, pending, revision): |
| 34 """Runs the presubmit script synchronously.""" | 34 """Runs the presubmit script synchronously.""" |
| 35 stat = pending.verifications.setdefault(self.name, PresubmitStatus()) | 35 stat = pending.verifications.setdefault(self.name, PresubmitStatus()) |
| 36 # This one runs synchronously for now. | 36 # This one runs synchronously for now. |
| 37 cmd = [ | 37 cmd = [ |
| 38 '--commit', | 38 '--commit', |
| 39 '--issue', pending.issue, | 39 '--issue', str(pending.issue), |
| 40 '--patchset', pending.patchset, | 40 '--patchset', str(pending.patchset), |
| 41 '--name', pending.pending_name(), | 41 '--name', pending.pending_name(), |
| 42 '--description', pending.description, | 42 '--description', pending.description, |
| 43 ] | 43 ] |
| 44 stat.state = presubmit_support.Main(cmd) | 44 stat.state = not presubmit_support.Main(cmd) |
| 45 | 45 |
| 46 def update_status(self, queue): | 46 def update_status(self, queue): |
| 47 pass | 47 pass |
| OLD | NEW |