Skip to content
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

Extends test set for Ticker class #5006

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

maciejbocianski
Copy link
Contributor

@maciejbocianski maciejbocianski commented Sep 1, 2017

Description

New test suite for Ticker class

Status

READY

Test fails on NUCLEO_F070RB board
Waiting fix for #5004

ticker.detach();

int time_diff = timer.read_us();
printf("SystemCoreClock: %d\n", SystemCoreClock);
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want all these print by default (not for instance only for debug builds?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -171,8 +380,19 @@ utest::v1::status_t two_ticker_case_teardown_handler_t(const Case *const source,

// Test cases
Case cases[] = {
Case("Timers: 1x ticker", one_ticker_case_setup_handler_t,test_case_1x_ticker, one_ticker_case_teardown_handler_t),
Case("Timers: 2x callbacks", two_ticker_case_setup_handler_t,test_case_2x_callbacks, two_ticker_case_teardown_handler_t),
Case("Test attache for 0.001s and time measure", test_attach_time<1000>),
Copy link
Contributor

Choose a reason for hiding this comment

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

Test attach not attache ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 4, 2017

Is the first character in the commit message some non ascii character? please remove it

@LMESTM
Copy link
Contributor

LMESTM commented Sep 4, 2017

Fix for #5004 is here #5012

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 5, 2017

Is the first character in the commit message some non ascii character? please remove it

Github still shows some unknow character in the commit msg (first one) ?

@maciejbocianski maciejbocianski force-pushed the ticker_tests branch 3 times, most recently from 7ac3919 to 8dabdec Compare September 8, 2017 07:12
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 26, 2017

cc @bulislaw @c1728p9 @scartmell-arm Please review

For NUCLEO_F070RB TOLERANCE = (10000 / 48000000) * 1000000 = 208[us]
For NRF51_DK TOLERANCE = (10000 / 16000000) * 1000000 = 625[us]
*/
#define TOLERANCE ((TOLERANCE_FACTOR / (float)SystemCoreClock) * US_FACTOR)
Copy link
Contributor

Choose a reason for hiding this comment

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

What about setting the tolerance for the slowest device? It would make this simpler. Its good as you have it as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tolerance is scaled according CPU clock so it fits slow devices too. nrf51_dk is one of the slowest devices (form mbed compatible list).

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 28, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1424

All builds and test passed!

c1728p9 added a commit to c1728p9/mbed-os that referenced this pull request Oct 3, 2017
This commit reverts commit c1c0f1e
because it causes nightly builds to fail. This is because extra tests
added in tests-mbed_drivers-ticker fail on some targets, such as the
KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 3, 2017

@maciejbocianski Please check the above reference, the test needs more work (fixing)

adbridge pushed a commit that referenced this pull request Oct 6, 2017
This commit reverts commit c1c0f1e
because it causes nightly builds to fail. This is because extra tests
added in tests-mbed_drivers-ticker fail on some targets, such as the
KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
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.

None yet

6 participants