-
Notifications
You must be signed in to change notification settings - Fork 3k
Add tests for Sleep HAL API #5509
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
Add tests for Sleep HAL API #5509
Conversation
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.
I don't think we can test the GPIO wake up with current CI setup.
@@ -27,6 +27,42 @@ | |||
extern "C" { | |||
#endif | |||
|
|||
/** |
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.
What is that? That should be on the branch already?
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.
I added requirements section since it wasn't available on this branch. Requirements have been created based on function descriptions which are precise.
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.
That explains it, thanks @mprse
@mprse ping |
If GPIO wake-up can not be tested, then this PR is ready for now. |
/morph build |
Build : FAILUREBuild number : 574 |
3875e15
to
92e02e4
Compare
Fix has been provided for targets without low power timers. |
/morph build |
Build : FAILUREBuild number : 582 |
|
92e02e4
to
9afcfb2
Compare
Fixed as suggested. |
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.
rtc_sleep_test is part of RTC feature branch?
/morph build |
Yes its already on ARMmbed:feature-hal-spec-rtc. I didn't want to duplicate tests. |
Build : SUCCESSBuild number : 585 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 197 |
Test : FAILUREBuild number : 398 |
@mprse Please review the tests results, 3 targets might break the expected behavior |
|
Note:
I believe that most boards have ticker drivers are not ready. As far as I remember ticker frequency for all targets is declared as 1 MHz. I remember that on NRF51_DK high frequency ticker has 32kHz frequency, but it is scaled to 1MHz - incremented by 32. This might cause some us<-->ticks conversion problems. |
@mprse it's 3 boards, can we fix them? Or work it around another way? |
Exporter Build : FAILUREBuild number : 504 |
We are investigating the failure in exporters (some of the last builds have the same problem) |
Test : FAILUREBuild number : 684 |
In the last test run only sleep tests have failed on NFR52_DK. This means that there is a relation between disabling SLEEP support on this board and problems with other tests. Try to disable also features which are related to sleep mode. |
4e23237
to
1ca3b24
Compare
/morph build |
Build : SUCCESSBuild number : 846 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 515 |
Test : FAILUREBuild number : 690 |
The results are better but still two tests did not pass on NRF52_DK/IAR:
|
/morph test |
Test : FAILUREBuild number : 695 |
1ca3b24
to
72aa953
Compare
For NRF52_DK removing of "SLEEP" feature causes some timing issues which have influence on tests. In order to successfully disable this board related features like "USTICKER", "LOWPOERTIMER" have been disabled and ticker tests were slightly modified, so they will not be executed if usticker support is not available (by default all targets support us ticker). |
These boards will be re-enabled when sleep driver for them is ready. Note: This operation is done by removing "SLEEP" feature from target's "device_has" list (in targets.json config file). For NRF52_DK removing of "SLEEP" feature causes some timing issues which have influence on tests. In order to successfully disable this board we need to disable also related features like "USTICKER", "LOWPOERTIMER" and slightly modify ticker tests, so they will not be executed if usticker support is not available (by default all targets support us ticker).
72aa953
to
7ee9b0e
Compare
/morph build |
Build : SUCCESSBuild number : 865 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 536 |
/morph export-build |
Exporter Build : SUCCESSBuild number : 537 |
Test : SUCCESSBuild number : 712 |
Is that ready to go? |
Finally CI has passed. Three boards are disabled. Its ready to go. |
Description
This PR provides:
Status
READY
Migrations
NO
Related PRs
Todos
Implementation of the following test cases still needs to be added:
We need some general solution for all boards. From my point of view we need additional board which could be controlled by Green Tea in order to control its pins. For this test we would need to set specified pin on additional board as output and then be able to modify its logic level. This pin have to be connected to the specific pin in the tested boards. Then test could use this specific pin as interrupt input pin in order to wake up board from sleep.
What do you think?
Maybe some solution for this type of tests is already available if yes, then can some provide some piece of information how to use it?