summaryrefslogtreecommitdiffstats
path: root/tools/auto_bisect
diff options
context:
space:
mode:
authorrobertocn <robertocn@chromium.org>2014-10-07 17:01:02 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-08 00:02:36 +0000
commit6fb2e1c69f7812e416d760aee1bdee60fb94e8da (patch)
tree1a659c6f6c7f0ce0aaca67fca0bf1d3075ae5e00 /tools/auto_bisect
parente1e5cd01ee72716dc49d3be81287977faf025caa (diff)
downloadchromium_src-6fb2e1c69f7812e416d760aee1bdee60fb94e8da.zip
chromium_src-6fb2e1c69f7812e416d760aee1bdee60fb94e8da.tar.gz
chromium_src-6fb2e1c69f7812e416d760aee1bdee60fb94e8da.tar.bz2
Using commit position instead of commit time to check revision order prior to starting bisect.
BUG=400865 Review URL: https://codereview.chromium.org/637693002 Cr-Commit-Position: refs/heads/master@{#298614}
Diffstat (limited to 'tools/auto_bisect')
-rwxr-xr-xtools/auto_bisect/bisect_perf_regression.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/tools/auto_bisect/bisect_perf_regression.py b/tools/auto_bisect/bisect_perf_regression.py
index cdea771..fab182e 100755
--- a/tools/auto_bisect/bisect_perf_regression.py
+++ b/tools/auto_bisect/bisect_perf_regression.py
@@ -2265,19 +2265,14 @@ class BisectPerformanceMetrics(object):
"""
if self.source_control.IsGit() and target_depot != 'cros':
cwd = self.depot_registry.GetDepotDir(target_depot)
-
- cmd = ['log', '--format=%ct', '-1', good_revision]
- output = bisect_utils.CheckRunGit(cmd, cwd=cwd)
- good_commit_time = int(output)
-
- cmd = ['log', '--format=%ct', '-1', bad_revision]
- output = bisect_utils.CheckRunGit(cmd, cwd=cwd)
- bad_commit_time = int(output)
-
- return good_commit_time <= bad_commit_time
+ good_position = self.source_control.GetCommitPosition(good_revision, cwd)
+ bad_position = self.source_control.GetCommitPosition(bad_revision, cwd)
else:
# CrOS and SVN use integers.
- return int(good_revision) <= int(bad_revision)
+ good_position = int(good_revision)
+ bad_position = int(bad_revision)
+
+ return good_position <= bad_position
def CanPerformBisect(self, good_revision, bad_revision):
"""Checks whether a given revision is bisectable.