From c33a02fe6da766a9405fd14e23389b3c8b85d0b2 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Tue, 26 Aug 2025 03:12:00 +0200 Subject: 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 --- tests/run-tests.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'tests/run-tests.py') diff --git a/tests/run-tests.py b/tests/run-tests.py index aeea0bad5..7a0042819 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -177,14 +177,6 @@ platform_tests_to_skip = { "thread/thread_lock3.py", "thread/thread_shared2.py", ), - "qemu": ( - # Skip tests that require Cortex-M4. - "inlineasm/thumb/asmfpaddsub.py", - "inlineasm/thumb/asmfpcmp.py", - "inlineasm/thumb/asmfpldrstr.py", - "inlineasm/thumb/asmfpmuldiv.py", - "inlineasm/thumb/asmfpsqrt.py", - ), "webassembly": ( "basics/string_format_modulo.py", # can't print nulls to stdout "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): skip_tests.add("inlineasm/thumb/asmbitops.py") skip_tests.add("inlineasm/thumb/asmconst.py") skip_tests.add("inlineasm/thumb/asmdiv.py") + skip_tests.add("inlineasm/thumb/asmit.py") + skip_tests.add("inlineasm/thumb/asmspecialregs.py") + if args.arch not in ("armv7emsp", "armv7emdp"): skip_tests.add("inlineasm/thumb/asmfpaddsub.py") skip_tests.add("inlineasm/thumb/asmfpcmp.py") skip_tests.add("inlineasm/thumb/asmfpldrstr.py") skip_tests.add("inlineasm/thumb/asmfpmuldiv.py") skip_tests.add("inlineasm/thumb/asmfpsqrt.py") - skip_tests.add("inlineasm/thumb/asmit.py") - skip_tests.add("inlineasm/thumb/asmspecialregs.py") # Check if emacs repl is supported, and skip such tests if it's not t = run_feature_check(pyb, args, "repl_emacs_check.py") -- cgit v1.2.3