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
This commit is contained in:
parent
00aab9f01d
commit
448a040f9a
|
|
@ -65,8 +65,8 @@
|
||||||
//#define Y_INVERT_MAX
|
//#define Y_INVERT_MAX
|
||||||
//#define Y_INVERT_ENABLE
|
//#define Y_INVERT_ENABLE
|
||||||
|
|
||||||
// #define Z_STEP_PIN PB_5
|
//#define Z_STEP_PIN PB_5
|
||||||
// #define Z_DIR_PIN PA_8
|
//#define Z_DIR_PIN PA_8
|
||||||
//#define Z_MIN_PIN PA_7
|
//#define Z_MIN_PIN PA_7
|
||||||
//#define Z_MAX_PIN DIO31
|
//#define Z_MAX_PIN DIO31
|
||||||
//#define Z_ENABLE_PIN PA_9
|
//#define Z_ENABLE_PIN PA_9
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,12 @@ git ls-files "config/*.h" | while read IN; do
|
||||||
perl -p0 -e 's#/\*.*?\*/##sg' "${IN}" > "${OUT}.cmp"
|
perl -p0 -e 's#/\*.*?\*/##sg' "${IN}" > "${OUT}.cmp"
|
||||||
|
|
||||||
# Fail if the result is different except in whitespace.
|
# 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 "Configtool integrity test failed on file ${IN}"
|
||||||
echo " Executed: ./configtool.py --load=\"${IN}\" --save=\"${OUT}\" --quit"
|
echo " Executed: ./configtool.py --load=\"${IN}\" --save=\"${OUT}\" --quit"
|
||||||
echo " Expected resulting settings to match, but they do not."
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue