-
Notifications
You must be signed in to change notification settings - Fork 3k
PSA release script update: add toolchain option #10606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@jeromecoutant, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please add documentation to tools/psa/README.md
@@ -74,7 +74,12 @@ def _get_target_info(target): | |||
if not os.path.exists(delivery_dir): | |||
raise Exception("{} does not have delivery_dir".format(target)) | |||
|
|||
return tuple([TARGET_MAP[target].name, | |||
if toolchain: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add assertion that the target actually supports the toolchain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -182,6 +192,11 @@ def build_default_image(target, toolchain, profile, args): | |||
logger.info("Building default image for {} using {} with {} profile".format( | |||
target, toolchain, profile)) | |||
|
|||
build_dir = os.path.join(ROOT, 'BUILD', target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use this variable in line 206
@@ -142,6 +147,11 @@ def build_tests(target, toolchain, profile, args): | |||
:param profile: build profile. | |||
:param args: list of extra arguments. | |||
""" | |||
build_dir = os.path.join(ROOT, 'BUILD', 'tests', target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use this variable in line 168
|
||
os.makedirs(build_dir) | ||
logger.info("BUILD directory created in {}".format(build_dir)) | ||
if not os.path.exists(build_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe this change is for incremental builds, if that's the case add a -c
option to the argument parser for a clean build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, BUILd part for the specific target is still deleted as the current behavior.
This patch just avoid to delete other targets.
5fe65e9
to
4f02e0b
Compare
tools/psa/release.py
Outdated
@@ -74,7 +74,14 @@ def _get_target_info(target): | |||
if not os.path.exists(delivery_dir): | |||
raise Exception("{} does not have delivery_dir".format(target)) | |||
|
|||
return tuple([TARGET_MAP[target].name, | |||
if toolchain: | |||
if not TOOLCHAIN_CLASSES[toolchain].check_executable(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not TOOLCHAIN_CLASSES[toolchain].check_executable(): | |
if toolchain not in TARGET_MAP[target].supported_toolchains: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeromecoutant it should be like this
the executeable_check is done in main()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
4f02e0b
to
392cc7d
Compare
tools/psa/release.py
Outdated
return tuple([TARGET_MAP[target].name, | ||
if toolchain: | ||
if toolchain not in TARGET_MAP[target].supported_toolchains: | ||
raise Exception("Toolchain {} was not found in PATH".format(toolchain)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise Exception("Toolchain {} was not found in PATH".format(toolchain)) | |
raise Exception("Toolchain {} is not supported by {}".format(toolchain, TARGET_MAP[target].name)) |
Error message should change as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
392cc7d
to
79ea266
Compare
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
exporter failed because of a license checkout failure...can someone restart? |
Restarted |
Description
2 updates:
Pull request type
Reviewers
@ARMmbed/mbed-os-psa