-
Notifications
You must be signed in to change notification settings - Fork 3k
Share test discovery logic #2107
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
|
@mbed-bot: TEST HOST_OSES=windows |
|
[Build 584] |
tools/test.py
Outdated
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 is this inconsistent with the style of the above check?
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 catch, I'll fix this
|
Pls rebase @screamerbg any comments to this test change? |
This allows toolchains to find test case directories when they are traversing the source tree. It must be done in the toolchians because they are aware of the target, toolchain, enabled features, config, and .mbedignore files.
28316dd to
05061e5
Compare
05061e5 to
2497c8f
Compare
|
@0xc0170 Rebased! |
|
LGTM |
| dir_path = join(root, d) | ||
| # Add internal repo folders/files. This is needed for exporters | ||
| if d == '.hg': | ||
| if d == '.hg' and not directory_in_path('TESTS', relpath(root, path)): |
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.
Not needed
|
Had a talk with @screamerbg and @theotherjimmy offline, we need to hold off on merging this for now. The implementation needs a little work, it modifies the toolchains too much. It might be possible to implement test discovery in similar fashion as FEATURES. |
|
Closing this PR as this functionality was reimplemented in #2244 |
This PR addresses #2104 by using the same scanning logic used in the toolchains to discover test cases. Previously this logic was partially duplicated here: https://github.com/mbedmicro/mbed/blob/master/tools/build_api.py#L956
Now tests under a
TARGET_,TOOLCHAIN_, orFEATURES_directory should be correctly ignored.Breaking changes
test.pydid not previously require the-mand-targuments (because it was not necessary for listing tests). Both of these are now required, since the tests that are discovered are now dependent on the target and toolchain. This will break thembed test --compile-listcommand at the moment and would require an update to mbed-cli.Please review @screamerbg, @0xc0170