Devin Moore | 32ca32b | 2023-01-12 19:28:46 +0000 | [diff] [blame] | 1 | #!/bin/bash |
Devin Moore | 3511c73 | 2023-02-22 00:37:12 +0000 | [diff] [blame] | 2 | # |
| 3 | # Create two CLs for the given HIDL interface to see the diff between the |
| 4 | # hidl2aidl output and the source at the tip-of-tree. |
| 5 | # The first CL contains the hidl2aidl output after removing all existing AIDL |
| 6 | # files. |
| 7 | # The second CL contains all of the changes on top of the raw hidl2aidl output |
| 8 | # that can be used for review. |
Devin Moore | 32ca32b | 2023-01-12 19:28:46 +0000 | [diff] [blame] | 9 | |
| 10 | if [[ $# -ne 1 ]]; then |
| 11 | echo "Usage: $0 INTERFACE_NAME" |
| 12 | echo "- INTERFACE_NAME fully qualified HIDL interface name with version" |
| 13 | echo "example of creating the diffs for android.hardware.boot@1.2" |
| 14 | echo "$ ./anapic_hidl2aidl_review.sh android.hardware.boot@1.2" |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | # for pathmod |
| 19 | source ${ANDROID_BUILD_TOP}/build/make/envsetup.sh |
| 20 | |
| 21 | set -ex |
| 22 | type hidl2aidl 2>/dev/null || m hidl2aidl |
| 23 | |
| 24 | INTERFACE_NAME_NO_VER=${1%@*} |
| 25 | pushd $(pathmod $INTERFACE_NAME_NO_VER) |
| 26 | rm -rf android |
| 27 | hidl2aidl -o . "$1" |
| 28 | rm -rf conversion.log translate include |
| 29 | git add -A |
| 30 | git commit -am "convert $1" --no-edit |
| 31 | git revert HEAD --no-edit |
| 32 | git commit --amend --no-edit |
Devin Moore | 3511c73 | 2023-02-22 00:37:12 +0000 | [diff] [blame] | 33 | git diff HEAD~1 --stat |
Devin Moore | fc9a722 | 2023-02-22 01:01:52 +0000 | [diff] [blame] | 34 | repo upload . --no-verify --wip --hashtag=anapic_release_review |
Devin Moore | 32ca32b | 2023-01-12 19:28:46 +0000 | [diff] [blame] | 35 | popd |