tests/xtimer_now_irq: don't fail for 32bit timers

This commit is contained in:
Francisco Molina 2020-07-15 16:29:07 +02:00
parent 772b638d2a
commit 6bb765a362
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
2 changed files with 25 additions and 17 deletions

View File

@ -26,8 +26,11 @@
int main(void) int main(void)
{ {
if (XTIMER_WIDTH == 32) {
puts("Nothing to do for 32 bit timers.\n");
}
else {
puts("xtimer_now_irq test application.\n"); puts("xtimer_now_irq test application.\n");
uint8_t count = TEST_COUNT; uint8_t count = TEST_COUNT;
while (count) { while (count) {
unsigned int state = irq_disable(); unsigned int state = irq_disable();
@ -42,6 +45,8 @@ int main(void)
puts("OK"); puts("OK");
count --; count --;
} }
}
puts("SUCCESS"); puts("SUCCESS");
return 0; return 0;
} }

View File

@ -15,6 +15,9 @@ TIMEOUT = 20
def testfunc(child): def testfunc(child):
res = child.expect(['Nothing to do for 32 bit timers.\r\n',
'xtimer_now_irq test application.\r\n'])
if res == 1:
for _ in range(4): for _ in range(4):
child.expect_exact("OK", timeout=TIMEOUT) child.expect_exact("OK", timeout=TIMEOUT)
child.expect_exact("SUCCESS") child.expect_exact("SUCCESS")