diff options
author | Rico Wind <ricow@google.com> | 2021-03-19 13:31:16 +0100 |
---|---|---|
committer | Rico Wind <ricow@google.com> | 2021-06-02 05:41:05 +0000 |
commit | 579ccbf712ddffe67f98f8fe1d66803bd27f968c (patch) | |
tree | 302ec1cb6723ddb98213aa4f954b2a19f24a908a | |
parent | e56a240cabdd531eb8c0f0e2dc24f12174ac0192 (diff) | |
download | r8-upstream-mirror.tar.gz |
Use camelcase for dart variablesupstream-mirror
Only make one variable for openjdk
Bug: 173189095
Change-Id: I79d6642e69ff26abb265cb750317f53093b10162
-rwxr-xr-x | tools/run_on_app_dump.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/run_on_app_dump.py b/tools/run_on_app_dump.py index cc22a3b47..1d2edf547 100755 --- a/tools/run_on_app_dump.py +++ b/tools/run_on_app_dump.py @@ -1002,6 +1002,7 @@ def print_golem_config(options): jdk_gz = jdk.GetJdkHome() + '.tar.gz' download_sha(jdk_gz + '.sha1', False, quiet=True) jdk_sha256 = get_sha256(jdk_gz) + add_golem_resource(2, jdk_gz, 'openjdk', sha256=jdk_sha256) for app in options.apps: if app.folder and not app.internal: indentation = 2; @@ -1022,9 +1023,10 @@ def print_golem_config(options): print_indented('"--golem --shrinker r8 --app %s";' % app.name, indentation + 4) app_gz = os.path.join(utils.OPENSOURCE_DUMPS_DIR, app.folder + '.tar.gz') - add_golem_resource(indentation, app_gz, 'app_resource') - add_golem_resource(indentation, jdk_gz, 'openjdk', sha256=jdk_sha256) - + name = 'appResource' + add_golem_resource(indentation, app_gz, name) + print_indented('options.resources.add(appResource);', indentation) + print_indented('options.resources.add(openjdk);', indentation) print_indented('dumpsSuite.addBenchmark(name);', indentation) indentation = 2 print_indented('}', indentation) @@ -1040,10 +1042,13 @@ def add_golem_resource(indentation, gz, name, sha256=None): print_indented('final %s = BenchmarkResource("",' % name, indentation) print_indented('type: BenchmarkResourceType.Storage,', indentation + 4) print_indented('uri: "gs://r8-deps/%s",' % sha, indentation + 4) - print_indented('hash:', indentation + 4) - print_indented('"%s",' % sha256, indentation + 8) + # Make dart formatter happy. + if indentation > 2: + print_indented('hash:', indentation + 4) + print_indented('"%s",' % sha256, indentation + 8) + else: + print_indented('hash: "%s",' % sha256, indentation + 4) print_indented('extract: "gz");', indentation + 4); - print_indented('options.resources.add(%s);' % name, indentation) def main(argv): (options, args) = parse_options(argv) |