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:
@@ -166,7 +166,8 @@ def run_tests(target_truth, target, args, resolved_arch):
|
|||||||
with open(NATMOD_EXAMPLE_DIR + test_mpy, "rb") as f:
|
with open(NATMOD_EXAMPLE_DIR + test_mpy, "rb") as f:
|
||||||
test_script += b"__buf=" + bytes(repr(f.read()), "ascii") + b"\n"
|
test_script += b"__buf=" + bytes(repr(f.read()), "ascii") + b"\n"
|
||||||
except OSError:
|
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
|
continue
|
||||||
test_script += bytes(injected_import_hook_code.format(test_module), "ascii")
|
test_script += bytes(injected_import_hook_code.format(test_module), "ascii")
|
||||||
test_script += test_file_data
|
test_script += test_file_data
|
||||||
|
|||||||
Reference in New Issue
Block a user