summaryrefslogtreecommitdiffstats
path: root/tools/auto_bisect
diff options
context:
space:
mode:
authorbcwhite <bcwhite@chromium.org>2015-06-02 11:16:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 18:18:22 +0000
commit500be8ebfa734283910df8c30de133a219296601 (patch)
tree6548ecdb9ac81d27d13955dd948a4dbdf9a82b70 /tools/auto_bisect
parent2f57deed6e93f42838c6d2ebadce9b2ea28f00fe (diff)
downloadchromium_src-500be8ebfa734283910df8c30de133a219296601.zip
chromium_src-500be8ebfa734283910df8c30de133a219296601.tar.gz
chromium_src-500be8ebfa734283910df8c30de133a219296601.tar.bz2
Fix confidence check and problems with successive builds due to symlinks.
Set a parameter when checking "found" confidence so that it won't abort with only two attempts yet made. Also, switching versions can leave behind symlinks that will break the next build so remove all symlinks when switching. BUG= Review URL: https://codereview.chromium.org/1156963003 Cr-Commit-Position: refs/heads/master@{#332434}
Diffstat (limited to 'tools/auto_bisect')
-rwxr-xr-xtools/auto_bisect/bisect_perf_regression.py15
-rw-r--r--tools/auto_bisect/bisect_utils.py6
2 files changed, 17 insertions, 4 deletions
diff --git a/tools/auto_bisect/bisect_perf_regression.py b/tools/auto_bisect/bisect_perf_regression.py
index 68cd633..164e5b4 100755
--- a/tools/auto_bisect/bisect_perf_regression.py
+++ b/tools/auto_bisect/bisect_perf_regression.py
@@ -503,7 +503,8 @@ def _CheckRegressionConfidenceError(
confidence_params.append(averages)
else:
confidence_params.append(l)
- regression_confidence = BisectResults.ConfidenceScore(*confidence_params)
+ regression_confidence = BisectResults.ConfidenceScore(
+ *confidence_params, accept_single_bad_or_good=True)
if regression_confidence < REGRESSION_CONFIDENCE:
error = REGRESSION_CONFIDENCE_ERROR_TEMPLATE.format(
good_rev=good_revision,
@@ -1218,6 +1219,18 @@ class BisectPerformanceMetrics(object):
"""
if self.opts.debug_ignore_build:
return True
+ # Some "runhooks" calls create symlinks that other (older?) versions
+ # do not handle correctly causing the build to fail. We want to avoid
+ # clearing the entire out/ directory so that changes close together will
+ # build faster so we just clear out all symlinks on the expectation that
+ # the next "runhooks" call will recreate everything properly. Ignore
+ # failures (like Windows that doesn't have "find").
+ try:
+ bisect_utils.RunProcess(
+ ['find', 'out/', '-type', 'l', '-exec', 'rm', '-f', '{}', ';'],
+ cwd=self.src_cwd, shell=False)
+ except OSError:
+ pass
return not bisect_utils.RunGClient(['runhooks'], cwd=self.src_cwd)
def _IsBisectModeUsingMetric(self):
diff --git a/tools/auto_bisect/bisect_utils.py b/tools/auto_bisect/bisect_utils.py
index 0d7f506..82fc93f 100644
--- a/tools/auto_bisect/bisect_utils.py
+++ b/tools/auto_bisect/bisect_utils.py
@@ -475,7 +475,7 @@ def CreateBisectDirectoryAndSetupDepot(opts, custom_deps):
raise RuntimeError('Failed to grab source.')
-def RunProcess(command):
+def RunProcess(command, cwd=None, shell=False):
"""Runs an arbitrary command.
If output from the call is needed, use RunProcessAndRetrieveOutput instead.
@@ -487,8 +487,8 @@ def RunProcess(command):
The return code of the call.
"""
# On Windows, use shell=True to get PATH interpretation.
- shell = IsWindowsHost()
- return subprocess.call(command, shell=shell)
+ shell = shell or IsWindowsHost()
+ return subprocess.call(command, cwd=cwd, shell=shell)
def RunProcessAndRetrieveOutput(command, cwd=None):