Update platform tests to use '.test' folder
This commit is contained in:
parent
18f1af2dca
commit
05dc79e78d
@ -53,11 +53,11 @@ jobs:
|
|||||||
# Generate custom version include
|
# Generate custom version include
|
||||||
generate_version_header_for_marlin ./Marlin/src/inc
|
generate_version_header_for_marlin ./Marlin/src/inc
|
||||||
cat ./Marlin/src/inc/_Version.h
|
cat ./Marlin/src/inc/_Version.h
|
||||||
|
|
||||||
#
|
#
|
||||||
# Backup pins_RAMPS.h
|
# Back up the environment
|
||||||
#
|
|
||||||
cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
|
|
||||||
#
|
#
|
||||||
|
env_backup
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# Build all sample configurations
|
# Build all sample configurations
|
||||||
@ -279,6 +279,10 @@ jobs:
|
|||||||
# Remove temp files from dependencies tree prior to caching
|
# Remove temp files from dependencies tree prior to caching
|
||||||
rm -rf ~/Marlin/.piolibdeps/_tmp_*
|
rm -rf ~/Marlin/.piolibdeps/_tmp_*
|
||||||
|
|
||||||
|
#
|
||||||
|
# Restore the environment
|
||||||
|
#
|
||||||
|
env_restore
|
||||||
|
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
[ -z "$1" ] || cd $1
|
[ -z "$1" ] || cd $1
|
||||||
|
|
||||||
if [ -d ".test" ]; then
|
if [ -d .test ]; then
|
||||||
printf "\033[0;31mEnvironment backup already exists!\033[0m\n"
|
printf "\033[0;31mEnvironment backup already exists!\033[0m\n"
|
||||||
else
|
else
|
||||||
mkdir .test
|
mkdir .test
|
||||||
|
cp -r Marlin/src/pins .test/pins
|
||||||
cp Marlin/Configuration*.h .test/
|
cp Marlin/Configuration*.h .test/
|
||||||
[ -f Marlin/_Bootscreen.h ] && cp Marlin/_Bootscreen.h .test/
|
[ -f Marlin/_Bootscreen.h ] && cp Marlin/_Bootscreen.h .test/
|
||||||
[ -f Marlin/_Statusscreen.h ] && cp Marlin/_Statusscreen.h .test/
|
[ -f Marlin/_Statusscreen.h ] && cp Marlin/_Statusscreen.h .test/
|
||||||
cp -r Marlin/src/pins .test/pins
|
|
||||||
printf "\033[0;32mEnvironment Backup created\033[0m\n"
|
printf "\033[0;32mEnvironment Backup created\033[0m\n"
|
||||||
fi
|
fi
|
||||||
|
@ -2,25 +2,10 @@
|
|||||||
|
|
||||||
[ -z "$1" ] || cd $1
|
[ -z "$1" ] || cd $1
|
||||||
|
|
||||||
if [ -d ".test" ]; then
|
cp Marlin/src/config/default/* Marlin/
|
||||||
cp .test/Configuration*.h Marlin/
|
[ -f Marlin/_Bootscreen.h ] && rm Marlin/_Bootscreen.h
|
||||||
rm .test/Configuration*.h
|
[ -f Marlin/_Statusscreen.h ] && rm Marlin/_Statusscreen.h
|
||||||
|
[ -d .test/pins ] && { cp .test/pins/* Marlin/src/pins/ ; rm -rf .test/pins ; }
|
||||||
|
[ -d .test ] && rm -r .test
|
||||||
|
|
||||||
if [ -f .test/_Bootscreen.h ]; then
|
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
||||||
cp .test/_Bootscreen.h Marlin/
|
|
||||||
rm .test/_Bootscreen.h
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f .test/_Statusscreen.h ]; then
|
|
||||||
cp .test/_Statusscreen.h Marlin/
|
|
||||||
rm .test/_Statusscreen.h
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -r .test/pins Marlin/src
|
|
||||||
rm -r .test/pins
|
|
||||||
|
|
||||||
rmdir .test
|
|
||||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
|
||||||
else
|
|
||||||
printf "\033[0;31mEnvironment Backup not available!\033[0m\n"
|
|
||||||
fi
|
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# restore_configs
|
||||||
|
#
|
||||||
|
# Restore default configs, delete pins backup and dogm bitmaps
|
||||||
|
#
|
||||||
|
|
||||||
cp Marlin/src/config/default/Configuration.h Marlin/Configuration.h
|
# Restore the (possibly modified) Configurations
|
||||||
cp Marlin/src/config/default/Configuration_adv.h Marlin/Configuration_adv.h
|
[ -d ".test" -a -f ".test/Configuration.h" ] && cp .test/Configuration*.h Marlin/
|
||||||
|
|
||||||
if [ -f Marlin/src/pins/pins_RAMPS.h.backup ]; then
|
# Restore the original unmodified pins
|
||||||
cp Marlin/src/pins/pins_RAMPS.h.backup Marlin/src/pins/pins_RAMPS.h
|
[ -d ".test/pins" ] && cp -r .test/pins Marlin/src/pins/
|
||||||
rm Marlin/src/pins/pins_RAMPS.h.backup
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f Marlin/_Bootscreen.h ]; then
|
# Delete DOGM bitmaps
|
||||||
rm Marlin/_Bootscreen.h
|
rm -f Marlin/_*screen.h
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f Marlin/_Statusscreen.h ]; then
|
|
||||||
rm Marlin/_Statusscreen.h
|
|
||||||
fi
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
|
cp Marlin/Configuration*.h .test/
|
||||||
cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
|
|
||||||
|
@ -3,9 +3,14 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
restore_configs
|
env_backup
|
||||||
|
|
||||||
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
|
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
|
||||||
|
update_defaults
|
||||||
|
|
||||||
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS
|
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS
|
||||||
opt_set E0_AUTO_FAN_PIN 8
|
opt_set E0_AUTO_FAN_PIN 8
|
||||||
opt_set EXTRUDER_AUTO_FAN_SPEED 100
|
opt_set EXTRUDER_AUTO_FAN_SPEED 100
|
||||||
exec_test $1 $2 "RAMPS4DUE_EFB S_CURVE_ACCELERATION EEPROM_SETTINGS"
|
exec_test $1 $2 "RAMPS4DUE_EFB S_CURVE_ACCELERATION EEPROM_SETTINGS"
|
||||||
|
|
||||||
|
env_restore
|
||||||
|
@ -3,8 +3,11 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
restore_configs
|
env_backup
|
||||||
|
|
||||||
opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
|
opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
|
||||||
|
update_defaults
|
||||||
|
|
||||||
exec_test $1 $2 "Build Re-ARM Default Configuration"
|
exec_test $1 $2 "Build Re-ARM Default Configuration"
|
||||||
|
|
||||||
restore_configs
|
restore_configs
|
||||||
@ -60,5 +63,4 @@ opt_enable FAN_SOFT_PWM SDSUPPORT
|
|||||||
opt_enable USE_XMAX_PLUG
|
opt_enable USE_XMAX_PLUG
|
||||||
exec_test $1 $2 "MKS SBASE Many less common options"
|
exec_test $1 $2 "MKS SBASE Many less common options"
|
||||||
|
|
||||||
#clean up
|
env_restore
|
||||||
restore_configs
|
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
restore_configs
|
env_backup
|
||||||
|
|
||||||
opt_set MOTHERBOARD BOARD_STM32F1R
|
opt_set MOTHERBOARD BOARD_STM32F1R
|
||||||
|
update_defaults
|
||||||
|
|
||||||
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT
|
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT
|
||||||
exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT"
|
exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT"
|
||||||
|
|
||||||
#cleanup
|
env_restore
|
||||||
restore_configs
|
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
#
|
env_backup
|
||||||
# Backup pins_RAMPS.h
|
|
||||||
#
|
|
||||||
cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
|
|
||||||
#
|
#
|
||||||
# Build with the default configurations
|
# Build with the default configurations
|
||||||
#
|
#
|
||||||
restore_configs
|
|
||||||
exec_test $1 $2 "Default Configuration"
|
exec_test $1 $2 "Default Configuration"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
|
# Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
|
||||||
# Test a "Fix Mounted" Probe with Safe Homing, some arc options,
|
# Test a "Fix Mounted" Probe with Safe Homing, some arc options,
|
||||||
@ -311,5 +309,4 @@ exec_test $1 $2 "TMC2208 Config"
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
#clean up
|
env_restore
|
||||||
restore_configs
|
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# start_tests
|
||||||
|
#
|
||||||
|
# Run one or more tests
|
||||||
|
#
|
||||||
|
|
||||||
export PATH="$PATH:$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"
|
export PATH="$PATH:$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"
|
||||||
export PATH="$PATH:./buildroot/bin"
|
export PATH="$PATH:./buildroot/bin"
|
||||||
|
|
||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
exec_test () {
|
exec_test() {
|
||||||
printf "\033[0;32m[Test $2] \033[0m$3... "
|
printf "\033[0;32m[Test $2] \033[0m$3... "
|
||||||
if build_marlin_pio $1 "-e $2"; then
|
if build_marlin_pio $1 "-e $2"; then
|
||||||
printf "\033[0;32mPassed\033[0m\n"
|
printf "\033[0;32mPassed\033[0m\n"
|
||||||
@ -18,9 +24,6 @@ exec_test () {
|
|||||||
}
|
}
|
||||||
export -f exec_test
|
export -f exec_test
|
||||||
|
|
||||||
env_backup
|
|
||||||
printf "Running \033[0;32m$2\033[0m Tests\n"
|
|
||||||
|
|
||||||
if [[ $3 = "--deep-clean" ]]; then
|
if [[ $3 = "--deep-clean" ]]; then
|
||||||
echo "Deleting all PlatformIO caches, downloads and installed packages..."
|
echo "Deleting all PlatformIO caches, downloads and installed packages..."
|
||||||
env_clean --deep
|
env_clean --deep
|
||||||
@ -36,8 +39,9 @@ if [[ $2 = "ALL" ]]; then
|
|||||||
$f $1 $testenv
|
$f $1 $testenv
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
printf "Running \033[0;32m$2\033[0m Tests\n"
|
||||||
exec_test $1 "$2 --target clean" "Setup Build Environment"
|
exec_test $1 "$2 --target clean" "Setup Build Environment"
|
||||||
$2_tests $1 $2
|
$2_tests $1 $2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\033[0;32mAll tests completed successfully\033[0m\n"
|
printf "\033[0;32mAll tests completed successfully\033[0m\n"
|
||||||
env_restore
|
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
restore_configs
|
env_backup
|
||||||
|
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
||||||
cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
|
update_defaults
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test Teensy3.5 with default config
|
# Test Teensy3.5 with default config
|
||||||
#
|
#
|
||||||
@ -92,5 +94,4 @@ opt_add_adv Z2_MAX_PIN 2
|
|||||||
opt_enable USE_XMAX_PLUG
|
opt_enable USE_XMAX_PLUG
|
||||||
exec_test $1 $2 "Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS"
|
exec_test $1 $2 "Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS"
|
||||||
|
|
||||||
#cleanup
|
env_restore
|
||||||
restore_configs
|
|
||||||
|
Loading…
Reference in New Issue
Block a user