tests/run-natmodtests.py: Automatically skip tests that are too large. #17738
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This follows a similar change made for
run-tests.py
in PR #17361 / commit 2291045. The change here uses the same logic to detect if a natmod test is too big for the target (eg overflows (I)RAM loading the native .mpy), by printing "START TEST" at the start of the test, and checking if aMemoryError
is raised before that is printed (if so, the test is too large).Typical output from
run-natmodtests.py
is now something like this:and the tests that are too large are reported at the end, and written to the
_result.json
file (using the existing, commoncreate_test_report()
function).Testing
Tested using the command:
with optional
-p
to run on bare-metal.Tested on unix-standard
All existing tests still run and pass:
Tested on
ADAFRUIT_ITSYBITSY_M0_EXPRESS
Prior to this PR:
With this PR:
Tested on ESP8266
With this PR the output is: