ARMmbed / icetea

DEPRECATED mbed test framework
Apache License 2.0
6 stars 7 forks source link

Fix LocalAllocator - try any platform from 'AllowedPlatforms' #8

Closed donatieng closed 6 years ago

donatieng commented 6 years ago

Status

READY

Description

icetea_lib/Plugin/plugins/LocalAllocator.py: When supplied with multiple 'allowed_platforms', the current implementation was only filtering based on the first one supplied in this array. This commit changes this behaviour to look for a device implementing any of the 'allowed_platforms'.

Todos

jonikula commented 6 years ago

There was some reason why we didn't want to do this. @jupe can you remember what it was?

jupe commented 6 years ago

Reason for original behaviour is that if we allow any platform from allowed_platforms -list we need to be able select right binary for selected platform. So basically we need some dictionary property under application which map platform_name <-> binary - so that "any platform" can be picked from the list. I'll close this PR for now, but you are free to provide such implementation here as well and reopen this PR but note that we require tests for each PR to avoid regression in future.

pan- commented 6 years ago

@jupe Previously, it was OK to submit a list to allowed_platforms (hence the plural form!). It doesn't feel right to arbitrary break backward compatibility for a feature defect and asks users to deal with it or implement the missing feature.

jupe commented 6 years ago

We are actually bringing binary mapping table, so this feature make sense more: https://github.com/ARMmbed/mbed-clitest/pull/1071 .

It doesn't feel right to arbitrary break backward compatibility

What do you mean ?

pan- commented 6 years ago

I mean it was working earlier, now it doesn't. It is understood that a list of allowed platform may conflict with bin on the command line or in the platform configuration. It would have been better to let existing tests cases defining multiple platforms in the allowed_platforms list continue to run if bin was not used rather than break them.

It's good to see progress.