Skip to content

Icetea hw restriction #8137

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

Merged
merged 3 commits into from
Sep 17, 2018
Merged

Conversation

OPpuolitaival
Copy link
Contributor

Description

Restrict the board where test are running. This fix the problem in case that user has multiple different boards connected to the machine same time

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@OPpuolitaival
Copy link
Contributor Author

@jonikula @studavekar please review

def get_applications(test):
ret = list()
for dut in test['requirements']['duts'].values():
if 'application' in dut.keys() and 'name' in dut['application'].keys():
if 'application' in dut.keys() and 'name' in dut['applicati on'].keys():

Choose a reason for hiding this comment

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

Typo here.

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, fixed

@cmonr
Copy link
Contributor

cmonr commented Sep 14, 2018

@jonikula Please take another look as Olli has updated this PR.

@OPpuolitaival
Copy link
Contributor Author

@alekla01 please review

@cmonr cmonr requested a review from alekla01 September 14, 2018 14:12
@cmonr cmonr added the risk: A label Sep 14, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 17, 2018

/morph build

Copy link
Contributor

@alekla01 alekla01 left a comment

Choose a reason for hiding this comment

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

(example, does not necessarily have anything to do with this pr)
target = 'K64F', ['1']['allowed_platforms'] = ['K66F']
doesn't this use 'K64F' binaries but flash 'K66F'?

@jupe
Copy link
Contributor

jupe commented Sep 17, 2018

For me it looks like setting platform_name would be the correct way to do this. This now overwrites allowed_platforms list from test case.. Unless there is something I just don't get yet..

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

Build : SUCCESS

Build number : 3081
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8137/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 17, 2018

@OPpuolitaival Please review the latest 2 comments, if this requires changes . Should be done asap if that is the case

@OPpuolitaival
Copy link
Contributor Author

@jupe Current implementation work surely. You need to understand that it is about generated configuration and we need to limit target devices. Current idea is also that there should not be board specific test cases in Mbed OS. Now it works so that test application binary cannot be build if target board do not support those features. When application cannot be build the tests will be skipped.

@OPpuolitaival
Copy link
Contributor Author

@alekla01 do you mean that tests are not real use cases? Yes those are just unit tests which validate function not the bigger use case

@alekla01
Copy link
Contributor

@OPpuolitaival
No, i mean if you set ['*']['allowed_platforms'] = target, and the test requirements sets ['1']['allowed_platforms'] = [target, target2], target2 may still get flashed with target binary (if i am not mistaken). However, this is not an issue with the current tests and should not be and issue as long as 'allowed_platforms' is only used in ['*'] and not in ['1...10']. ('Current idea is also that there should not be board specific test cases in Mbed OS' -> 'allowed_platforms' is not used in ['1..10'] -> ok). Both allowed_platforms and platform_name work just as well in this case.

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

@jupe
Copy link
Contributor

jupe commented Sep 17, 2018

Current idea is also that there should not be board specific test cases in Mbed OS

In that case this should overwrite allowed list with empty array (="no board specific test") and use platform_name -property to select platform under test explicitly.. Current implementation causes a bit confusion way how it uses allowed_platform -property even it "seems to work as expected" - it works just because icetea picks first platform from that list by default in case of user does not select explicitly platform_name (which was originally implemented kind of backward compatible reason)... Anyway, I'm fine with current approach - it's not perfect but it do it's job for now..

Another concern related to @alekla01 comment. Do we have/will have tests which require different applications per device ? That might causing more tuning here..

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 17, 2018

@jupe @alekla01 @OPpuolitaival All approved but based on the comments, the discussion is not yet over. I believe this is good to go (needs some improvements later possibly). If not, now it's the time to request changes.

@cmonr
Copy link
Contributor

cmonr commented Sep 17, 2018

Bringing this in, since we need to get RC3 generated in the next couple of hours. Further discussion can continue either here or in an issue (prefereably an issue).

@cmonr cmonr merged commit 7a0c9a6 into ARMmbed:master Sep 17, 2018
@OPpuolitaival
Copy link
Contributor Author

@0xc0170 this solve the problem. Yes there might be some issues in future that we might need to change this a bit. The reason why this code is in this repository and not in mbed-cli is that icetea usage logic and test cases will be in sync

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.

7 participants