OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import distutils.version | 5 import distutils.version |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 import textwrap | 8 import textwrap |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 COVERAGE.start() | 57 COVERAGE.start() |
58 | 58 |
59 retcode = 0 | 59 retcode = 0 |
60 try: | 60 try: |
61 unittest.main() | 61 unittest.main() |
62 except SystemExit as e: | 62 except SystemExit as e: |
63 retcode = e.code or retcode | 63 retcode = e.code or retcode |
64 | 64 |
65 COVERAGE.stop() | 65 COVERAGE.stop() |
66 if COVERAGE.report() < required_percentage: | 66 if COVERAGE.report() < required_percentage: |
67 print 'FATAL: not at required %f% coverage.' % required_percentage | 67 print 'FATAL: not at required %f%% coverage.' % required_percentage |
68 retcode = 2 | 68 retcode = 2 |
69 | 69 |
70 return retcode | 70 return retcode |
OLD | NEW |