Okash Khawaja | 671bed2 | 2022-11-10 15:51:19 +0000 | [diff] [blame] | 1 | This directory contains code related to long-term support management of TF-A. |
| 2 | |
| 3 | lts-triage.py |
| 4 | ============= |
| 5 | |
| 6 | Purpose of this script is to check a patch and determine if that patch qualifies |
| 7 | as a candidate for one of the LTS branches. |
| 8 | |
| 9 | Currently it focuses on cpu errata while it contains basic support for security |
| 10 | patches. It computes a crude score: |
| 11 | |
| 12 | 1 point if subject line matches tokens for cpu errata or security |
| 13 | 1 point for "report_errata ERRATA" in a lib/cpus/aarch{32,64}/*.S file |
| 14 | 1 point for "- ``ERRATA_" in docs/design/cpu-specific-build-macros.rst file |
| 15 | |
| 16 | Note that the script only looks at commits which are not merge commits. |
| 17 | |
Okash Khawaja | 66a3a7e | 2023-01-24 11:06:16 +0000 | [diff] [blame] | 18 | The script expects two branches: 'integration' and 'to_check'. 'integration' is |
| 19 | the actual integration branch of the TF-A project while 'to_check' points to the |
| 20 | tip of latest patch in the patchset that was submitted. |
| 21 | |
| 22 | The script needs to work out how many commits are in the current patchset which |
| 23 | will be the ones it needs to triage. In order to do that the script looks at two |
| 24 | parameters which are currently fixed in code. We can turn them into args if needed. |
| 25 | First is REBASE_DEPTH which is the number of commits in integration branch to look |
| 26 | for the common commit between patchset and integration branch. Second parameter is |
| 27 | MAX_PATCHSET_DEPTH which is the maximum number of commits we expect in the patchset |
| 28 | submitted. |
| 29 | |
Okash Khawaja | 6875150 | 2023-02-03 18:53:14 +0000 | [diff] [blame] | 30 | At the end, if any commit has non-zero score, the script will create a file named at |
| 31 | the path provided by --email_path argument. |
| 32 | |
Okash Khawaja | 671bed2 | 2022-11-10 15:51:19 +0000 | [diff] [blame] | 33 | Running it: |
| 34 | ----------- |
| 35 | |
| 36 | To run it, provide it a path to a TF-A git repo. Here's help output for convenience: |
| 37 | |
Okash Khawaja | 6875150 | 2023-02-03 18:53:14 +0000 | [diff] [blame] | 38 | $ python lts-triage.py -h |
| 39 | usage: lts-triage.py [-h] --repo REPO --email_path EMAIL_PATH [--debug] |
Okash Khawaja | 671bed2 | 2022-11-10 15:51:19 +0000 | [diff] [blame] | 40 | |
| 41 | check patches for LTS candidacy |
| 42 | |
| 43 | options: |
| 44 | -h, --help show this help message and exit |
| 45 | --repo REPO path to tf-a git repo |
Okash Khawaja | 6875150 | 2023-02-03 18:53:14 +0000 | [diff] [blame] | 46 | --email_path EMAIL_PATH |
| 47 | path including the filename for email file |
Okash Khawaja | 671bed2 | 2022-11-10 15:51:19 +0000 | [diff] [blame] | 48 | --debug print debug logs |
| 49 | |
Okash Khawaja | 671bed2 | 2022-11-10 15:51:19 +0000 | [diff] [blame] | 50 | Below is an example output. On left is commit hash of each of the commits |
| 51 | observed by this script and on right is score assigned to it. |
| 52 | |
Okash Khawaja | a5909ac | 2023-02-03 19:22:34 +0000 | [diff] [blame^] | 53 | $ python lts/lts-triage.py --repo ../trusted-firmware-a/ --email_path ./email.txt |
| 54 | feat(errata_framework): wrappers to propagate Aarch32 errata info: 0 |
| 55 | feat(errata_framework): add a way to automatically report errata: 0 |
| 56 | feat(errata_framework): add a concise way to implement Aarch64 errata: 0 |
| 57 | refactor(cpus): convert print_errata_status to C: 0 |
| 58 | refactor(cpus): rename errata_report.h to errata.h: 0 |
| 59 | refactor(cpus): move cpu_ops field defines to a header: 0 |
| 60 | chore(fvp): add the aarch32 cortex A57 to the build: 0 |
| 61 | chore(cpus): remove redundant asserts: 0 |
| 62 | refactor(cpus): shorten errata flag defines: 0 |
| 63 | ## stopping because found sha1 common between the two branches: 1678bbb57249b6edd4cdebc3cbc33b04df8fa098 |