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

Unified Diff: testing_support/coverage_utils.py

Issue 1150663002: Disable tests that break because of git 2.4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Replace double quotes by single quotes. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_common_test.py » ('j') | tests/git_common_test.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/coverage_utils.py
diff --git a/testing_support/coverage_utils.py b/testing_support/coverage_utils.py
index f049938b98803bf43d4b39d626fa641a3d44eb49..3cd98f5ec240bd56b9e3d2b78e76e12a9a51b845 100644
--- a/testing_support/coverage_utils.py
+++ b/testing_support/coverage_utils.py
@@ -21,7 +21,7 @@ def native_error(msg, version):
%s""") % (version, msg)
sys.exit(1)
-def covered_main(includes, require_native=None):
+def covered_main(includes, require_native=None, required_percentage=100.0):
"""Equivalent of unittest.main(), except that it gathers coverage data, and
asserts if the test is not at 100% coverage.
@@ -63,8 +63,8 @@ def covered_main(includes, require_native=None):
retcode = e.code or retcode
COVERAGE.stop()
- if COVERAGE.report() != 100.0:
- print 'FATAL: not at 100% coverage.'
+ if COVERAGE.report() < required_percentage:
+ print 'FATAL: not at required %f% coverage.' % required_percentage
retcode = 2
return retcode
« no previous file with comments | « no previous file | tests/git_common_test.py » ('j') | tests/git_common_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698