Add unit testing framework (#26948)

- Add a framework to build and execute unit tests for Marlin.
- Enable unit test execution as part of PR checks.

---------

Co-authored-by: Costas Basdekis <costas.basdekis@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Jason Smith
2024-04-13 12:06:08 -07:00
committed by GitHub
parent cf7c86d581
commit d10861e478
21 changed files with 711 additions and 112 deletions

View File

@ -71,7 +71,9 @@ if pioutil.is_pio_build():
config = env.GetProjectConfig()
result = check_envs("env:"+build_env, board_envs, config)
if not result:
# Make sure board is compatible with the build environment. Skip for _test,
# since the board is manipulated as each unit test is executed.
if not result and build_env != "linux_native_test":
err = "Error: Build environment '%s' is incompatible with %s. Use one of these environments: %s" % \
( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
raise SystemExit(err)