tools: Move --serial to base argument parser
Currently --serial is listed under the arguments group titled
"Full trace config (only when not using short options)". This makes
it sound like like --serial is unable to be used with the "light"
configuration options, which is not the case.
--serial simply sets the ANDROID_SERIAL env variable, which is
applicable for both light and full options, so move this out of
the "Full trace config" options group to make it clear to the
user that they can also use it with the "light" config when
they run "perfetto --help"
testing:
run "./tools/record_android_trace --help" and verify the --serial
option is printed with the base options.
Change-Id: I9c5b0e6bc830b33a5d92e5d4e3d59560bf692d77
diff --git a/tools/record_android_trace b/tools/record_android_trace
index f2931ed..c5fc03a 100755
--- a/tools/record_android_trace
+++ b/tools/record_android_trace
@@ -107,6 +107,9 @@
help = 'Don\'t run `adb root` run as user (only when sideloading)'
parser.add_argument('-u', '--user', action='store_true', help=help)
+ help = 'Specify the ADB device serial'
+ parser.add_argument('--serial', '-s', default=None, help=help)
+
grp = parser.add_argument_group(
'Short options: (only when not using -c/--config)')
@@ -144,9 +147,6 @@
help = 'Can be generated with https://ui.perfetto.dev/#!/record'
grp.add_argument('-c', '--config', default=None, help=help)
- help = 'Specify the ADB device serial'
- grp.add_argument('--serial', '-s', default=None, help=help)
-
args = parser.parse_args()
args.sideload = args.sideload or args.sideload_path is not None