summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-08-12 11:32:28 +1000
committerDamien George <damien@micropython.org>2024-08-28 11:52:08 +1000
commitd9a0fdda9a7b0db55c1115b55bb1b83cd5ce739c (patch)
tree5a87d4ffe4dd8219e5e8303a1d14ba87ab7fb442 /.github
parent8a3842eba7db90af2b29035c5c1ecfd5b140f493 (diff)
downloadmicropython-d9a0fdda9a7b0db55c1115b55bb1b83cd5ce739c.tar.gz
micropython-d9a0fdda9a7b0db55c1115b55bb1b83cd5ce739c.zip
qemu-arm: Rework to provide a REPL and run tests via a pty serial port.
Currently, the qemu-arm (and qemu-riscv) port has two build modes: - a simple test that executes a Python string; and - a full test that uses tinytest to embed all tests within the firmware, then executes that and captures the output. This is very different to all the other ports. A difficulty with using tinytest is that with the large number of tests the firmware overflows its virtual flash size. It's also hard to run tests via .mpy files and with the native emitter. Being different to the other ports also means an extra burden on maintenance. This commit reworks the qemu-arm port so that it has a single build target that creates a standard firmware which has a REPL. When run under qemu-system-arm, the REPL acts like any other bare-metal port, complete with soft reset (use machine.reset() to turn it off and exit qemu-system-arm). This approach gives many benefits: - allows playing with a REPL without hardware; - allows running the test suite as it would on a bare-metal board, by making qemu-system-arm redirect the UART serial of the virtual device to a /dev/pts/xx file, and then running run-tests.py against that serial device; - skipping tests is now done via the logic in `run-tests.py` and no longer needs multiple places to define which tests to skip (`tools/tinytest-codegen.py`, `ports/qemu-arm/tests_profile.txt` and also `tests/run-tests.py`); - allows testing/using mpremote with the qemu-arm port. Eventually the qemu-riscv port would have a similar change. Prior to this commit the test results were: 743 tests ok. (121 skipped) With this commit the test results are: 753 tests performed (22673 individual testcases) 753 tests passed 138 tests skipped More tests are skipped because more are included in the run. But overall more tests pass. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ports_qemu-arm.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/ports_qemu-arm.yml b/.github/workflows/ports_qemu-arm.yml
index db3cd7871d..99750b7535 100644
--- a/.github/workflows/ports_qemu-arm.yml
+++ b/.github/workflows/ports_qemu-arm.yml
@@ -29,4 +29,4 @@ jobs:
run: source tools/ci.sh && ci_qemu_arm_build
- name: Print failures
if: failure()
- run: grep --before-context=100 --text "FAIL" ports/qemu-arm/build/console.out
+ run: tests/run-tests.py --print-failures