From 03c03028501fe825ef49180c20ccc6efa8affd75 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Wed, 20 Mar 2019 16:15:21 +0200 Subject: [PATCH] Add list option --- tools/psa/README.md | 3 ++- tools/psa/release.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/psa/README.md b/tools/psa/README.md index c7e7c0e21c..1e44d34de1 100644 --- a/tools/psa/README.md +++ b/tools/psa/README.md @@ -34,13 +34,14 @@ Each implementation requires a set of autogenerated files describing the secure `release.py` is the script assigned with compiling the secure images: ``` -usage: release.py [-h] [-m MCU] [-d] [-q] [--commit] [--skip-tests] +usage: release.py [-h] [-m MCU] [-d] [-q] [-l] [--commit] [--skip-tests] optional arguments: -h, --help show this help message and exit -m MCU, --mcu MCU build for the given MCU -d, --debug set build profile to debug -q, --quiet No Build log will be printed + -l, --list Print supported PSA secure targets --commit create a git commit for each platform --skip-tests skip the test build phase ``` diff --git a/tools/psa/release.py b/tools/psa/release.py index 2287817735..37388de14a 100644 --- a/tools/psa/release.py +++ b/tools/psa/release.py @@ -292,11 +292,16 @@ def get_parser(): default=False, help="No Build log will be printed") + parser.add_argument('-l', '--list', + action="store_true", + default=False, + help="Print supported PSA secure targets") + parser.add_argument("--commit", help="create a git commit for each platform", action="store_true", default=False) - + parser.add_argument('--skip-tests', action="store_true", default=False, @@ -328,6 +333,11 @@ def main(): subprocess_output = FNULL subprocess_err = subprocess.STDOUT + if options.list: + logger.info("Avialable platforms are: {}".format( + ', '.join([t for t in _get_psa_secure_targets_list()]))) + return + prep_build_dir() psa_platforms_list = get_mbed_official_psa_release(options.mcu) logger.info("Building the following platforms: {}".format(