tests/run-natmodtests.py: Consider a test skipped if mpy doesn't exist.

This is different to a test not being run because there is no corresponding
natmod at all.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-06-11 19:47:03 +10:00
parent 63701c2e94
commit 5676b45cbb

View File

@@ -166,7 +166,8 @@ def run_tests(target_truth, target, args, resolved_arch):
with open(NATMOD_EXAMPLE_DIR + test_mpy, "rb") as f:
test_script += b"__buf=" + bytes(repr(f.read()), "ascii") + b"\n"
except OSError:
print("---- {} - mpy file not compiled".format(test_file))
test_results.append((test_file, "skip", "mpy file not compiled"))
print("skip {} - mpy file not compiled".format(test_file))
continue
test_script += bytes(injected_import_hook_code.format(test_module), "ascii")
test_script += test_file_data