tests/extmod/uasyncio_heaplock.py: Force SKIP on stackless.
This is a latent issue that wasn't caught by CI because there was no configuration that had both stackless+uasyncio. The previous check to skip with stackless builds only worked when the bytecode emitter was used by default. Force the check to use the bytecode emitter. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
51b054dd66
commit
6c376a9306
@ -8,11 +8,19 @@ import micropython
|
||||
|
||||
# strict stackless builds can't call functions without allocating a frame on the heap
|
||||
try:
|
||||
f = lambda: 0
|
||||
# force bytecode (in case we're running with emit=native) and verify
|
||||
# that bytecode-calling-bytecode doesn't allocate
|
||||
@micropython.bytecode
|
||||
def f(x):
|
||||
x and f(x - 1)
|
||||
|
||||
micropython.heap_lock()
|
||||
f()
|
||||
f(1)
|
||||
micropython.heap_unlock()
|
||||
except RuntimeError:
|
||||
# RuntimeError (max recursion depth) not MemoryError because effectively
|
||||
# the recursion depth is at the limit while the heap is locked with
|
||||
# stackless
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user