[2.0.x] Debug Travis tests and scripts (#11704)
This commit is contained in:
parent
d0c96ee83e
commit
8c11220042
@ -51,13 +51,13 @@ jobs:
|
|||||||
export PATH=`pwd`/buildroot/bin/:${PATH}
|
export PATH=`pwd`/buildroot/bin/:${PATH}
|
||||||
|
|
||||||
# Generate custom version include
|
# Generate custom version include
|
||||||
generate_version_header_for_marlin ./Marlin/src/inc
|
generate_version ./Marlin/src/inc
|
||||||
cat ./Marlin/src/inc/_Version.h
|
cat ./Marlin/src/inc/_Version.h
|
||||||
|
|
||||||
#
|
#
|
||||||
# Back up the environment
|
# Backup pins_RAMPS.h
|
||||||
|
#
|
||||||
|
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,10 +279,6 @@ 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:
|
||||||
|
@ -45,7 +45,7 @@ before_script:
|
|||||||
- cd ${TRAVIS_BUILD_DIR}
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
#
|
#
|
||||||
# Generate custom version include
|
# Generate custom version include
|
||||||
- generate_version_header_for_marlin ${TRAVIS_BUILD_DIR}/Marlin/src/inc
|
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/src/inc
|
||||||
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
|
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
|
||||||
#
|
#
|
||||||
script:
|
script:
|
||||||
|
@ -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,10 +2,25 @@
|
|||||||
|
|
||||||
[ -z "$1" ] || cd $1
|
[ -z "$1" ] || cd $1
|
||||||
|
|
||||||
cp Marlin/src/config/default/* Marlin/
|
if [ -d ".test" ]; then
|
||||||
[ -f Marlin/_Bootscreen.h ] && rm Marlin/_Bootscreen.h
|
cp .test/Configuration*.h Marlin/
|
||||||
[ -f Marlin/_Statusscreen.h ] && rm Marlin/_Statusscreen.h
|
rm .test/Configuration*.h
|
||||||
[ -d .test/pins ] && { cp .test/pins/* Marlin/src/pins/ ; rm -rf .test/pins ; }
|
|
||||||
[ -d .test ] && rm -r .test
|
|
||||||
|
|
||||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
if [ -f .test/_Bootscreen.h ]; then
|
||||||
|
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,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# generate_version_header_for_marlin
|
#
|
||||||
|
# generate_version
|
||||||
|
#
|
||||||
|
# Make a _Version.h file
|
||||||
|
#
|
||||||
|
|
||||||
DIR="${1}"
|
DIR="${1}"
|
||||||
|
|
||||||
@ -9,13 +13,8 @@ DISTDATE=$(date '+%Y-%m-%d %H:%M')
|
|||||||
BRANCH=$(git -C "${DIR}" symbolic-ref -q --short HEAD)
|
BRANCH=$(git -C "${DIR}" symbolic-ref -q --short HEAD)
|
||||||
VERSION=$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null)
|
VERSION=$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null)
|
||||||
|
|
||||||
if [ -z "${BRANCH}" ]; then
|
[ -z "${BRANCH}" ] && BRANCH=$(echo "${TRAVIS_BRANCH}")
|
||||||
BRANCH=$(echo "${TRAVIS_BRANCH}")
|
[ -z "${VERSION}" ] && VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null)
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${VERSION}" ]; then
|
|
||||||
VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null)
|
|
||||||
fi
|
|
||||||
|
|
||||||
SHORT_BUILD_VERSION=$(echo "${BRANCH}")
|
SHORT_BUILD_VERSION=$(echo "${BRANCH}")
|
||||||
DETAILED_BUILD_VERSION=$(echo "${BRANCH}-${VERSION}")
|
DETAILED_BUILD_VERSION=$(echo "${BRANCH}-${VERSION}")
|
@ -1,15 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
|
||||||
# restore_configs
|
|
||||||
#
|
|
||||||
# Restore default configs, delete pins backup and dogm bitmaps
|
|
||||||
#
|
|
||||||
|
|
||||||
# Restore the (possibly modified) Configurations
|
cp Marlin/src/config/default/Configuration*.h Marlin
|
||||||
[ -d ".test" -a -f ".test/Configuration.h" ] && cp .test/Configuration*.h Marlin/
|
|
||||||
|
|
||||||
# Restore the original unmodified pins
|
[ -f Marlin/src/pins/pins_RAMPS.h.backup ] && 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 -f Marlin/src/pins/pins_RAMPS.h.backup
|
||||||
|
|
||||||
# Delete DOGM bitmaps
|
rm -f Marlin/_Bootscreen.h
|
||||||
rm -f Marlin/_*screen.h
|
rm -f Marlin/_Statusscreen.h
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cp Marlin/Configuration*.h .test/
|
cp Marlin/Configuration*.h Marlin/src/config/default
|
||||||
|
@ -3,14 +3,9 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
env_backup
|
restore_configs
|
||||||
|
|
||||||
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,11 +3,8 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
env_backup
|
restore_configs
|
||||||
|
|
||||||
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
|
||||||
@ -63,4 +60,5 @@ 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"
|
||||||
|
|
||||||
env_restore
|
#clean up
|
||||||
|
restore_configs
|
||||||
|
@ -3,12 +3,10 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
env_backup
|
restore_configs
|
||||||
|
|
||||||
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"
|
||||||
|
|
||||||
env_restore
|
#cleanup
|
||||||
|
restore_configs
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
# 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,
|
||||||
@ -309,4 +311,5 @@ exec_test $1 $2 "TMC2208 Config"
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
env_restore
|
#clean up
|
||||||
|
restore_configs
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
#!/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"
|
||||||
@ -24,6 +18,9 @@ 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
|
||||||
@ -39,9 +36,8 @@ 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,11 +3,9 @@
|
|||||||
# exit on first failure
|
# exit on first failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
env_backup
|
restore_configs
|
||||||
|
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
||||||
update_defaults
|
cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test Teensy3.5 with default config
|
# Test Teensy3.5 with default config
|
||||||
#
|
#
|
||||||
@ -94,4 +92,5 @@ 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"
|
||||||
|
|
||||||
env_restore
|
#cleanup
|
||||||
|
restore_configs
|
||||||
|
Loading…
Reference in New Issue
Block a user