summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-05-16 04:13:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-16 04:13:23 +0000
commit0eb669ed75f11f56e35f5de26fd4258dc2b0744e (patch)
tree6846a5271380740a35c3c753d827b75d6523ecb9
parent55ab781f743f6ee7c8659e09b6bffaa0cd3cacb2 (diff)
parenta2fe040735b6e114e4516b23cbde3d2bae7324df (diff)
downloaddevelopment-main.tar.gz
Merge "Unify the command line options for create_reference_dumps.py" into mainHEADmastermain
-rw-r--r--vndk/tools/header-checker/README.md4
-rwxr-xr-xvndk/tools/header-checker/utils/create_reference_dumps.py30
2 files changed, 12 insertions, 22 deletions
diff --git a/vndk/tools/header-checker/README.md b/vndk/tools/header-checker/README.md
index 846614411..9ac45950b 100644
--- a/vndk/tools/header-checker/README.md
+++ b/vndk/tools/header-checker/README.md
@@ -229,8 +229,8 @@ $ python3 utils/create_reference_dumps.py -l libfoo \
--ref-dump-dir /path/to/abi-dumps
```
-You may specify `-products` if you don't want to create the ABI dumps for
-all architectures. For example, with `-products aosp_arm`, the command creates
+You may specify `--product` if you don't want to create the ABI dumps for
+all architectures. For example, with `--product aosp_arm`, the command creates
dumps for 32-bit arm only.
#### Configure Cross-Version ABI Check
diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py
index 9efb7cee0..98110ddcb 100755
--- a/vndk/tools/header-checker/utils/create_reference_dumps.py
+++ b/vndk/tools/header-checker/utils/create_reference_dumps.py
@@ -177,14 +177,15 @@ def _parse_args():
"""Parse the command line arguments."""
parser = argparse.ArgumentParser()
- parser.add_argument('--version', help=argparse.SUPPRESS)
parser.add_argument('--no-make-lib', action='store_true',
help='skip building dumps while creating references')
- parser.add_argument('-libs', action='append',
+ parser.add_argument('--lib', '-libs', action='append',
+ dest='libs', metavar='LIB',
help='libs to create references for')
- parser.add_argument('-products', action='append',
+ parser.add_argument('--product', '-products', action='append',
+ dest='products', metavar='PRODUCT',
help='products to create references for')
- parser.add_argument('-release',
+ parser.add_argument('--release', '-release',
help='release configuration to create references for. '
'e.g., trunk_staging, next.')
parser.add_argument('--build-variant', default='userdebug',
@@ -192,37 +193,26 @@ def _parse_args():
parser.add_argument('--lib-variant', action='append', dest='include_tags',
default=[], choices=KNOWN_TAGS,
help='library variant to create references for.')
- parser.add_argument('--compress', action='store_true',
- help=argparse.SUPPRESS)
- parser.add_argument('-ref-dump-dir',
+ parser.add_argument('--ref-dump-dir', '-ref-dump-dir',
help='directory to copy reference abi dumps into')
-
args = parser.parse_args()
- if args.version is not None:
- parser.error('--version is deprecated. Please specify the version in '
- 'the reference dump directory path. e.g., '
- '-ref-dump-dir prebuilts/abi-dumps/platform/current/64')
-
- if args.compress:
- parser.error("Compressed reference dumps are deprecated.")
-
if args.libs:
if any(lib_name.endswith(SOURCE_ABI_DUMP_EXT_END) or
lib_name.endswith(SO_EXT) for lib_name in args.libs):
- parser.error('-libs should be followed by a base name without '
+ parser.error('--lib should be followed by a base name without '
'file extension.')
if NON_AOSP_TAGS.intersection(args.include_tags) and not args.libs:
- parser.error('-libs must be given if --lib-variant is any of ' +
+ parser.error('--lib must be given if --lib-variant is any of ' +
str(NON_AOSP_TAGS))
if args.ref_dump_dir and not args.libs:
- parser.error('-libs must be given if -ref-dump-dir is given.')
+ parser.error('--lib must be given if --ref-dump-dir is given.')
if args.ref_dump_dir and len(args.include_tags) != 1:
print('WARNING: Exactly one --lib-variant should be specified if '
- '-ref-dump-dir is given.')
+ '--ref-dump-dir is given.')
if args.products is None:
# If `args.products` is unspecified, generate reference ABI dumps for