xref: /aosp_15_r20/cts/tests/signature/api-check/scripts/README.md (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1*b7c941bbSAndroid Build Coastguard WorkerTransform expected failures is a tool to automate the process of transforming
2*b7c941bbSAndroid Build Coastguard Workerthe error reported to the expected failure format.
3*b7c941bbSAndroid Build Coastguard Worker
4*b7c941bbSAndroid Build Coastguard Workere.g. if the error is something like this: mismatch_method:
5*b7c941bbSAndroid Build Coastguard Workerandroid.service.euicc.EuiccService#onDownloadSubscription(int,
6*b7c941bbSAndroid Build Coastguard Workerandroid.telephony.euicc.DownloadableSubscription, boolean, boolean) Error:
7*b7c941bbSAndroid Build Coastguard WorkerNon-compatible method found when looking for public abstract int
8*b7c941bbSAndroid Build Coastguard WorkeronDownloadSubscription(int, android.telephony.euicc.DownloadableSubscription,
9*b7c941bbSAndroid Build Coastguard Workerboolean, boolean) - because modifier mismatch - description (public abstract),
10*b7c941bbSAndroid Build Coastguard Workermethod (public)
11*b7c941bbSAndroid Build Coastguard Worker
12*b7c941bbSAndroid Build Coastguard WorkerThen the expected failure would look something like this:
13*b7c941bbSAndroid Build Coastguard Worker"mismatch_method:android.service.euicc.EuiccService#onDownloadSubscription(int,
14*b7c941bbSAndroid Build Coastguard Workerandroid.telephony.euicc.DownloadableSubscription, boolean, boolean)",
15*b7c941bbSAndroid Build Coastguard Worker
16*b7c941bbSAndroid Build Coastguard WorkerExample: ./cts/tests/signature/api-check/scripts/transform_expected_failures.py
17*b7c941bbSAndroid Build Coastguard Worker"`cat /path/to/failures.txt`"
18*b7c941bbSAndroid Build Coastguard Worker
19*b7c941bbSAndroid Build Coastguard WorkerThis will print the expected failure format It will look for these list of
20*b7c941bbSAndroid Build Coastguard Workerannotations "extra_field|missing_method|extra_class|missing_annotation"
21*b7c941bbSAndroid Build Coastguard Worker
22*b7c941bbSAndroid Build Coastguard WorkerOptionally you can specify the list of expected failures types annotation
23*b7c941bbSAndroid Build Coastguard Workerseparated by "|" Example:
24*b7c941bbSAndroid Build Coastguard Worker./cts/tests/signature/api-check/scripts/transform_expected_failures.py "`cat
25*b7c941bbSAndroid Build Coastguard Worker/path/to/failures.txt`" "missing_method|missing_annotation"
26