Skip to content

Commit 5676b45

Browse files
committed
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 <[email protected]>
1 parent 63701c2 commit 5676b45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/run-natmodtests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def run_tests(target_truth, target, args, resolved_arch):
166166
with open(NATMOD_EXAMPLE_DIR + test_mpy, "rb") as f:
167167
test_script += b"__buf=" + bytes(repr(f.read()), "ascii") + b"\n"
168168
except OSError:
169-
print("---- {} - mpy file not compiled".format(test_file))
169+
test_results.append((test_file, "skip", "mpy file not compiled"))
170+
print("skip {} - mpy file not compiled".format(test_file))
170171
continue
171172
test_script += bytes(injected_import_hook_code.format(test_module), "ascii")
172173
test_script += test_file_data

0 commit comments

Comments
 (0)