-
Notifications
You must be signed in to change notification settings - Fork 3k
Progen build tests #2080
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
Progen build tests #2080
Conversation
To have tests it's great, shall we add it to the travis , to always run exporting at least, or what do you think? |
@0xc0170 YES! |
This should just build using the ide builder and store the results. Its an entry point for CI only, not usability. |
Awesome!! We've started to put some tools tests inside the Currently only the config system tests lives there, could this live there too? Maybe |
It's good as it is, but I would consider only exporting. Not all tools provide builders, export should be verified, that at least it does not end up in the traceback. We just need CI command to trigger python script tests that require our CI (in this case tools like IAR, uvision and others to be installed). @bridadan we need your help
Makes sense to have all tests under |
@@ -3,7 +3,7 @@ PySerial>=2.7 | |||
PrettyTable>=0.7.2 | |||
Jinja2>=2.7.3 | |||
IntelHex>=1.3 | |||
project-generator>=0.9.3,<0.10.0 | |||
project-generator>=0.9.6,<0.10.0 |
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 would propose the latest v0.9.7 as 0.9.6 contained a bug with the iar template.
I fetched this patch, working for me - tested mbed blinky for uvision. I would suggest to print a message that something is happening, for me the blinky after it copies the files, took like a minute and I was not sure what is happening. We can expect that for bigger applications this could take >2minutes. What do you think? The status message - I left there cosmetic changes, the general looks fine to me. Please consider |
@0xc0170 I can add a status message. I think rather than being a verbose feature, it should be default? Like you said, would generally be confusing. Can add verbose mode later for other features. I was thinking verbose mode might set progen's logging level to debug. |
@sarahmarshy that sounds reasonable. If you would like to have 'verbose mode' as default, the common style of disabling messages via the command line is a |
@@ -93,12 +96,13 @@ def export(project_path, project_name, ide, target, destination='/tmp/', | |||
use_progen = True | |||
except AttributeError: | |||
pass | |||
|
|||
if target not in Exporter.TARGETS or ide.upper() not in TARGET_MAP[target].supported_toolchains: | |||
supported = 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.
@0xc0170
What do you think about this? Not sure why progen checks were different. Maybe we should think about getting rid of the hard coded targets in gcc, etc?
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 think it's useful to have those targets as a list (scripts used it to enable exporting in the online IDE) ,but not hard coded (progen provides API to check if target is supported), the way we do for uvision. Does that answer your question?
LGTM (just that small cosmetic prefix progen) |
Ready for integration? |
separate PR sounds good. |
d0be999
to
850bbb0
Compare
@0xc0170 then I think it is ready. This branch builds with the yaml: https://github.com/sarahmarshy/mbed/commits/build_with_yaml |
@mbed-bot: TEST HOST_OSES=windows |
@sarahmarshy Please rebase |
[Build 608] |
@0xc0170 it also needs that PR from progen merged. The one for build logs with IAR |
Please specify any dependencies, if this requires another repo change, will require addition to the requirements as well |
…pported toolchains per target.
850bbb0
to
82d22be
Compare
@mbed-bot: TEST HOST_OSES=windows |
[Build 627] |
The failing K64F tests are definitely not being caused by the changes here. I think the timing at which the test runner script was reading the serial output was affected by a long-running exporter test running on the same machine. I'm surprised that it was affected so much though. Any way, test results look ok! |
def progen_gen_file(self, tool_name, project_data): | ||
""" Generate project using ProGen Project API """ | ||
def progen_gen_file(self, tool_name, project_data, progen_build=False): | ||
"""" Generate project using ProGen Project API """ |
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.
why was " added?
@screamerbg review |
I have separated some of the exporter logic in project.py to project_api.py. I did this because I wanted to use some of that functionality in the new build_test script. build_test allows testing of ide builds (currently supports iar, uvision, and uv5) using progen.
build_test examples:
builds blinky for iar and k64f
build blinky and Hello World test for all targets on all (supported) ides
builds all tests (current default is just blinky but you can specify more with -t) for all progen targets on all ides