Override -printconfiguration to avoid writing into input directory when running benchmarks.
I found this issue while working on b/120575308.
Change-Id: Id17556ebcf2789b6d2ba84b5f7c130fc105738ad
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index 2adabef..a480214 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -122,17 +122,18 @@
'\'<BENCHMARKNAME>-<segment>(CodeSize): <bytes>\'')
return result.parse_args(argv)
-# Most apps have the -printmapping, -printseeds and -printusage in the
-# Proguard configuration. However we don't want to write these files
-# in the locations specified. Instead generate an auxiliary Proguard
-# configuration placing these two output files together with the dex
-# output.
+# Most apps have -printmapping, -printseeds, -printusage and
+# -printconfiguration in the Proguard configuration. However we don't
+# want to write these files in the locations specified.
+# Instead generate an auxiliary Proguard configuration placing these
+# output files together with the dex output.
def GenerateAdditionalProguardConfiguration(temp, outdir):
name = "output.config"
with open(os.path.join(temp, name), 'w') as f:
f.write('-printmapping ' + os.path.join(outdir, 'proguard.map') + "\n")
f.write('-printseeds ' + os.path.join(outdir, 'proguard.seeds') + "\n")
f.write('-printusage ' + os.path.join(outdir, 'proguard.usage') + "\n")
+ f.write('-printconfiguration ' + os.path.join(outdir, 'proguard.config') + "\n")
return os.path.abspath(f.name)
# Please add bug number for disabled permutations and please explicitly