Reverting bisect-builds.py changes, because switch is still useful for debugging older builds.

> Remove kEnablePrintPreview now that the pdf plugin is part of Chromium.
>
> R=thestig@chromium.org
>
> Review URL: https://codereview.chromium.org/296453015

NOTRY=True
BUG=395687

Review URL: https://codereview.chromium.org/395363002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284461 0039d316-1c4b-4281-b951-d872f2087c98
parent e949467d
...@@ -79,7 +79,8 @@ class PathContext(object): ...@@ -79,7 +79,8 @@ class PathContext(object):
"""A PathContext is used to carry the information used to construct URLs and """A PathContext is used to carry the information used to construct URLs and
paths when dealing with the storage server and archives.""" paths when dealing with the storage server and archives."""
def __init__(self, base_url, platform, good_revision, bad_revision, def __init__(self, base_url, platform, good_revision, bad_revision,
is_official, is_aura, use_local_repo, flash_path = None): is_official, is_aura, use_local_repo, flash_path = None,
pdf_path = None):
super(PathContext, self).__init__() super(PathContext, self).__init__()
# Store off the input parameters. # Store off the input parameters.
self.base_url = base_url self.base_url = base_url
...@@ -94,6 +95,7 @@ class PathContext(object): ...@@ -94,6 +95,7 @@ class PathContext(object):
# _FetchAndParse and used later in GetDownloadURL while downloading # _FetchAndParse and used later in GetDownloadURL while downloading
# the build. # the build.
self.githash_svn_dict = {} self.githash_svn_dict = {}
self.pdf_path = pdf_path
# The name of the ZIP file in a revision directory on the server. # The name of the ZIP file in a revision directory on the server.
self.archive_name = None self.archive_name = None
...@@ -452,7 +454,7 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args): ...@@ -452,7 +454,7 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args):
# Run the build as many times as specified. # Run the build as many times as specified.
testargs = ['--user-data-dir=%s' % profile] + args testargs = ['--user-data-dir=%s' % profile] + args
# The sandbox must be run as root on Official Chrome, so bypass it. # The sandbox must be run as root on Official Chrome, so bypass it.
if ((context.is_official or context.flash_path) and if ((context.is_official or context.flash_path or context.pdf_path) and
context.platform.startswith('linux')): context.platform.startswith('linux')):
testargs.append('--no-sandbox') testargs.append('--no-sandbox')
if context.flash_path: if context.flash_path:
...@@ -462,6 +464,11 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args): ...@@ -462,6 +464,11 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args):
# pass the correct version we just spoof it. # pass the correct version we just spoof it.
testargs.append('--ppapi-flash-version=99.9.999.999') testargs.append('--ppapi-flash-version=99.9.999.999')
# TODO(vitalybuka): Remove in the future. See crbug.com/395687.
if context.pdf_path:
shutil.copy(context.pdf_path, os.path.dirname(context.GetLaunchPath()))
testargs.append('--enable-print-preview')
runcommand = [] runcommand = []
for token in shlex.split(command): for token in shlex.split(command):
if token == "%a": if token == "%a":
...@@ -555,6 +562,7 @@ def Bisect(base_url, ...@@ -555,6 +562,7 @@ def Bisect(base_url,
try_args=(), try_args=(),
profile=None, profile=None,
flash_path=None, flash_path=None,
pdf_path=None,
interactive=True, interactive=True,
evaluate=AskIsGoodBuild): evaluate=AskIsGoodBuild):
"""Given known good and known bad revisions, run a binary search on all """Given known good and known bad revisions, run a binary search on all
...@@ -591,7 +599,8 @@ def Bisect(base_url, ...@@ -591,7 +599,8 @@ def Bisect(base_url,
profile = 'profile' profile = 'profile'
context = PathContext(base_url, platform, good_rev, bad_rev, context = PathContext(base_url, platform, good_rev, bad_rev,
official_builds, is_aura, use_local_repo, flash_path) official_builds, is_aura, use_local_repo, flash_path,
pdf_path)
cwd = os.getcwd() cwd = os.getcwd()
print "Downloading list of known revisions..." print "Downloading list of known revisions..."
...@@ -852,6 +861,12 @@ def main(): ...@@ -852,6 +861,12 @@ def main():
'binary to be used in this bisection (e.g. ' + 'binary to be used in this bisection (e.g. ' +
'on Windows C:\...\pepflashplayer.dll and on Linux ' + 'on Windows C:\...\pepflashplayer.dll and on Linux ' +
'/opt/google/chrome/PepperFlash/libpepflashplayer.so).') '/opt/google/chrome/PepperFlash/libpepflashplayer.so).')
parser.add_option('-d', '--pdf_path', type = 'str',
help = 'Absolute path to a recent PDF pluggin ' +
'binary to be used in this bisection (e.g. ' +
'on Windows C:\...\pdf.dll and on Linux ' +
'/opt/google/chrome/libpdf.so). Option also enables ' +
'print preview.')
parser.add_option('-g', '--good', type = 'str', parser.add_option('-g', '--good', type = 'str',
help = 'A good revision to start bisection. ' + help = 'A good revision to start bisection. ' +
'May be earlier or later than the bad revision. ' + 'May be earlier or later than the bad revision. ' +
...@@ -930,6 +945,11 @@ def main(): ...@@ -930,6 +945,11 @@ def main():
msg = 'Could not find Flash binary at %s' % flash_path msg = 'Could not find Flash binary at %s' % flash_path
assert os.path.exists(flash_path), msg assert os.path.exists(flash_path), msg
if opts.pdf_path:
pdf_path = opts.pdf_path
msg = 'Could not find PDF binary at %s' % pdf_path
assert os.path.exists(pdf_path), msg
if opts.official_builds: if opts.official_builds:
good_rev = LooseVersion(good_rev) good_rev = LooseVersion(good_rev)
bad_rev = LooseVersion(bad_rev) bad_rev = LooseVersion(bad_rev)
...@@ -946,7 +966,8 @@ def main(): ...@@ -946,7 +966,8 @@ def main():
(min_chromium_rev, max_chromium_rev) = Bisect( (min_chromium_rev, max_chromium_rev) = Bisect(
base_url, opts.archive, opts.official_builds, opts.aura, base_url, opts.archive, opts.official_builds, opts.aura,
opts.use_local_repo, good_rev, bad_rev, opts.times, opts.command, opts.use_local_repo, good_rev, bad_rev, opts.times, opts.command,
args, opts.profile, opts.flash_path, not opts.not_interactive) args, opts.profile, opts.flash_path, opts.pdf_path,
not opts.not_interactive)
# Get corresponding blink revisions. # Get corresponding blink revisions.
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment