0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-02-16 22:37:35 +00:00

🧑‍💻Improve make tests-all-local (#27040)

* Sleep 5 seconds between platforms

* Inform users if they need to install pyyaml

* Fix old workflow name

* Skip linux_native on Darwin
This commit is contained in:
Jason Smith 2024-05-02 06:36:24 -07:00 committed by GitHub
parent b5307aaaad
commit 39f53c3f8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View file

@ -55,9 +55,18 @@ tests-single-local-docker:
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
tests-all-local:
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
continue ; \
fi ; \
echo "Running tests for $$TEST_TARGET" ; \
run_tests . $$TEST_TARGET || exit 1 ; \
sleep 5; \
done
tests-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi

View file

@ -5,7 +5,7 @@ Extract the builds used in Github CI, so that we can run them locally
import yaml
# Set the yaml file to parse
yaml_file = '.github/workflows/test-builds.yml'
yaml_file = '.github/workflows/ci-build-tests.yml'
# Parse the yaml file, and load it into a dictionary (github_configuration)
with open(yaml_file) as f: