| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Aggregates EMMA coverage files to produce html output.""" | 7 """Aggregates EMMA coverage files to produce html output.""" |
| 8 | 8 |
| 9 import fnmatch | 9 import fnmatch |
| 10 import json | 10 import json |
| 11 import optparse | 11 import optparse |
| 12 import os | 12 import os |
| 13 import sys | 13 import sys |
| 14 | 14 |
| 15 from pylib import cmd_helper | 15 from devil.utils import cmd_helper |
| 16 from pylib import constants | 16 from pylib import constants |
| 17 | 17 |
| 18 | 18 |
| 19 def _GetFilesWithExt(root_dir, ext): | 19 def _GetFilesWithExt(root_dir, ext): |
| 20 """Gets all files with a given extension. | 20 """Gets all files with a given extension. |
| 21 | 21 |
| 22 Args: | 22 Args: |
| 23 root_dir: Directory in which to search for files. | 23 root_dir: Directory in which to search for files. |
| 24 ext: Extension to look for (including dot) | 24 ext: Extension to look for (including dot) |
| 25 | 25 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 if options.cleanup: | 82 if options.cleanup: |
| 83 for f in coverage_files: | 83 for f in coverage_files: |
| 84 os.remove(f) | 84 os.remove(f) |
| 85 | 85 |
| 86 return exit_code | 86 return exit_code |
| 87 | 87 |
| 88 | 88 |
| 89 if __name__ == '__main__': | 89 if __name__ == '__main__': |
| 90 sys.exit(main()) | 90 sys.exit(main()) |
| OLD | NEW |