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 logging.info('Skipping browser_tests from running') |
| 655 continue |
651 self.tests += [os.path.join(self.directory, testname)] | 656 self.tests += [os.path.join(self.directory, testname)] |
652 if gtest_filter: | 657 if gtest_filter: |
653 self.test_filters[testname] = gtest_filter | 658 self.test_filters[testname] = gtest_filter |
654 | 659 |
655 # Add 'src/test/functional/pyauto_functional.py' to self.tests. | 660 # Add 'src/test/functional/pyauto_functional.py' to self.tests. |
656 # This file with '-v --suite=CODE_COVERAGE' arguments runs all pyauto tests. | 661 # This file with '-v --suite=CODE_COVERAGE' arguments runs all pyauto tests. |
657 # Pyauto tests are failing randomly on coverage bots. So excluding them. | 662 # Pyauto tests are failing randomly on coverage bots. So excluding them. |
658 # self.tests += [['src/chrome/test/functional/pyauto_functional.py', | 663 # self.tests += [['src/chrome/test/functional/pyauto_functional.py', |
659 # '-v', | 664 # '-v', |
660 # '--suite=CODE_COVERAGE']] | 665 # '--suite=CODE_COVERAGE']] |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 if options.trim: | 1167 if options.trim: |
1163 coverage.TrimTests() | 1168 coverage.TrimTests() |
1164 coverage.RunTests() | 1169 coverage.RunTests() |
1165 if options.genhtml: | 1170 if options.genhtml: |
1166 coverage.GenerateHtml() | 1171 coverage.GenerateHtml() |
1167 return 0 | 1172 return 0 |
1168 | 1173 |
1169 | 1174 |
1170 if __name__ == '__main__': | 1175 if __name__ == '__main__': |
1171 sys.exit(main()) | 1176 sys.exit(main()) |
OLD | NEW |