Skip to content

Commit 39f53c3

Browse files
authored
🧑‍💻Improve make tests-all-local (MarlinFirmware#27040)
* Sleep 5 seconds between platforms * Inform users if they need to install pyyaml * Fix old workflow name * Skip linux_native on Darwin
1 parent b5307aa commit 39f53c3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,18 @@ tests-single-local-docker:
5555
$(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)"
5656

5757
tests-all-local:
58+
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
5859
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
5960
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
60-
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
61+
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
62+
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
63+
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
64+
continue ; \
65+
fi ; \
66+
echo "Running tests for $$TEST_TARGET" ; \
67+
run_tests . $$TEST_TARGET || exit 1 ; \
68+
sleep 5; \
69+
done
6170

6271
tests-all-local-docker:
6372
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi

buildroot/share/scripts/get_test_targets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import yaml
66

77
# Set the yaml file to parse
8-
yaml_file = '.github/workflows/test-builds.yml'
8+
yaml_file = '.github/workflows/ci-build-tests.yml'
99

1010
# Parse the yaml file, and load it into a dictionary (github_configuration)
1111
with open(yaml_file) as f:

0 commit comments

Comments
 (0)