From 579ccbf712ddffe67f98f8fe1d66803bd27f968c Mon Sep 17 00:00:00 2001 From: Rico Wind Date: Fri, 19 Mar 2021 13:31:16 +0100 Subject: Use camelcase for dart variables Only make one variable for openjdk Bug: 173189095 Change-Id: I79d6642e69ff26abb265cb750317f53093b10162 --- tools/run_on_app_dump.py | 17 +++++++++++------ 1 file 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) -- cgit v1.2.3