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

Unified Diff: scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py

Issue 2469503002: Setting a maximum number of test runs per revision. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py
diff --git a/scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py b/scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py
index d06a8ac7880345e86c325e548dac24b26d42965d..56ee11933e46999c81b72631f6a658a852a17bf6 100644
--- a/scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py
+++ b/scripts/slave/recipe_modules/auto_bisect_staging/revision_state.py
@@ -25,6 +25,8 @@ from . import bisect_exceptions
# These relate to how to increase the number of repetitions during re-test
MINIMUM_SAMPLE_SIZE = 5
INCREASE_FACTOR = 1.5
+# If after testing a revision this many times it cannot be classified, fail.
+MAX_TESTS_PER_REVISION = 20
NOT_SIGNIFICANTLY_DIFFERENT = 'NOT_SIGNIFICANTLY_DIFFERENT'
SIGNIFICANTLY_DIFFERENT = 'SIGNIFICANTLY_DIFFERENT'
@@ -459,6 +461,10 @@ class RevisionState(object):
self.good = True
return True
# NEED_MORE_DATA
+ if self.test_run_count > MAX_TESTS_PER_REVISION:
+ raise bisect_exceptions.UntestableRevisionException(
+ 'Not enough data after testing %s %d times' % (
+ self.revision_string(), self.test_run_count))
return False

Powered by Google App Engine
This is Rietveld 408576698