Skip to content

[TEST] Add MCU list in RTC automated test #1154

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

Closed
wants to merge 1 commit into from

Conversation

toyowata
Copy link
Contributor

@toyowata toyowata commented Jun 3, 2015

  • Add "mcu" key with lists of RTC support targets (#define DEVICE_RTC 1
    in device.h), now MBED_16 test is not executed by non-RTC targets

* Add "mcu" key with lists of RTC support targets (#define DEVICE_RTC 1
in device.h), now MBED_16 test is not executed by non-RTC targets
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 4, 2015

This fixes it ,however we should think about something more maintainable.

Isn't there a way for singletest to find out if that test is supported or not, besides #error message. I'll speak to @PrzemekWirkus.

@PrzemekWirkus
Copy link
Contributor

There are few options here:

  1. Use #if DEVICE_RTC in RTC's test case C/C++ source code to make sure we are calling RTC procedures only when RTC is there. If no RTC return new test result value like SKIPPED etc.
    We would have to add new test case result, e.g. RESULT_NO_SUPPORT and e.g. assume test will be compiled and flashed but instead of test execution we will just return to test environment 'that test is skipper / not supported for this platform'.
  2. Add RTC as peripheral so it will join peripherals family together with 'ethernet', digital_loop, TMP102 or port_loop.
    Problem here: we would have to update RTC test case with peripheral marker and add to all targets with RTC new property :/
  3. Leave it as it is, RTC will just fail on platforms without RTC and we will ignore this 'FAIL's.

PS: @toyowata - sorry I can't give you 👍 here, this should be discussed a bit and we should make this a scalable solution. Today RTC, tomorrow other peripheral may be excluded from platform. I do not want to maintain long list of MCUs supporting RTC. It just creates technical debt in workspace_tools.

@Sissors
Copy link
Contributor

Sissors commented Jun 4, 2015

While I think number 1 would be an easy and adequate solution, other options:

  1. Use an external RTC for those which have no RTC. The mbed code allows for external RTC to be used for your internal time. Downside is of course you have another external device required.
  2. Automatically create a list of targets which support RTC and use that to determine if they test is excecuted, instead of the manual list here. For something I am looking at I do now have python code which automatically can create a list of targets which have a certain peripheral, so something like that could be used to automate it before running the tests.

@star297
Copy link
Contributor

star297 commented Jun 4, 2015

More importantly, if a MCU has a separately backed up RTC could we ensure this works and does not get reset on power down or MCU reset. NXP and Freescale targets appear to have this correctly configured, whereas non of the ST targets I have work correctly and SiLabs Gecko's have the same problem at the moment, however I believe this on the to-do list.

@bridadan
Copy link
Contributor

bridadan commented Jun 4, 2015

I think adding RTC to the peripherals list is the most scalable option discussed so far. It wouldn't take much time to add the RTC peripheral for each platform (@toyowata has done the hard part already and figured out which platforms support RTC) and whoever adds a new platform will be responsible for adding the peripheral.

@toyowata
Copy link
Contributor Author

All,

All, than you very much for suggestions. I agreed that there should be the peripheral list for RTC targets and automated test MBED_16 should be tested only RTC enabled targets.

I will close this PR.

@toyowata toyowata closed this Jun 10, 2015
toyowata added a commit to toyowata/mbed that referenced this pull request Jun 10, 2015
As a result of discussion here:
ARMmbed#1154
0xc0170 added a commit that referenced this pull request Jun 10, 2015
commit 5b65ac9848f232b37ccf57b3cea3c8abd8788eb8
Merge: 4778e33 167456e
Author: 0xc0170 <[email protected]>
Date:   Wed Jun 10 13:18:07 2015 +0100

    Merge branch 'master' of https://github.com/toyowata/mbed into toyowata-master

commit 167456e
Author: Toyomasa Watarai <[email protected]>
Date:   Wed Jun 10 11:22:47 2015 +0900

    Change target name not use low cases

    Rev.101 mbed library support WIZnet platfrom.  However, we got build
    error as below by online compiler:

    Target “WIZWIKI_W7500” is not recognized

    This is because target name contained low cases (e.g. WIZwiki_W7500).
    The target name should be all upper case.

commit b988a53
Merge: f74cbe0 a140fc6
Author: Toyomasa Watarai <[email protected]>
Date:   Wed Jun 10 11:10:37 2015 +0900

    Merge remote-tracking branch 'upstream/master'

commit f74cbe0
Author: Toyomasa Watarai <[email protected]>
Date:   Wed Jun 10 11:07:02 2015 +0900

    Revert RTC test script change

    As a result of discussion here:
    #1154

commit a4923ff
Author: Toyomasa Watarai <[email protected]>
Date:   Thu Jun 4 00:17:06 2015 +0900

    [TEST] Add MCU list in RTC automated test

    * Add "mcu" key with lists of RTC support targets (#define DEVICE_RTC 1
    in device.h), now MBED_16 test is not executed by non-RTC targets
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.

6 participants