Skip to content

Commit 680d10f

Browse files
authored
Merge pull request #10335 from orenc17/psa_release_check_exec
PSA release.py - Check that required toolchains are in PATH
2 parents a59ba20 + a127f10 commit 680d10f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/psa/release.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__),
2727
os.pardir, os.pardir))
2828
sys.path.insert(0, ROOT)
29+
from tools.toolchains import TOOLCHAIN_CLASSES
2930
from tools.targets import Target, TARGET_MAP, TARGET_NAMES
3031

3132

@@ -367,6 +368,11 @@ def main():
367368
logger.info("Building the following platforms: {}".format(
368369
', '.join([t[0] for t in psa_platforms_list])))
369370

371+
toolchains_set = set([t[1] for t in psa_platforms_list])
372+
for tc in toolchains_set:
373+
if not TOOLCHAIN_CLASSES[tc].check_executable():
374+
raise Exception("Toolchain {} was not found in PATH".format(tc))
375+
370376
for target, tc, directory in psa_platforms_list:
371377
build_psa_platform(target, tc, directory, options.debug,
372378
options.commit, options.skip_tests,

0 commit comments

Comments
 (0)