Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb42bb91

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

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+
importsys
13+
1214
try:
1315
frommachineimportlightsleep,Pin
1416
exceptImportError:
1517
print("SKIP")
1618
raiseSystemExit
1719

18-
fromsysimportstdout,platform
20+
# RP2350 currently fails this test, needs further investigation.
21+
if"RP2350"insys.implementation._machine:
22+
print("SKIP")
23+
raiseSystemExit
1924

2025
try:
2126
led=Pin(Pin.board.LED,Pin.OUT)
@@ -25,7 +30,7 @@
2530
forninrange(100):
2631
ifled:
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+
importsys
12
importmachine
23
importtime
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"insys.implementation._machine:
23+
print("SKIP")
24+
raiseSystemExit
25+
2026
ITERATIONS=500
2127
total=0
2228

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp