Skip to content

Commit

Permalink
Revert of Fix nits in generate_resource_whitelist.* (patchset chromium#1
Browse files Browse the repository at this point in the history
 id:1 of https://codereview.chromium.org/2968523002/ )

Reason for revert:
This appears to have broken all the chromium.perf android compile bots. https://uberchromegw.corp.google.com/i/chromium.perf/builders/Android%20Builder/builds/173655 is an example.

Original issue's description:
> Fix nits in generate_resource_whitelist.*
>
> Review-Url: https://codereview.chromium.org/2968523002
> Cr-Commit-Position: refs/heads/master@{#483477}
> Committed: https://chromium.googlesource.com/chromium/src/+/10bc4e3b570ce253ccd4be34b146719669bbedda

TBR=agrieve@chromium.org,zpeng@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2961413002
Cr-Commit-Position: refs/heads/master@{#483513}
  • Loading branch information
martiniss authored and Commit Bot committed Jun 29, 2017
1 parent af0dc05 commit f6cf756
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions tools/resources/generate_resource_whitelist.gni
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ template("generate_resource_whitelist") {
]

args = [
"--input",
"-i",
rebase_path(invoker.input, root_build_dir),
"--output",
"-o",
rebase_path(invoker.output, root_build_dir),
"--output-directory=.",
"--out-dir=.",
]
}
}
25 changes: 12 additions & 13 deletions tools/resources/generate_resource_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

__doc__ = """generate_resource_whitelist.py [-h] [--input INPUT]
[--output OUTPUT]
import argparse
import os
import re
import sys

USAGE = """generate_resource_whitelist.py [-h] [-i INPUT] [-o OUTPUT]
INPUT specifies a file containing existing resource IDs that should be
whitelisted, where each line of INPUT contains a single resource ID.
Expand All @@ -23,13 +27,8 @@
[-Wunknown-pragmas]
On Windows, the message is simply a message via __pragma(message(...)).
"""

import argparse
import os
import re
import sys
"""

COMPONENTS_STRINGS_HEADER = 'gen/components/strings/grit/components_strings.h'

Expand Down Expand Up @@ -57,16 +56,16 @@ def _FindResourceIds(header, resource_names):


def main():
parser = argparse.ArgumentParser(usage=__doc__)
parser = argparse.ArgumentParser(usage=USAGE)
parser.add_argument(
'--input', type=argparse.FileType('r'), default=sys.stdin,
'-i', '--input', type=argparse.FileType('r'), default=sys.stdin,
help='A resource whitelist where each line contains one resource ID')
parser.add_argument(
'--output', type=argparse.FileType('w'), default=sys.stdout,
'-o', '--output', type=argparse.FileType('w'), default=sys.stdout,
help='The resource list path to write (default stdout)')
parser.add_argument(
'--output-directory', required=True,
help='The output target directory, for example out/Release')
'--out-dir', required=True,
help='The out target directory, for example out/Release')

args = parser.parse_args()

Expand Down

0 comments on commit f6cf756

Please sign in to comment.