From efa175820f2e379b569ae01cdc422a8ef12c1f4d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 27 Mar 2025 20:55:59 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Allow=20for?= =?UTF-8?q?=20tests=20on=20macOS=20/=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- Marlin/src/pins/pins.h | 2 +- buildroot/share/PlatformIO/scripts/collect-code-tests.py | 6 +++--- buildroot/share/PlatformIO/scripts/preflight-checks.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 83b27e566a..23826497b6 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ help: @echo "make tests-all-local-docker : Run all tests locally, using docker" @echo "make unit-test-single-local : Run unit tests for a single config locally" @echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker" - @echo "make unit-test-all-local : Run all code tests locally" + @echo "make unit-test-all-local : Run all code tests locally" @echo "make unit-test-all-local-docker : Run all code tests locally, using docker" @echo "make setup-local-docker : Setup local docker using buildx" @echo "" diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 01ff13f8c2..55dc00c60d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -985,7 +985,7 @@ // #elif MB(SIMULATED) - #include "native/pins_RAMPS_NATIVE.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release + #include "native/pins_RAMPS_NATIVE.h" // Native or Simulation lin:linux_native lin:simulator_linux_debug lin:simulator_linux_release lin:linux_native_test mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows #else diff --git a/buildroot/share/PlatformIO/scripts/collect-code-tests.py b/buildroot/share/PlatformIO/scripts/collect-code-tests.py index 576e3dd06d..62f95f4b4b 100644 --- a/buildroot/share/PlatformIO/scripts/collect-code-tests.py +++ b/buildroot/share/PlatformIO/scripts/collect-code-tests.py @@ -1,6 +1,6 @@ # # collect-code-tests.py -# Convenience script to collect all code tests. Used by env:linux_native_test in native.ini. +# Convenience script to collect all code tests. Used by test envs in native.ini. # import pioutil @@ -32,7 +32,7 @@ if pioutil.is_pio_build(): "restore_configs", f"cp -f {path} ./Marlin/config.ini", "python ./buildroot/share/PlatformIO/scripts/configuration.py", - f"platformio test -e linux_native_test -f {name}", + f"platformio test -e {env['PIOENV']} -f {name}", "restore_configs", ], title = "Marlin: {}".format(name.lower().title().replace("_", " ")), @@ -46,7 +46,7 @@ if pioutil.is_pio_build(): name = "test-marlin", dependencies = None, actions = [ - f"platformio run -t marlin_{name} -e linux_native_test" + f"platformio run -t marlin_{name} -e {env['PIOENV']}" for name in targets ], title = "Marlin: Test all code test suites", diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index 94b39927e0..ea642809d5 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -95,7 +95,7 @@ if pioutil.is_pio_build(): # 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": + if not result and not build_env.endswith("_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)