OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 | 5 |
6 """Generate and process code coverage. | 6 """Generate and process code coverage. |
7 | 7 |
8 TODO(jrg): rename this from coverage_posix.py to coverage_all.py! | 8 TODO(jrg): rename this from coverage_posix.py to coverage_all.py! |
9 | 9 |
10 Written for and tested on Mac, Linux, and Windows. To use this script | 10 Written for and tested on Mac, Linux, and Windows. To use this script |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
641 gtest_filter = None | 641 gtest_filter = None |
642 if mo: | 642 if mo: |
643 gtest_filter = mo.group(2) | 643 gtest_filter = mo.group(2) |
644 testname = mo.group(1) | 644 testname = mo.group(1) |
645 if ':' in testname: | 645 if ':' in testname: |
646 testname = testname.split(':')[1] | 646 testname = testname.split(':')[1] |
647 # We need 'pyautolib' to run pyauto tests and 'pyautolib' itself is not an | 647 # We need 'pyautolib' to run pyauto tests and 'pyautolib' itself is not an |
648 # executable. So skip this test from adding into coverage_bundles.py. | 648 # executable. So skip this test from adding into coverage_bundles.py. |
649 if testname == 'pyautolib': | 649 if testname == 'pyautolib': |
650 continue | 650 continue |
651 # Random tests are failing in browser_tests. Disabling it for now. | |
652 # crbug.com/159748 | |
653 if testname == 'browser_tests' and self.options.bundles: | |
654 continue | |
John Grabowski
2012/11/09 18:47:54
Add a logging.info() call here to make debugging e
pshenoy
2012/11/09 19:00:48
Done.
| |
651 self.tests += [os.path.join(self.directory, testname)] | 655 self.tests += [os.path.join(self.directory, testname)] |
652 if gtest_filter: | 656 if gtest_filter: |
653 self.test_filters[testname] = gtest_filter | 657 self.test_filters[testname] = gtest_filter |
654 | 658 |
655 # Add 'src/test/functional/pyauto_functional.py' to self.tests. | 659 # Add 'src/test/functional/pyauto_functional.py' to self.tests. |
656 # This file with '-v --suite=CODE_COVERAGE' arguments runs all pyauto tests. | 660 # This file with '-v --suite=CODE_COVERAGE' arguments runs all pyauto tests. |
657 # Pyauto tests are failing randomly on coverage bots. So excluding them. | 661 # Pyauto tests are failing randomly on coverage bots. So excluding them. |
658 # self.tests += [['src/chrome/test/functional/pyauto_functional.py', | 662 # self.tests += [['src/chrome/test/functional/pyauto_functional.py', |
659 # '-v', | 663 # '-v', |
660 # '--suite=CODE_COVERAGE']] | 664 # '--suite=CODE_COVERAGE']] |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1162 if options.trim: | 1166 if options.trim: |
1163 coverage.TrimTests() | 1167 coverage.TrimTests() |
1164 coverage.RunTests() | 1168 coverage.RunTests() |
1165 if options.genhtml: | 1169 if options.genhtml: |
1166 coverage.GenerateHtml() | 1170 coverage.GenerateHtml() |
1167 return 0 | 1171 return 0 |
1168 | 1172 |
1169 | 1173 |
1170 if __name__ == '__main__': | 1174 if __name__ == '__main__': |
1171 sys.exit(main()) | 1175 sys.exit(main()) |
OLD | NEW |