Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: tools/code_coverage/coverage_posix.py

Issue 10533095: Added pyautolib (dependency to run pyauto tests) to coverage_build target. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 sys.exit(1) 476 sys.exit(1)
477 477
478 # If told explicit tests, run those (after stripping the name as 478 # If told explicit tests, run those (after stripping the name as
479 # appropriate) 479 # appropriate)
480 for testname in all_testnames: 480 for testname in all_testnames:
481 mo = re.search(r"(.*)\[(.*)\]$", testname) 481 mo = re.search(r"(.*)\[(.*)\]$", testname)
482 gtest_filter = None 482 gtest_filter = None
483 if mo: 483 if mo:
484 gtest_filter = mo.group(2) 484 gtest_filter = mo.group(2)
485 testname = mo.group(1) 485 testname = mo.group(1)
486
487 if ':' in testname: 486 if ':' in testname:
488 testname = testname.split(':')[1] 487 testname = testname.split(':')[1]
488 # We need 'pyautolib' to run pyauto tests and 'pyautolib' itself is not an
489 # executable. So skip this test from adding into coverage_bundles.py.
490 if testname == 'pyautolib':
491 continue
489 self.tests += [os.path.join(self.directory, testname)] 492 self.tests += [os.path.join(self.directory, testname)]
490 if gtest_filter: 493 if gtest_filter:
491 self.test_filters[testname] = gtest_filter 494 self.test_filters[testname] = gtest_filter
492 495
493 # Add 'src/test/functional/pyauto_functional.py' to self.tests. 496 # Add 'src/test/functional/pyauto_functional.py' to self.tests.
494 # This file with '-v --suite=CONTINUOUS' arguments runs all pyauto tests. 497 # This file with '-v --suite=CONTINUOUS' arguments runs all pyauto tests.
495 self.tests += [['src/chrome/test/functional/pyauto_functional.py', 498 self.tests += [['src/chrome/test/functional/pyauto_functional.py',
496 '-v', 499 '-v',
497 '--suite=CONTINUOUS']] 500 '--suite=CONTINUOUS']]
498 501
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 if options.trim: 982 if options.trim:
980 coverage.TrimTests() 983 coverage.TrimTests()
981 coverage.RunTests() 984 coverage.RunTests()
982 if options.genhtml: 985 if options.genhtml:
983 coverage.GenerateHtml() 986 coverage.GenerateHtml()
984 return 0 987 return 0
985 988
986 989
987 if __name__ == '__main__': 990 if __name__ == '__main__':
988 sys.exit(main()) 991 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698