From 448a040f9a45a2a354d0957635f5ab13a9cf7d87 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 31 Dec 2017 17:26:09 +0100 Subject: [PATCH] check_configtool.sh: don't ignore whitespace entirely. Instead, any amount of whitespace is treated equally. Example of a failure not noticed before: //#define Z_DIR_PIN PA_8 //#define Z_DIR_PINPA_8 --- config/board.cnc-shield-v3-nucleo.h | 4 ++-- testcases/check_configtool.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/board.cnc-shield-v3-nucleo.h b/config/board.cnc-shield-v3-nucleo.h index e43fbb5..9c952fc 100644 --- a/config/board.cnc-shield-v3-nucleo.h +++ b/config/board.cnc-shield-v3-nucleo.h @@ -65,8 +65,8 @@ //#define Y_INVERT_MAX //#define Y_INVERT_ENABLE -// #define Z_STEP_PIN PB_5 -// #define Z_DIR_PIN PA_8 +//#define Z_STEP_PIN PB_5 +//#define Z_DIR_PIN PA_8 //#define Z_MIN_PIN PA_7 //#define Z_MAX_PIN DIO31 //#define Z_ENABLE_PIN PA_9 diff --git a/testcases/check_configtool.sh b/testcases/check_configtool.sh index f9be896..0c00c3e 100755 --- a/testcases/check_configtool.sh +++ b/testcases/check_configtool.sh @@ -27,12 +27,12 @@ git ls-files "config/*.h" | while read IN; do perl -p0 -e 's#/\*.*?\*/##sg' "${IN}" > "${OUT}.cmp" # Fail if the result is different except in whitespace. - if ! diff -qBbw "${OUT}" "${OUT}.cmp" ; then + if ! diff -qBb "${OUT}" "${OUT}.cmp" ; then echo "Configtool integrity test failed on file ${IN}" echo " Executed: ./configtool.py --load=\"${IN}\" --save=\"${OUT}\" --quit" echo " Expected resulting settings to match, but they do not." - diff -uBbw "${OUT}" "${OUT}.cmp" | sed -e 's/^/ /' || : + diff -uBb "${OUT}" "${OUT}.cmp" | sed -e 's/^/ /' || : exit 1 fi done