diff options
author | Damien George <damien@micropython.org> | 2025-04-28 11:15:32 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-06-05 15:15:31 +1000 |
commit | 229104558fb7f9d283b7302bc3720bc35c5c49cf (patch) | |
tree | 4c16db4a1eff5becb175e252e3a4eb87d792a23f /unix/scripts/upip.py | |
parent | 4c55b0879b38b373b44e84552d6754b7842b5b72 (diff) | |
download | micropython-229104558fb7f9d283b7302bc3720bc35c5c49cf.tar.gz micropython-229104558fb7f9d283b7302bc3720bc35c5c49cf.zip |
tests/run-tests.py: Automatically skip tests that are too large.
Some tests are just too big for targets that don't have much heap memory,
eg `tests/extmod/vfs_rom.py`. Other tests are too large because the target
doesn't have enough IRAM for native code, eg esp8266 running
`tests/micropython/viper_args.py`.
Previously, such tests were explicitly skipped on targets known to have
little memory, eg esp8266. But this doesn't scale to multiple targets, nor
to more and more tests which are too large.
This commit addresses that by adding logic to the test runner so it can
automatically skip tests when they don't fit in the target's memory. It
does this by prepending a `print('START TEST')` to every test, and if a
`MemoryError` occurs before that line is printed then the test was too big.
This works for standard tests, tests that go via .mpy files, and tests that
run in native emitter mode via .mpy files.
For tests that are too big, it prints `lrge <test name>` on the output,
and at the end prints them on a separate line of skipped tests so they can
be distinguished. They are also distinguished in the `_result.json` file
as a skipped test with reason "too large".
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'unix/scripts/upip.py')
0 files changed, 0 insertions, 0 deletions