diff --git a/ports/qemu/boards/SABRELITE.mk b/ports/qemu/boards/SABRELITE.mk index f1945c10f..839b3d6ac 100644 --- a/ports/qemu/boards/SABRELITE.mk +++ b/ports/qemu/boards/SABRELITE.mk @@ -16,4 +16,4 @@ SRC_BOARD_O = shared/runtime/gchelper_generic.o MPY_CROSS_FLAGS += -march=armv6 # These tests don't work on Cortex-A9, so exclude them. -RUN_TESTS_ARGS = --exclude '(asmdiv|asmspecialregs).py' +RUN_TESTS_ARGS = --exclude 'inlineasm/thumb/(asmdiv|asmspecialregs).py' diff --git a/ports/qemu/boards/VIRT_RV32.mk b/ports/qemu/boards/VIRT_RV32.mk index 355a09c3d..e166165a1 100644 --- a/ports/qemu/boards/VIRT_RV32.mk +++ b/ports/qemu/boards/VIRT_RV32.mk @@ -11,6 +11,6 @@ SRC_BOARD_O += shared/runtime/gchelper_native.o shared/runtime/gchelper_rv32i.o MPY_CROSS_FLAGS += -march=rv32imc # These Thumb tests don't run on RV32, so exclude them. -RUN_TESTS_ARGS = --exclude 'inlineasm|qemu/asm_test' +RUN_TESTS_ARGS = --exclude 'inlineasm/thumb|qemu/asm_test' RUN_NATMODTESTS_ARGS = --arch rv32imc diff --git a/ports/qemu/test-frzmpy/frozen_asm.py b/ports/qemu/test-frzmpy/frozen_asm_thumb.py similarity index 100% rename from ports/qemu/test-frzmpy/frozen_asm.py rename to ports/qemu/test-frzmpy/frozen_asm_thumb.py diff --git a/tests/inlineasm/asmargs.py b/tests/inlineasm/thumb/asmargs.py similarity index 100% rename from tests/inlineasm/asmargs.py rename to tests/inlineasm/thumb/asmargs.py diff --git a/tests/inlineasm/asmargs.py.exp b/tests/inlineasm/thumb/asmargs.py.exp similarity index 100% rename from tests/inlineasm/asmargs.py.exp rename to tests/inlineasm/thumb/asmargs.py.exp diff --git a/tests/inlineasm/asmbcc.py b/tests/inlineasm/thumb/asmbcc.py similarity index 100% rename from tests/inlineasm/asmbcc.py rename to tests/inlineasm/thumb/asmbcc.py diff --git a/tests/inlineasm/asmbcc.py.exp b/tests/inlineasm/thumb/asmbcc.py.exp similarity index 100% rename from tests/inlineasm/asmbcc.py.exp rename to tests/inlineasm/thumb/asmbcc.py.exp diff --git a/tests/inlineasm/asmbitops.py b/tests/inlineasm/thumb/asmbitops.py similarity index 100% rename from tests/inlineasm/asmbitops.py rename to tests/inlineasm/thumb/asmbitops.py diff --git a/tests/inlineasm/asmbitops.py.exp b/tests/inlineasm/thumb/asmbitops.py.exp similarity index 100% rename from tests/inlineasm/asmbitops.py.exp rename to tests/inlineasm/thumb/asmbitops.py.exp diff --git a/tests/inlineasm/asmblbx.py b/tests/inlineasm/thumb/asmblbx.py similarity index 100% rename from tests/inlineasm/asmblbx.py rename to tests/inlineasm/thumb/asmblbx.py diff --git a/tests/inlineasm/asmblbx.py.exp b/tests/inlineasm/thumb/asmblbx.py.exp similarity index 100% rename from tests/inlineasm/asmblbx.py.exp rename to tests/inlineasm/thumb/asmblbx.py.exp diff --git a/tests/inlineasm/asmconst.py b/tests/inlineasm/thumb/asmconst.py similarity index 100% rename from tests/inlineasm/asmconst.py rename to tests/inlineasm/thumb/asmconst.py diff --git a/tests/inlineasm/asmconst.py.exp b/tests/inlineasm/thumb/asmconst.py.exp similarity index 100% rename from tests/inlineasm/asmconst.py.exp rename to tests/inlineasm/thumb/asmconst.py.exp diff --git a/tests/inlineasm/asmdata.py b/tests/inlineasm/thumb/asmdata.py similarity index 100% rename from tests/inlineasm/asmdata.py rename to tests/inlineasm/thumb/asmdata.py diff --git a/tests/inlineasm/asmdata.py.exp b/tests/inlineasm/thumb/asmdata.py.exp similarity index 100% rename from tests/inlineasm/asmdata.py.exp rename to tests/inlineasm/thumb/asmdata.py.exp diff --git a/tests/inlineasm/asmdiv.py b/tests/inlineasm/thumb/asmdiv.py similarity index 100% rename from tests/inlineasm/asmdiv.py rename to tests/inlineasm/thumb/asmdiv.py diff --git a/tests/inlineasm/asmdiv.py.exp b/tests/inlineasm/thumb/asmdiv.py.exp similarity index 100% rename from tests/inlineasm/asmdiv.py.exp rename to tests/inlineasm/thumb/asmdiv.py.exp diff --git a/tests/inlineasm/asmfpaddsub.py b/tests/inlineasm/thumb/asmfpaddsub.py similarity index 100% rename from tests/inlineasm/asmfpaddsub.py rename to tests/inlineasm/thumb/asmfpaddsub.py diff --git a/tests/inlineasm/asmfpaddsub.py.exp b/tests/inlineasm/thumb/asmfpaddsub.py.exp similarity index 100% rename from tests/inlineasm/asmfpaddsub.py.exp rename to tests/inlineasm/thumb/asmfpaddsub.py.exp diff --git a/tests/inlineasm/asmfpcmp.py b/tests/inlineasm/thumb/asmfpcmp.py similarity index 100% rename from tests/inlineasm/asmfpcmp.py rename to tests/inlineasm/thumb/asmfpcmp.py diff --git a/tests/inlineasm/asmfpcmp.py.exp b/tests/inlineasm/thumb/asmfpcmp.py.exp similarity index 100% rename from tests/inlineasm/asmfpcmp.py.exp rename to tests/inlineasm/thumb/asmfpcmp.py.exp diff --git a/tests/inlineasm/asmfpldrstr.py b/tests/inlineasm/thumb/asmfpldrstr.py similarity index 100% rename from tests/inlineasm/asmfpldrstr.py rename to tests/inlineasm/thumb/asmfpldrstr.py diff --git a/tests/inlineasm/asmfpldrstr.py.exp b/tests/inlineasm/thumb/asmfpldrstr.py.exp similarity index 100% rename from tests/inlineasm/asmfpldrstr.py.exp rename to tests/inlineasm/thumb/asmfpldrstr.py.exp diff --git a/tests/inlineasm/asmfpmuldiv.py b/tests/inlineasm/thumb/asmfpmuldiv.py similarity index 100% rename from tests/inlineasm/asmfpmuldiv.py rename to tests/inlineasm/thumb/asmfpmuldiv.py diff --git a/tests/inlineasm/asmfpmuldiv.py.exp b/tests/inlineasm/thumb/asmfpmuldiv.py.exp similarity index 100% rename from tests/inlineasm/asmfpmuldiv.py.exp rename to tests/inlineasm/thumb/asmfpmuldiv.py.exp diff --git a/tests/inlineasm/asmfpsqrt.py b/tests/inlineasm/thumb/asmfpsqrt.py similarity index 100% rename from tests/inlineasm/asmfpsqrt.py rename to tests/inlineasm/thumb/asmfpsqrt.py diff --git a/tests/inlineasm/asmfpsqrt.py.exp b/tests/inlineasm/thumb/asmfpsqrt.py.exp similarity index 100% rename from tests/inlineasm/asmfpsqrt.py.exp rename to tests/inlineasm/thumb/asmfpsqrt.py.exp diff --git a/tests/inlineasm/asmit.py b/tests/inlineasm/thumb/asmit.py similarity index 100% rename from tests/inlineasm/asmit.py rename to tests/inlineasm/thumb/asmit.py diff --git a/tests/inlineasm/asmit.py.exp b/tests/inlineasm/thumb/asmit.py.exp similarity index 100% rename from tests/inlineasm/asmit.py.exp rename to tests/inlineasm/thumb/asmit.py.exp diff --git a/tests/inlineasm/asmpushpop.py b/tests/inlineasm/thumb/asmpushpop.py similarity index 100% rename from tests/inlineasm/asmpushpop.py rename to tests/inlineasm/thumb/asmpushpop.py diff --git a/tests/inlineasm/asmpushpop.py.exp b/tests/inlineasm/thumb/asmpushpop.py.exp similarity index 100% rename from tests/inlineasm/asmpushpop.py.exp rename to tests/inlineasm/thumb/asmpushpop.py.exp diff --git a/tests/inlineasm/asmrettype.py b/tests/inlineasm/thumb/asmrettype.py similarity index 100% rename from tests/inlineasm/asmrettype.py rename to tests/inlineasm/thumb/asmrettype.py diff --git a/tests/inlineasm/asmrettype.py.exp b/tests/inlineasm/thumb/asmrettype.py.exp similarity index 100% rename from tests/inlineasm/asmrettype.py.exp rename to tests/inlineasm/thumb/asmrettype.py.exp diff --git a/tests/inlineasm/asmshift.py b/tests/inlineasm/thumb/asmshift.py similarity index 100% rename from tests/inlineasm/asmshift.py rename to tests/inlineasm/thumb/asmshift.py diff --git a/tests/inlineasm/asmshift.py.exp b/tests/inlineasm/thumb/asmshift.py.exp similarity index 100% rename from tests/inlineasm/asmshift.py.exp rename to tests/inlineasm/thumb/asmshift.py.exp diff --git a/tests/inlineasm/asmspecialregs.py b/tests/inlineasm/thumb/asmspecialregs.py similarity index 100% rename from tests/inlineasm/asmspecialregs.py rename to tests/inlineasm/thumb/asmspecialregs.py diff --git a/tests/inlineasm/asmspecialregs.py.exp b/tests/inlineasm/thumb/asmspecialregs.py.exp similarity index 100% rename from tests/inlineasm/asmspecialregs.py.exp rename to tests/inlineasm/thumb/asmspecialregs.py.exp diff --git a/tests/inlineasm/asmsum.py b/tests/inlineasm/thumb/asmsum.py similarity index 100% rename from tests/inlineasm/asmsum.py rename to tests/inlineasm/thumb/asmsum.py diff --git a/tests/inlineasm/asmsum.py.exp b/tests/inlineasm/thumb/asmsum.py.exp similarity index 100% rename from tests/inlineasm/asmsum.py.exp rename to tests/inlineasm/thumb/asmsum.py.exp diff --git a/tests/ports/qemu/asm_test.py b/tests/ports/qemu/asm_test.py index 26c7efe42..57238c629 100644 --- a/tests/ports/qemu/asm_test.py +++ b/tests/ports/qemu/asm_test.py @@ -1,4 +1,4 @@ -import frozen_asm +import frozen_asm_thumb as frozen_asm print(frozen_asm.asm_add(1, 2)) print(frozen_asm.asm_add1(3)) diff --git a/tests/run-tests.py b/tests/run-tests.py index a609a1fcb..f00510f2d 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -138,11 +138,11 @@ platform_tests_to_skip = { ), "qemu": ( # Skip tests that require Cortex-M4. - "inlineasm/asmfpaddsub.py", - "inlineasm/asmfpcmp.py", - "inlineasm/asmfpldrstr.py", - "inlineasm/asmfpmuldiv.py", - "inlineasm/asmfpsqrt.py", + "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 @@ -664,17 +664,17 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): # Check if @micropython.asm_thumb supports Thumb2 instructions, and skip such tests if it doesn't output = run_feature_check(pyb, args, "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") + skip_tests.add("inlineasm/thumb/asmbcc.py") + 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/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") @@ -1215,15 +1215,15 @@ the last matching regex is used: ) if args.platform == "pyboard": # run pyboard tests - test_dirs += ("float", "stress", "inlineasm", "ports/stm32") + test_dirs += ("float", "stress", "inlineasm/thumb", "ports/stm32") elif args.platform == "mimxrt": - test_dirs += ("float", "stress", "inlineasm") + test_dirs += ("float", "stress", "inlineasm/thumb") elif args.platform == "renesas-ra": - test_dirs += ("float", "inlineasm", "ports/renesas-ra") + test_dirs += ("float", "inlineasm/thumb", "ports/renesas-ra") elif args.platform == "rp2": test_dirs += ("float", "stress", "thread", "ports/rp2") if "arm" in args.mpy_cross_flags: - test_dirs += ("inlineasm",) + test_dirs += ("inlineasm/thumb",) elif args.platform == "esp32": test_dirs += ("float", "stress", "thread") elif args.platform in ("esp8266", "minimal", "samd", "nrf"): @@ -1245,7 +1245,7 @@ the last matching regex is used: elif args.platform == "qemu": test_dirs += ( "float", - "inlineasm", + "inlineasm/thumb", "ports/qemu", ) elif args.platform == "webassembly":