summaryrefslogtreecommitdiffstats
path: root/tools/bisect-builds.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bisect-builds.py')
-rwxr-xr-xtools/bisect-builds.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py
index a4a3f75..6a4d09d 100755
--- a/tools/bisect-builds.py
+++ b/tools/bisect-builds.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -45,6 +45,7 @@ import urllib
from xml.etree import ElementTree
import zipfile
+
class PathContext(object):
"""A PathContext is used to carry the information used to construct URLs and
paths when dealing with the storage server and archives."""
@@ -267,6 +268,7 @@ def RunRevision(context, revision, zipfile, profile, args):
return (subproc.returncode, stdout, stderr)
+
def AskIsGoodBuild(rev, status, stdout, stderr):
"""Ask the user whether build |rev| is good or bad."""
# Loop until we get a response that we can parse.
@@ -277,6 +279,7 @@ def AskIsGoodBuild(rev, status, stdout, stderr):
if response and response == 'q':
raise SystemExit()
+
def Bisect(platform,
good_rev=0,
bad_rev=0,
@@ -534,5 +537,6 @@ def main():
print 'Built at revision:'
print BUILD_VIEWVC_URL % first_known_bad_rev
+
if __name__ == '__main__':
sys.exit(main())