Skip to content

Commit 125d19c

Browse files
committed
tests/micropython: Add missing SystemExit after printing SKIP.
The test runner expects `print("SKIP")` to be followed by `raise SystemExit`. Otherwise it waits for 10 seconds for the target to do a soft reset before timing out and continuing. Signed-off-by: Damien George <[email protected]>
1 parent 908f938 commit 125d19c

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

tests/micropython/meminfo.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
# these functions are not always available
66
if not hasattr(micropython, "mem_info"):
77
print("SKIP")
8-
else:
9-
micropython.mem_info()
10-
micropython.mem_info(1)
11-
micropython.qstr_info()
12-
micropython.qstr_info(1)
8+
raise SystemExit
9+
10+
micropython.mem_info()
11+
micropython.mem_info(1)
12+
micropython.qstr_info()
13+
micropython.qstr_info(1)

tests/micropython/memstats.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
# these functions are not always available
66
if not hasattr(micropython, "mem_total"):
77
print("SKIP")
8-
else:
9-
t = micropython.mem_total()
10-
c = micropython.mem_current()
11-
p = micropython.mem_peak()
8+
raise SystemExit
129

13-
l = list(range(10000))
10+
t = micropython.mem_total()
11+
c = micropython.mem_current()
12+
p = micropython.mem_peak()
1413

15-
print(micropython.mem_total() > t)
16-
print(micropython.mem_current() > c)
17-
print(micropython.mem_peak() > p)
14+
l = list(range(10000))
15+
16+
print(micropython.mem_total() > t)
17+
print(micropython.mem_current() > c)
18+
print(micropython.mem_peak() > p)

tests/micropython/stack_use.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33

44
if not hasattr(micropython, "stack_use"):
55
print("SKIP")
6-
else:
7-
print(type(micropython.stack_use())) # output varies
6+
raise SystemExit
7+
8+
print(type(micropython.stack_use())) # output varies

0 commit comments

Comments
 (0)