perfetto: add end to end benchmarking
Bug: 74380167
Change-Id: I448d72492e9a2aaa1123188f38b79492d4be6851
diff --git a/tools/run_android_test b/tools/run_android_test
index 37c1a36..bb92156 100755
--- a/tools/run_android_test
+++ b/tools/run_android_test
@@ -143,9 +143,11 @@
AdbCall('push', sanitizer_libs, target_dir)
env = 'LD_LIBRARY_PATH="%s/sanitizer_libs" ' % (target_dir)
cmd = 'cd %s;' % target_dir;
- cmd += env + './%s' % args.test_name
+ binary = env + './%s' % args.test_name
+ cmd += binary
if args.cmd_args:
- cmd += ' ' + ' '.join(args.cmd_args)
+ actual_args = [arg.replace(args.test_name, binary) for arg in args.cmd_args]
+ cmd += ' ' + ' '.join(actual_args)
cmd += ';echo -e "\\nTEST_RET_CODE=$?"'
print cmd
test_output = subprocess.check_output([ADB_PATH, 'shell', cmd])