diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 05:08:51 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 05:08:51 +0000 |
commit | 4600b62e7fa81e326513f5fe581868721022c976 (patch) | |
tree | 9126c6f5d59c3cab8af61f45e1a3a16a715091f0 /tools/bisect-builds.py | |
parent | 87518c38642407ef9c553ccba0b37a844ab3e2ba (diff) | |
download | chromium_src-4600b62e7fa81e326513f5fe581868721022c976.zip chromium_src-4600b62e7fa81e326513f5fe581868721022c976.tar.gz chromium_src-4600b62e7fa81e326513f5fe581868721022c976.tar.bz2 |
Added --pdf-path flag to enable bisecting pdf or print preview issues with Chromium.
Review URL: https://codereview.chromium.org/127103004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/bisect-builds.py')
-rwxr-xr-x | tools/bisect-builds.py | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py index 00128fb..b008f7d 100755 --- a/tools/bisect-builds.py +++ b/tools/bisect-builds.py @@ -62,7 +62,7 @@ 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.""" def __init__(self, base_url, platform, good_revision, bad_revision, - is_official, is_aura, flash_path = None): + is_official, is_aura, flash_path = None, pdf_path = None): super(PathContext, self).__init__() # Store off the input parameters. self.base_url = base_url @@ -72,6 +72,7 @@ class PathContext(object): self.is_official = is_official self.is_aura = is_aura self.flash_path = flash_path + self.pdf_path = pdf_path # The name of the ZIP file in a revision directory on the server. self.archive_name = None @@ -362,7 +363,7 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args): # Run the build as many times as specified. testargs = ['--user-data-dir=%s' % profile] + args # 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')): testargs.append('--no-sandbox') if context.flash_path: @@ -372,6 +373,10 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args): # pass the correct version we just spoof it. testargs.append('--ppapi-flash-version=99.9.999.999') + if context.pdf_path: + shutil.copy(context.pdf_path, os.path.dirname(context.GetLaunchPath())) + testargs.append('--enable-print-preview') + runcommand = [] for token in shlex.split(command): if token == "%a": @@ -459,6 +464,7 @@ def Bisect(base_url, try_args=(), profile=None, flash_path=None, + pdf_path=None, evaluate=AskIsGoodBuild): """Given known good and known bad revisions, run a binary search on all archived revisions to determine the last known good revision. @@ -492,7 +498,7 @@ def Bisect(base_url, profile = 'profile' context = PathContext(base_url, platform, good_rev, bad_rev, - official_builds, is_aura, flash_path) + official_builds, is_aura, flash_path, pdf_path) cwd = os.getcwd() print "Downloading list of known revisions..." @@ -733,6 +739,12 @@ def main(): 'binary to be used in this bisection (e.g. ' + 'on Windows C:\...\pepflashplayer.dll and on Linux ' + '/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', help = 'A good revision to start bisection. ' + 'May be earlier or later than the bad revision. ' + @@ -800,6 +812,11 @@ def main(): msg = 'Could not find Flash binary at %s' % flash_path 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: good_rev = LooseVersion(good_rev) bad_rev = LooseVersion(bad_rev) @@ -815,7 +832,8 @@ def main(): (min_chromium_rev, max_chromium_rev) = Bisect( base_url, opts.archive, opts.official_builds, opts.aura, good_rev, - bad_rev, opts.times, opts.command, args, opts.profile, opts.flash_path) + bad_rev, opts.times, opts.command, args, opts.profile, opts.flash_path, + opts.pdf_path) # Get corresponding blink revisions. try: |