OLD | NEW |
1 # coding=utf8 | 1 # coding=utf8 |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 logging | 7 import logging |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 import time | 10 import time |
11 | 11 |
12 from verification import base | 12 from verification import base # pylint: disable=F0401 |
13 | 13 |
14 import find_depot_tools # pylint: disable=W0611 | 14 import find_depot_tools # pylint: disable=W0611,F0401 |
15 import subprocess2 | 15 import subprocess2 # pylint: disable=F0401 |
16 | 16 |
17 | 17 |
18 class PresubmitCheckVerifier(base.VerifierCheckout): | 18 class PresubmitCheckVerifier(base.VerifierCheckout): |
19 name = 'presubmit' | 19 name = 'presubmit' |
20 | 20 |
21 def __init__(self, context_obj, timeout=6*60): | 21 def __init__(self, context_obj, timeout=6*60): |
22 super(PresubmitCheckVerifier, self).__init__(context_obj) | 22 super(PresubmitCheckVerifier, self).__init__(context_obj) |
23 self.root_dir = os.path.dirname(os.path.abspath(__file__)) | 23 self.root_dir = os.path.dirname(os.path.abspath(__file__)) |
24 self.execution_timeout = timeout | 24 self.execution_timeout = timeout |
25 | 25 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 pending, | 88 pending, |
89 { | 89 { |
90 'duration': duration, | 90 'duration': duration, |
91 'output': e.stdout, | 91 'output': e.stdout, |
92 'return': e.returncode, | 92 'return': e.returncode, |
93 'timed_out': timed_out, | 93 'timed_out': timed_out, |
94 }) | 94 }) |
95 | 95 |
96 def update_status(self, queue): | 96 def update_status(self, queue): |
97 pass | 97 pass |
OLD | NEW |