Skip to content

Commit 4ff10b5

Browse files
committed
tests/run-tests.py: Use host arch for mpy-cross for target=unix.
This will make mpy-cross auto-detect. Allow overriding for non-default configurations (e.g. using 32-bit build of the unix port). Also use armv7m by default for qemu-arm (the default qemu target is Cortex-M3). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent beb9b85 commit 4ff10b5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/run-tests.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,8 +918,15 @@ def main():
918918
"renesas-ra",
919919
"rp2",
920920
)
921-
if args.target in LOCAL_TARGETS or args.list_tests:
921+
if args.list_tests:
922+
pyb = None
923+
elif args.target in LOCAL_TARGETS:
922924
pyb = None
925+
if not args.mpy_cross_flags:
926+
if args.target == "unix":
927+
args.mpy_cross_flags = "-march=host"
928+
elif args.target == "qemu-arm":
929+
args.mpy_cross_flags = "-march=armv7m"
923930
elif args.target in EXTERNAL_TARGETS:
924931
global pyboard
925932
sys.path.append(base_path("../tools"))

0 commit comments

Comments
 (0)