My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env bash
  2. export PATH="$PATH:$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"
  3. export PATH="$PATH:./buildroot/bin"
  4. # exit on first failure
  5. set -e
  6. exec_test () {
  7. printf "\n\033[0;32m[Test $2] \033[0m$3...\n"
  8. if build_marlin_pio $1 "-e $2"; then
  9. printf "\033[0;32mPassed\033[0m\n"
  10. return 0
  11. else
  12. env_restore
  13. printf "\033[0;31mFailed!\033[0m\n"
  14. return 1
  15. fi
  16. }
  17. export -f exec_test
  18. printf "Running \033[0;32m$2\033[0m Tests\n"
  19. if [[ $3 = "--deep-clean" ]]; then
  20. echo "Deleting all PlatformIO caches, downloads and installed packages..."
  21. env_clean --deep
  22. fi
  23. if [[ $2 = "ALL" ]]; then
  24. dir_list=("$(dirname "${BASH_SOURCE[0]}")"/*)
  25. declare -a tests=(${dir_list[@]/*start_tests/})
  26. for f in "${tests[@]}"; do
  27. env_backup
  28. testenv=$(basename $f | cut -d"_" -f1)
  29. printf "Running \033[0;32m$f\033[0m Tests\n"
  30. exec_test $1 "$testenv --target clean" "Setup Build Environment"
  31. $f $1 $testenv
  32. env_restore
  33. done
  34. else
  35. env_backup
  36. exec_test $1 "$2 --target clean" "Setup Build Environment"
  37. $2_tests $1 $2
  38. env_restore
  39. fi
  40. printf "\033[0;32mAll tests completed successfully\033[0m\n"