Add explicit argument for running on golem
If passed, link in third party dependencies explicitly in scripts and don't build
This will allow for a simplified setup in our performance tracking
Change-Id: I18087187e52cda1f617bc433e97b7b93ecabe03a
diff --git a/tools/run_kotlin_benchmarks.py b/tools/run_kotlin_benchmarks.py
index 7f13989..c3f5b94 100755
--- a/tools/run_kotlin_benchmarks.py
+++ b/tools/run_kotlin_benchmarks.py
@@ -5,6 +5,7 @@
# Script for running kotlin based benchmarks
+import golem
import optparse
import os
import subprocess
@@ -44,8 +45,8 @@
help='The benchmark to run',
default='rgx',
choices=['rgx', 'deltablue', 'sta', 'empty'])
- result.add_option('--no-build',
- help='Don\'t build r8',
+ result.add_option('--golem',
+ help='Don\'t build r8 and link in third_party deps',
default=False, action='store_true')
result.add_option('--use-device',
help='Run the benchmark on an attaced device',
@@ -84,6 +85,8 @@
def Main():
(options, args) = parse_options()
+ if options.golem:
+ golem.link_third_party()
temp = '/tmp/output'
dex_path = os.path.join(temp, "classes.jar")
proguard_conf = os.path.join(temp, 'proguard.conf')
@@ -97,7 +100,7 @@
'--min-api', str(options.api),
benchmark_jar
]
- toolhelper.run('r8', r8_args, build=not options.no_build)
+ toolhelper.run('r8', r8_args, build=not options.golem)
if options.use_device:
result = run_art_device(dex_path)
else: