My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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
  22. tests-single-ci:
  23. export GIT_RESET_HARD=true
  24. $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET)
  25. .PHONY: tests-single-ci
  26. tests-single-local:
  27. @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
  28. chmod +x buildroot/bin/*
  29. chmod +x buildroot/tests/*
  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
  34. tests-single-local-docker:
  35. @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
  36. 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)"
  37. .PHONY: tests-single-local-docker
  38. tests-all-local:
  39. chmod +x buildroot/bin/*
  40. chmod +x buildroot/tests/*
  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
  45. tests-all-local-docker:
  46. docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
  47. .PHONY: tests-all-local-docker
  48. setup-local-docker:
  49. docker-compose build
  50. .PHONY: setup-local-docker