Skip to content

Commit 1a8cf28

Browse files
committed
tests/run-tests.py: Enable Arm inlineasm FPU tests if possible.
This commits lifts the unconditional restriction on inline assembler FPU tests for the Qemu platform, and makes said restriction conditional to the lack of an available floating point unit on the running platform. The Qemu platform supported only emulated machines that could target up to a Cortex-M3, so an ArmV7-M target that had no support for floating point. With the addition of MPS2_AN500 to the list of emulated targets the range was extended to cover up to Cortex-M7, so a floating point unit may possibly be available and thus able to run the FPU inlineasm tests. For that, the test runner was changed to detect the running architecture when checking the target capabilities; if the target reports its MicroPython architecture to be either "armv7emsp" or "armv7emdp" (providing single-precision and double-precision floating point unit support respectively) then the FPU-only inline tests are not put into the blocked tests list. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 4f96944 commit 1a8cf28

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

tests/run-tests.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,6 @@ def open(self, path, mode):
177177
"thread/thread_lock3.py",
178178
"thread/thread_shared2.py",
179179
),
180-
"qemu": (
181-
# Skip tests that require Cortex-M4.
182-
"inlineasm/thumb/asmfpaddsub.py",
183-
"inlineasm/thumb/asmfpcmp.py",
184-
"inlineasm/thumb/asmfpldrstr.py",
185-
"inlineasm/thumb/asmfpmuldiv.py",
186-
"inlineasm/thumb/asmfpsqrt.py",
187-
),
188180
"webassembly": (
189181
"basics/string_format_modulo.py", # can't print nulls to stdout
190182
"basics/string_strip.py", # can't print nulls to stdout
@@ -757,13 +749,14 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
757749
skip_tests.add("inlineasm/thumb/asmbitops.py")
758750
skip_tests.add("inlineasm/thumb/asmconst.py")
759751
skip_tests.add("inlineasm/thumb/asmdiv.py")
752+
skip_tests.add("inlineasm/thumb/asmit.py")
753+
skip_tests.add("inlineasm/thumb/asmspecialregs.py")
754+
if args.arch not in ("armv7emsp", "armv7emdp"):
760755
skip_tests.add("inlineasm/thumb/asmfpaddsub.py")
761756
skip_tests.add("inlineasm/thumb/asmfpcmp.py")
762757
skip_tests.add("inlineasm/thumb/asmfpldrstr.py")
763758
skip_tests.add("inlineasm/thumb/asmfpmuldiv.py")
764759
skip_tests.add("inlineasm/thumb/asmfpsqrt.py")
765-
skip_tests.add("inlineasm/thumb/asmit.py")
766-
skip_tests.add("inlineasm/thumb/asmspecialregs.py")
767760

768761
# Check if emacs repl is supported, and skip such tests if it's not
769762
t = run_feature_check(pyb, args, "repl_emacs_check.py")

0 commit comments

Comments
 (0)