8000 tests/ports/rp2: Update lightsleep/machine_idle to skip on RP2350. · micropython/micropython@b42bb91 · GitHub
[go: up one dir, main page]

Skip to content

Commit b42bb91

Browse files
committed
tests/ports/rp2: Update lightsleep/machine_idle to skip on RP2350.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 651b63c commit b42bb91

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/ports/rp2/rp2_lightsleep.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
# A range of sleep periods (1 to 512ms) are tested. The total nominal sleep time
1010
# is 10.23 seconds, but on most ports this will finish much earlier as interrupts
1111
# happen before each timeout expires.
12+
import sys
13+
1214
try:
1315
from machine import lightsleep, Pin
1416
except ImportError:
1517
print("SKIP")
1618
raise SystemExit
1719

18-
from sys import stdout, platform
20+
# RP2350 currently fails this test, needs further investigation.
21+
if "RP2350" in sys.implementation._machine:
22+
print("SKIP")
23+
raise SystemExit
1924

2025
try:
2126
led = Pin(Pin.board.LED, Pin.OUT)
@@ -25,7 +30,7 @@
2530
for n in range(100):
2631
if led:
2732
led.toggle()
28-
stdout.write(chr(ord("a") + (n % 26)))
33+
sys.stdout.write(chr(ord("a") + (n % 26)))
2934
lightsleep(2 ** (n % 10))
3035

3136
print("\nDONE")

tests/ports/rp2/rp2_machine_idle.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import machine
23
import time
34

@@ -17,6 +18,11 @@
1718
# Verification uses the average idle time, as individual iterations will always
1819
# have outliers due to interrupts, scheduler, etc.
1920

21+
# RP2350 currently fails this test because machine.idle() resumes immediately.
22+
if "RP2350" in sys.implementation._machine:
23+
print("SKIP")
24+
raise SystemExit
25+
2026
ITERATIONS = 500
2127
total = 0
2228

0 commit comments

Comments
 (0)
0