tests/run-tests.py: Skip Thumb2 tests if target doesn't support them.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-12-06 16:05:37 +11:00
parent b796f1e3f1
commit d30d5c99af
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# check if Thumb2/ARMV7M instructions are supported
@micropython.asm_thumb
def f():
it(eq)
nop()
print("thumb2")

View File

@ -0,0 +1 @@
thumb2

View File

@ -465,6 +465,21 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
if output != b"a=1\n":
skip_fstring = True
# Check if @micropython.asm_thumb supports Thumb2 instructions, and skip such tests if it doesn't
output = run_feature_check(pyb, args, base_path, "inlineasm_thumb2.py")
if output != b"thumb2\n":
skip_tests.add("inlineasm/asmbcc.py")
skip_tests.add("inlineasm/asmbitops.py")
skip_tests.add("inlineasm/asmconst.py")
skip_tests.add("inlineasm/asmdiv.py")
skip_tests.add("inlineasm/asmfpaddsub.py")
skip_tests.add("inlineasm/asmfpcmp.py")
skip_tests.add("inlineasm/asmfpldrstr.py")
skip_tests.add("inlineasm/asmfpmuldiv.py")
skip_tests.add("inlineasm/asmfpsqrt.py")
skip_tests.add("inlineasm/asmit.py")
skip_tests.add("inlineasm/asmspecialregs.py")
# Check if emacs repl is supported, and skip such tests if it's not
t = run_feature_check(pyb, args, base_path, "repl_emacs_check.py")
if "True" not in str(t, "ascii"):