Do not dump the --config argument.
When generating a config file from a commandline, cargo2android.py
should not dump the --config argument, as the point of the dump is to
generate a config file to use. This would not normally matter, but it
could help in scripts.
Test: Run and do not see --config in the dumped file.
Change-Id: Idc2911ba674e67272c9cf836c89607e10ca0dddd
diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py
index fef1d51..3cc928b 100755
--- a/scripts/cargo2android.py
+++ b/scripts/cargo2android.py
@@ -1752,8 +1752,8 @@
# Also filter certain "temporary" arguments.
non_default_args = {}
for arg in args_dict:
- if args_dict[arg] != parser.get_default(
- arg) and arg != 'dump_config_and_exit' and arg != 'no_test_mapping':
+ if (args_dict[arg] != parser.get_default(arg) and arg != 'dump_config_and_exit'
+ and arg != 'no_test_mapping' and arg != 'config'):
non_default_args[arg.replace('_', '-')] = args_dict[arg]
# Write to the specified file.
with open(args.dump_config_and_exit, 'w') as f: