Skip to content

Commit

Permalink
Update test scripts to error on unknown (MarlinFirmware#16229)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffeb3 authored and thinkyhead committed Dec 20, 2019
1 parent d81de7f commit 70325a6
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 25 deletions.
4 changes: 4 additions & 0 deletions Marlin/src/HAL/HAL_LPC1768/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@
#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
#endif

#if ENABLED(BAUD_RATE_GCODE)
#error "BAUD_RATE_GCODE is not yet supported on LPC176x."
#endif
12 changes: 7 additions & 5 deletions buildroot/bin/opt_disable
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash

SED=$(which gsed || which sed)
# exit on first failure
set -e

for opt in "$@" ; do
eval "${SED} -i 's/\([[:blank:]]*\)\(#define \b${opt}\b\)/\1\/\/\2/g' Marlin/Configuration.h"
done
SED=$(which gsed || which sed)

for opt in "$@" ; do
eval "${SED} -i 's/\([[:blank:]]*\)\(#define \b${opt}\b\)/\1\/\/\2/g' Marlin/Configuration_adv.h"
# Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648
eval "${SED} -i '/\([[:blank:]]*\)\(\/\/\)*\([[:blank:]]*\)\(#define \b${opt}\b\)/{s//\1\3\/\/\4/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" ||
eval "${SED} -i '/\([[:blank:]]*\)\(\/\/\)*\([[:blank:]]*\)\(#define \b${opt}\b\)/{s//\1\3\/\/\4/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" ||
(echo "ERROR: opt_disable Can't find ${opt}" >&2 && exit 9)
done
12 changes: 7 additions & 5 deletions buildroot/bin/opt_enable
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash

SED=$(which gsed || which sed)
# exit on first failure
set -e

for opt in "$@" ; do
eval "${SED} -i 's/\/\/[[:blank:]]*\(#define \b${opt}\b\)/\1/g' Marlin/Configuration.h"
done
SED=$(which gsed || which sed)

for opt in "$@" ; do
eval "${SED} -i 's/\/\/[[:blank:]]*\(#define \b${opt}\b\)/\1/g' Marlin/Configuration_adv.h"
# Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648
eval "${SED} -i '/\(\/\/\)*[[:blank:]]*\(#define \b${opt}\b\)/{s//\2/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" ||
eval "${SED} -i '/\(\/\/\)*[[:blank:]]*\(#define \b${opt}\b\)/{s//\2/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" ||
(echo "ERROR: opt_enable Can't find ${opt}" >&2 && exit 9)
done
9 changes: 7 additions & 2 deletions buildroot/bin/opt_set
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash

# exit on first failure
set -e

SED=$(which gsed || which sed)

eval "${SED} -E -i 's/(\/\/)?(#define \b${1}\b).*$/\2 ${2}/g' Marlin/Configuration.h"
eval "${SED} -E -i 's/(\/\/)?(#define \b${1}\b).*$/\2 ${2}/g' Marlin/Configuration_adv.h"
# Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648
eval "${SED} -i '/\(\/\/\)*\([[:blank:]]*\)\(#define \b${1}\b\).*$/{s//\2\3 ${2}/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" ||
eval "${SED} -i '/\(\/\/\)*\([[:blank:]]*\)\(#define \b${1}\b\).*$/{s//\2\3 ${2}/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" ||
(echo "ERROR: opt_set Can't find ${1}" >&2 && exit 9)
3 changes: 2 additions & 1 deletion buildroot/bin/pins_set
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ PIN=$2
VAL=$3

SED=$(which gsed || which sed)
eval "${SED} -E -i 's/(\/\/)?(#define +${PIN}\b).*$/\2 ${VAL}/g' Marlin/src/pins/$DIR/pins_${NAM}.h"
eval "${SED} -i '/\(\/\/\)*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/$DIR/pins_${NAM}.h" ||
(echo "ERROR: pins_set Can't find ${PIN}" >&2 && exit 9)
2 changes: 1 addition & 1 deletion buildroot/share/tests/LPC1768-tests
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set -e

restore_configs
opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
opt_enable VIKI2 SDSUPPORT SERIAL_PORT2 NEOPIXEL_LED BAUD_RATE_GCODE
opt_enable VIKI2 SDSUPPORT SERIAL_PORT_2 NEOPIXEL_LED
opt_set NEOPIXEL_PIN P1_16
exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), NeoPixel"

Expand Down
8 changes: 4 additions & 4 deletions buildroot/share/tests/LPC1769-tests
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ opt_enable VIKI2 SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \
FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE BAUD_RATE_GCODE \
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \
LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA
opt_set GRID_MAX_POINTS_X 16
exec_test $1 $2 "Smoothieboard with many features"
Expand All @@ -33,8 +33,8 @@ exec_test $1 $2 "Smoothieboard with many features"
# AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS \
# FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR FAN_SOFT_PWM \
# SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME \
# SD_ABORT_ON_ENDSTOP_HIT ADVANCED_OK GCODE_MACROS BAUD_RATE_GCODE \
# VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL \
# SD_ABORT_ON_ENDSTOP_HIT ADVANCED_OK GCODE_MACROS \
# VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS \
# EXTRA_FAN_SPEED FWRETRACT MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
#opt_set FAN_MIN_PWM 50
#opt_set FAN_KICKSTART_TIME 100
Expand All @@ -47,7 +47,7 @@ opt_set MOTHERBOARD BOARD_COHESION3D_REMIX
opt_set X_DRIVER_TYPE TMC2130
opt_set Y_DRIVER_TYPE TMC2130
opt_set Z_DRIVER_TYPE TMC2130
opt_enable AUTO_BED_LEVELING_BILINEAR EEPROM_SETTINGS EEPROM_CHITCHAT BAUD_RATE_GCODE \
opt_enable AUTO_BED_LEVELING_BILINEAR EEPROM_SETTINGS EEPROM_CHITCHAT \
TMC_USE_SW_SPI MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z HYBRID_THRESHOLD \
SENSORLESS_PROBING X_STALL_SENSITIVITY Y_STALL_SENSITIVITY Z_STALL_SENSITIVITY TMC_DEBUG
opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN PSU_CONTROL
Expand Down
4 changes: 2 additions & 2 deletions buildroot/share/tests/esp32-tests
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set -e
restore_configs
opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32
opt_enable WIFISUPPORT GCODE_MACROS BAUD_RATE_GCODE
opt_set "WIFI_SSID \"ssid\""
opt_set "WIFI_PWD \"password\""
opt_set WIFI_SSID "\"ssid\""
opt_set WIFI_PWD "\"password\""
opt_set TX_BUFFER_SIZE 64
opt_add WEBSUPPORT
exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT"
Expand Down
8 changes: 5 additions & 3 deletions buildroot/share/tests/megaatmega2560-tests
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ opt_set LCD_LANGUAGE de
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT \
ULTIMAKERCONTROLLER SDSUPPORT PCA9632 LCD_INFO_MENU \
AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY LCD_BED_LEVELING G26_MESH_VALIDATION MESH_EDIT_MENU \
M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR \
M100_FREE_MEMORY_WATCHER \
INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT EXPERIMENTAL_I2CBUS \
NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE \
ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES \
PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 M114_DETAIL
opt_add M100_FREE_MEMORY_DUMPER
opt_add M100_FREE_MEMORY_CORRUPTOR
opt_set PWM_MOTOR_CURRENT "{ 1300, 1300, 1250 }"
opt_set I2C_SLAVE_ADDRESS 63
exec_test $1 $2 "MINIRAMBO | Ultimaker LCD | M100 | PWM_MOTOR_CURRENT | PRINTCOUNTER | Advanced Pause ..."
Expand Down Expand Up @@ -179,7 +181,7 @@ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \
FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR \
SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \
SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \
VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL EXTRA_FAN_SPEED FWRETRACT
VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT
opt_set FAN_MIN_PWM 50
opt_set FAN_KICKSTART_TIME 100
opt_set XY_FREQUENCY_LIMIT 15
Expand Down Expand Up @@ -295,7 +297,7 @@ exec_test $1 $2 "Full-featured CR-10S config"
# Delta Config (generic) + ABL bilinear + BLTOUCH
use_example_configs delta/generic
opt_set LCD_LANGUAGE cz
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH BLTOUCH_FORCE_5V_MODE
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH
exec_test $1 $2 "RAMPS | DELTA | RRD LCD | ABL Bilinear | BLTOUCH"

#
Expand Down
4 changes: 2 additions & 2 deletions config/default/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
//#define PSU_POWERUP_DELAY 100 // (ms) Delay for the PSU to warm up to full power

//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
#if ENABLED(AUTO_POWER_CONTROL)
#define AUTO_POWER_FANS // Turn on PSU if fans need power
#define AUTO_POWER_FANS // Turn on PSU if fans need power
#define AUTO_POWER_E_FANS
#define AUTO_POWER_CONTROLLERFAN
#define AUTO_POWER_CHAMBER_FAN
Expand Down

0 comments on commit 70325a6

Please sign in to comment.