Skip to content

Conversation

@bridadan
Copy link
Contributor

@bridadan bridadan commented Jul 5, 2016

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_, or FEATURES_ directory should be correctly ignored.

Breaking changes

test.py did not previously require the -m and -t arguments (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 the mbed test --compile-list command at the moment and would require an update to mbed-cli.

Please review @screamerbg, @0xc0170

@bridadan
Copy link
Contributor Author

bridadan commented Jul 5, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=ARM,GCC_ARM,IAR
TARGETS=K64F,NUCLEO_F411RE,LPC1114,NRF51_DK,LPC1768

@mbed-bot
Copy link

mbed-bot commented Jul 5, 2016

[Build 584]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

tools/test.py Outdated
Copy link
Contributor

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?

Copy link
Contributor Author

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 14, 2016

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.
@bridadan bridadan force-pushed the share-test-discovery-logic branch from 28316dd to 05061e5 Compare July 14, 2016 16:43
@bridadan bridadan force-pushed the share-test-discovery-logic branch from 05061e5 to 2497c8f Compare July 14, 2016 17:00
@bridadan
Copy link
Contributor Author

@0xc0170 Rebased!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 15, 2016

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)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

@bridadan
Copy link
Contributor Author

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.

@bridadan
Copy link
Contributor Author

Closing this PR as this functionality was reimplemented in #2244

@bridadan bridadan closed this Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants