-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Exporters] New export-build tests #3172
Conversation
/morph export-build |
e82fc41
to
a3b8974
Compare
@@ -102,6 +105,38 @@ def generate(self): | |||
else: | |||
raise NotSupportedException("This make tool is in development") | |||
|
|||
@staticmethod | |||
def build(project_name, build_log="build_log.txt", project_loc=None, clean=True): |
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.
Can you remove the project_loc
parameter here? Doesn't look like it's used.
Also, can build_log
be renamed to log_name
to match uvision's build
function?
@@ -120,22 +121,13 @@ def generate(self): | |||
self.gen_file('iar/ewd.tmpl', ctx, self.project_name + ".ewd") | |||
self.gen_file(self.get_ewp_template(), ctx, self.project_name + ".ewp") | |||
|
|||
def build(self): | |||
@staticmethod | |||
def build(project_name, clean=True): |
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.
The rest of our APIs use the parameter clean
to mean "delete a bunch of stuff before doing the thing I asked you to do". But in this case, it means "delete all the stuff you created when you're done doing the thing I asked you to do".
For this reason, maybe we should call this parameter cleanup
instead of clean
?
a4cacc3
to
d7e0d28
Compare
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
0f52f21
to
407e893
Compare
/morph export-build |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
|
@sarahmarshy There's a change in here that I only noticed after CI ran. There are targets now I believe that don't have CMSIS packs but do have IAR definitions (the NCS36510 being one of them). This target was skipped in the above CI run. Can we change the supported check for IAR so that if the device_name appears in the iar_definitions.json it is considered supported? Is there any time where this would not be the case? |
@@ -30,38 +30,40 @@ class DeviceCMSIS(): | |||
"""CMSIS Device class | |||
|
|||
Encapsulates target information retrieved by arm-pack-manager""" | |||
cache = Cache(True, False) |
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.
Nit: Isn't the style in our code base that classes members are in capital letters, CACHE
? I recall its in most places
shutil.rmtree('.build') | ||
if ret_code != 0: | ||
# Seems like something went wrong. | ||
return -1 |
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.
Is this documented, now that we have return values, that -1 is an error, 0 succcess ? I can't find it in this changeset. Previously build
function raised an exception, no return value.
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.
LGTM
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.
Thanks for the explanation @sarahmarshy, as long as we're clear on what is necessary to have exporter support then I'm happy. Any and all additional docs on the CMSIS pack dependency would be good too :)
/morph export-build |
Allows command line workflow of: mbed import mbed export Also revises exporter supported target checks
…son for each target).
cbc8d6e
to
0a4171a
Compare
/morph export-build |
Thanks for addressing the docs API comment . I dont understand the commit - |
Result: ABORTEDYour command has finished executing! Here's what you wrote!
|
@sarahmarshy You could make the message give details about adding the |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
|
0a4171a
to
d71ac0e
Compare
This will determine whether the example should be exported. Additionally, relocated export logic to examples_lib.py.
d71ac0e
to
9624ccf
Compare
Release mbed OS 5.2.2 and mbed lib v129 Known issues in this release There is currently a DNS resolution failure in Thread mode with this release. This causes a failure in the mbed-os-example-client. This will be fixed in a subsequent release. This can be worked around by reverting to mbed-os-5.2.0 Ports for Upcoming Targets 3011: Add u-blox Sara-N target. ARMmbed#3011 3099: MAX32625 ARMmbed#3099 3151: Add support for FRDM-K82F ARMmbed#3151 3177: New mcu k22512 fixing pr 3136 ARMmbed#3177 Fixes and Changes 2990: [tools] Parallel building of tests ARMmbed#2990 3008: NUCLEO_F072RB: Fix wrong timer channel number on pwm PB_5 pin ARMmbed#3008 3013: STM32xx - Change how the ADC internal pins are checked before pinmap_ ARMmbed#3013 3023: digital_loop tests update for STM32 ARMmbed#3023 3041: [nRF5] - added implementation of API of serial port flow control configuration. ARMmbed#3041 3092: [tools + tests] Adding parallelized build option for iar and uvision exporters ARMmbed#3092 3084: [nrf5] fix in Digital I/O : a gpioe pin was uninitialized badly ARMmbed#3084 3009: TRNG enabled. TRNG APIs implemented. REV A/B/C/D flags removed. Warnings removed ARMmbed#3009 3139: Handle [NOT_SUPPORTED] exception in make.py ARMmbed#3139 3074: Target stm init gcc alignement ARMmbed#3074 3140: [tests] Replacing getchar with RawSerial getc in greentea-client ARMmbed#3140 3158: Added support for 6lowpan PAN ID filter to mbed mesh api configuration ARMmbed#3158 2988: Update of can_api.c fixing ARMmbed#2987 ARMmbed#2988 3175: Updating IAR definition for the NCS36510 for IAR EW v7.8 ARMmbed#3175 3170: [tests] Preventing test from printing before Greentea __sync ARMmbed#3170 3169: [Update of ARMmbed#3014] Usb updates ARMmbed#3169 3143: CFStore fix needed for the Cloud Client ARMmbed#3143 3135: lwip - Fix memory leak in k64f cyclic-buffer overflow ARMmbed#3135 3048: Make update.py test compile examples prior to updating mbed-os version. ARMmbed#3048 3162: lwip/nsapi - Clean up warnings in network code ARMmbed#3162 3161: nsapi - Add better heuristic for the default record of DNS queries ARMmbed#3161 3173: [Exporters] Add a device_name to microbit entry in targets.json ARMmbed#3173 3072: i2c_loop tests update for STM32 ARMmbed#3072 2958: Allowing mbed_app.json files to be discovered for tests. ARMmbed#2958 2969: [nRF52] - switch irq priorities of driver handlers to the lowest level ARMmbed#2969 3078: lwip: Allow several configuration macros to be set externally (bis) ARMmbed#3078 3165: Add address type checks to NanostackInterface ARMmbed#3165 3166: nsapi_dns: Provide 2 IPv6-hosted default servers ARMmbed#3166 3171: [tools] Fixing project.py -S printing problem ARMmbed#3171 3172: [Exporters] New export-build tests ARMmbed#3172 3184: ARMmbed#3183 Compiler warning in trng_api.c with K64F ARMmbed#3184 3185: Update tests to fix build failures. Also make the code similar to oth ARMmbed#3185 3104: [NuMaker] Support CAN and fix PWM CLK error ARMmbed#3104 3182: Exporter documentation ARMmbed#3182 3186: MultiTech mDot - add back SPI3 pins ARMmbed#3186 3187: [Export-Make] Use internal class variable for resolving templates in makefiles ARMmbed#3187 3195: [Exporters - Make-based] Quote the shell call in mkdir and rmdir ARMmbed#3195 3204: [Export build-test] Directory traversal error ARMmbed#3204 3189: [Exporters - Make-based] Force make exporter to search PATH for compilers ARMmbed#3189 3200: Using Popen for uVision and unifying the structure of the build function ARMmbed#3200 3075: nsapi - Add standardized return types for size and errors ARMmbed#3075 3221: u-blox odin w2 drivers update ARMmbed#3221
Description
Adds additional export-build tests that use subprocess commands
mbed import
andmbed export
. Additionally, I have revised how exporters store supported targets, and, as a result, how project.py handles unsupported targets. I did this to make supported targets more visible for the new tests.Status
READY
Todos
Deploy notes
Build tests of any kind require the IDEs executable to be in the path.
Steps to test or reproduce
In a clean subdirectory of
mbed-os\.build
python ..\..\tools\test\examples\examples.py import
python ..\..\tools\test\examples\examples.py export iar uvision make_armc5 make_iar make_gcc_arm