diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2024-12-22 00:27:03 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-12-23 10:04:19 +1100 |
commit | 7ca6e5eb6815de6f7c2792969b0f66cf306f5b91 (patch) | |
tree | aeda682de7ce5fa08f6358aee5899685733e8c95 /tools | |
parent | 4bf087b272856482c055a6df66ec008f2ca846d0 (diff) | |
download | micropython-7ca6e5eb6815de6f7c2792969b0f66cf306f5b91.tar.gz micropython-7ca6e5eb6815de6f7c2792969b0f66cf306f5b91.zip |
qemu: Add test_natmod target for RV32 and use as part of CI pipeline.
This commit brings the natmod tests in the CI build process for the RV32
platform. Not all example natmods are tested at the moment, as
`features` requires soft-float support, and `btree` needs thread-local
storage support in `mpy_ld.py` when built with the CI's toolchain.
Co-authored-by: Damien George <damien@micropython.org>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/ci.sh b/tools/ci.sh index c67aeed0ce..8d75d7cecf 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -273,6 +273,7 @@ function ci_qemu_setup_arm { } function ci_qemu_setup_rv32 { + ci_mpy_format_setup ci_gcc_riscv_setup sudo apt-get update sudo apt-get install qemu-system @@ -292,6 +293,10 @@ function ci_qemu_build_rv32 { make ${MAKEOPTS} -C mpy-cross make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 submodules make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 test + + # Test building and running native .mpy with rv32imc architecture. + ci_native_mpy_modules_build rv32imc + make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 test_natmod } ######################################################################################## @@ -476,10 +481,14 @@ function ci_native_mpy_modules_build { arch=$1 fi make -C examples/natmod/features1 ARCH=$arch - make -C examples/natmod/features2 ARCH=$arch + if [ $arch != rv32imc ]; then + # This requires soft-float support on rv32imc. + make -C examples/natmod/features2 ARCH=$arch + # This requires thread local storage support on rv32imc. + make -C examples/natmod/btree ARCH=$arch + fi make -C examples/natmod/features3 ARCH=$arch make -C examples/natmod/features4 ARCH=$arch - make -C examples/natmod/btree ARCH=$arch make -C examples/natmod/deflate ARCH=$arch make -C examples/natmod/framebuf ARCH=$arch make -C examples/natmod/heapq ARCH=$arch |