Skip to content

Commit d30d5c9

Browse files
committed
tests/run-tests.py: Skip Thumb2 tests if target doesn't support them.
Signed-off-by: Damien George <[email protected]>
1 parent b796f1e commit d30d5c9

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# check if Thumb2/ARMV7M instructions are supported
2+
3+
4+
@micropython.asm_thumb
5+
def f():
6+
it(eq)
7+
nop()
8+
9+
10+
print("thumb2")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
thumb2

tests/run-tests.py

+15
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,21 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
465465
if output != b"a=1\n":
466466
skip_fstring = True
467467

468+
# Check if @micropython.asm_thumb supports Thumb2 instructions, and skip such tests if it doesn't
469+
output = run_feature_check(pyb, args, base_path, "inlineasm_thumb2.py")
470+
if output != b"thumb2\n":
471+
skip_tests.add("inlineasm/asmbcc.py")
472+
skip_tests.add("inlineasm/asmbitops.py")
473+
skip_tests.add("inlineasm/asmconst.py")
474+
skip_tests.add("inlineasm/asmdiv.py")
475+
skip_tests.add("inlineasm/asmfpaddsub.py")
476+
skip_tests.add("inlineasm/asmfpcmp.py")
477+
skip_tests.add("inlineasm/asmfpldrstr.py")
478+
skip_tests.add("inlineasm/asmfpmuldiv.py")
479+
skip_tests.add("inlineasm/asmfpsqrt.py")
480+
skip_tests.add("inlineasm/asmit.py")
481+
skip_tests.add("inlineasm/asmspecialregs.py")
482+
468483
# Check if emacs repl is supported, and skip such tests if it's not
469484
t = run_feature_check(pyb, args, base_path, "repl_emacs_check.py")
470485
if "True" not in str(t, "ascii"):

0 commit comments

Comments
 (0)