diff options
author | MÃ¥rten Kongstad <amhk@google.com> | 2024-05-03 06:53:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-03 06:53:52 +0000 |
commit | a57d0ef0a149716fc404e8e1c4def04e627c0e92 (patch) | |
tree | 796fe2f18aa33f2f19ddc65d33e843cbbdac7d4d /tools | |
parent | ab47e15dd14b0221f346d0aaeb94d263aeb4c013 (diff) | |
parent | b9ce4c92e012e8a9a255d76aaa11b8df78930dee (diff) | |
download | build-a57d0ef0a149716fc404e8e1c4def04e627c0e92.tar.gz |
Merge "check-flagged-apis.sh: use correct path to generated API signature files" into main
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/check-flagged-apis/check-flagged-apis.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/check-flagged-apis/check-flagged-apis.sh b/tools/check-flagged-apis/check-flagged-apis.sh index cd37a2d52e..3399583a71 100755 --- a/tools/check-flagged-apis/check-flagged-apis.sh +++ b/tools/check-flagged-apis/check-flagged-apis.sh @@ -34,12 +34,21 @@ function build() { frameworks-base-api-module-lib-current.txt } +function aninja() { + local T="$(gettop)" + (\cd "${T}" && prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja "$@") +} + +function path_to_api_signature_file { + aninja -t query device_"$1"_all_targets | grep -A1 -e input: | tail -n1 +} + function run() { local errors=0 echo "# current" check-flagged-apis \ - --api-signature $(gettop)/out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt \ + --api-signature $(path_to_api_signature_file "frameworks-base-api-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $(gettop)/out/dist/data/api-versions.xml (( errors += $? )) @@ -47,7 +56,7 @@ function run() { echo echo "# system-current" check-flagged-apis \ - --api-signature $(gettop)/out/target/product/mainline_x86/obj/ETC/frameworks-base-api-system-current.txt_intermediates/frameworks-base-api-system-current.txt \ + --api-signature $(path_to_api_signature_file "frameworks-base-api-system-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $(gettop)/out/dist/system-data/api-versions.xml (( errors += $? )) @@ -55,7 +64,7 @@ function run() { echo echo "# system-server-current" check-flagged-apis \ - --api-signature $(gettop)/out/target/product/mainline_x86/obj/ETC/frameworks-base-api-system-server-current.txt_intermediates/frameworks-base-api-system-server-current.txt \ + --api-signature $(path_to_api_signature_file "frameworks-base-api-system-server-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $(gettop)/out/dist/system-server-data/api-versions.xml (( errors += $? )) @@ -63,7 +72,7 @@ function run() { echo echo "# module-lib" check-flagged-apis \ - --api-signature $(gettop)/out/target/product/mainline_x86/obj/ETC/frameworks-base-api-module-lib-current.txt_intermediates/frameworks-base-api-module-lib-current.txt \ + --api-signature $(path_to_api_signature_file "frameworks-base-api-module-lib-current.txt") \ --flag-values $(gettop)/out/soong/.intermediates/all_aconfig_declarations.pb \ --api-versions $(gettop)/out/dist/module-lib-data/api-versions.xml (( errors += $? )) |