From 016f83053669ee56561bebd8e9b65dac77b670ac Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 11 Dec 2017 11:58:44 +0200 Subject: tests/heapalloc, heapalloc_super: Skip in strict stackless mode. These tests involves testing allocation-free function calling, and in strict stackless mode, it's not possible to make a function call with heap locked (because function activation record aka frame is allocated on the heap). --- tests/micropython/heapalloc.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/micropython/heapalloc.py') diff --git a/tests/micropython/heapalloc.py b/tests/micropython/heapalloc.py index 62f26df6a..f74bb92c8 100644 --- a/tests/micropython/heapalloc.py +++ b/tests/micropython/heapalloc.py @@ -2,6 +2,15 @@ import micropython +# Check for stackless build, which can't call functions without +# allocating a frame on heap. +try: + def stackless(): pass + micropython.heap_lock(); stackless(); micropython.heap_unlock() +except RuntimeError: + print("SKIP") + raise SystemExit + def f1(a): print(a) -- cgit v1.2.3