From 5676b45cbb8644f7b04e2a0495c760d905007983 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 11 Jun 2025 19:47:03 +1000 Subject: [PATCH] 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 --- tests/run-natmodtests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run-natmodtests.py b/tests/run-natmodtests.py index b689a07a5b..f9d2074f6f 100755 --- a/tests/run-natmodtests.py +++ b/tests/run-natmodtests.py @@ -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