🔨 [2.0.9.7] Use older chitu_crypt.py
[Marlin.git] / Makefile
blobebcdf25e2d6a1e1ed1cbc482478bc6d6a7ec0e5a
1 help:
2 @echo "Tasks for local development:"
3 @echo "* tests-single-ci: Run a single test from inside the CI"
4 @echo "* tests-single-local: Run a single test locally"
5 @echo "* tests-single-local-docker: Run a single test locally, using docker-compose"
6 @echo "* tests-all-local: Run all tests locally"
7 @echo "* tests-all-local-docker: Run all tests locally, using docker-compose"
8 @echo "* setup-local-docker: Setup local docker-compose"
9 @echo ""
10 @echo "Options for testing:"
11 @echo " TEST_TARGET Set when running tests-single-*, to select the"
12 @echo " test. If you set it to ALL it will run all "
13 @echo " tests, but some of them are broken: use "
14 @echo " tests-all-* instead to run only the ones that "
15 @echo " run on GitHub CI"
16 @echo " ONLY_TEST Limit tests to only those that contain this, or"
17 @echo " the index of the test (1-based)"
18 @echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
19 @echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
20 @echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
21 .PHONY: help
23 tests-single-ci:
24 export GIT_RESET_HARD=true
25 $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET)
26 .PHONY: tests-single-ci
28 tests-single-local:
29 @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
30 export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
31 && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
32 && run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
33 .PHONY: tests-single-local
35 tests-single-local-docker:
36 @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
37 docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
38 .PHONY: tests-single-local-docker
40 tests-all-local:
41 export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
42 && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
43 && for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
44 .PHONY: tests-all-local
46 tests-all-local-docker:
47 docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
48 .PHONY: tests-all-local-docker
50 setup-local-docker:
51 docker-compose build
52 .PHONY: setup-local-docker