Skip to content

Commit

Permalink
tests/run-tests.py: Skip Thumb2 tests if target doesn't support them.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Dec 6, 2023
1 parent b796f1e commit d30d5c9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/feature_check/inlineasm_thumb2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# check if Thumb2/ARMV7M instructions are supported


@micropython.asm_thumb
def f():
it(eq)
nop()


print("thumb2")
1 change: 1 addition & 0 deletions tests/feature_check/inlineasm_thumb2.py.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
thumb2
15 changes: 15 additions & 0 deletions tests/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit d30d5c9

Please sign in to comment.