mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 15:49:59 -04:00
Do not strip leading whitespace from test output
The echo_*() and cat_*() functions in bin/tests/system/conf.sh.common
call the "read" builtin command without specifying the field separator
to use. This results in leading whitespace getting stripped from each
line of the texts passed to those functions, which mangles e.g. pytest
output, hindering test failure troubleshooting.
Address by setting IFS to an empty value for the "read" calls used in
the aforementioned helper functions.
(cherry picked from commit fb87022115)
This commit is contained in:
parent
b1063d2de6
commit
17fbf25676
1 changed files with 8 additions and 8 deletions
|
|
@ -181,19 +181,19 @@ then
|
|||
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*"
|
||||
}
|
||||
echo_i() {
|
||||
printf '%s\n' "$*" | while read -r __LINE ; do
|
||||
printf '%s\n' "$*" | while IFS= read -r __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_ic() {
|
||||
printf '%s\n' "$*" | while read -r __LINE ; do
|
||||
printf '%s\n' "$*" | while IFS= read -r __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR: $__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_d() {
|
||||
printf '%s\n' "$*" | while read -r __LINE ; do
|
||||
printf '%s\n' "$*" | while IFS= read -r __LINE ; do
|
||||
echoinfo "D:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
|
@ -218,32 +218,32 @@ else
|
|||
}
|
||||
|
||||
echo_i() {
|
||||
echo "$@" | while read -r __LINE ; do
|
||||
echo "$@" | while IFS= read -r __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_ic() {
|
||||
echo "$@" | while read -r __LINE ; do
|
||||
echo "$@" | while IFS= read -r __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR: $__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_d() {
|
||||
echo "$@" | while read -r __LINE ; do
|
||||
echo "$@" | while IFS= read -r __LINE ; do
|
||||
echoinfo "D:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
cat_i() {
|
||||
while read -r __LINE ; do
|
||||
while IFS= read -r __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
cat_d() {
|
||||
while read -r __LINE ; do
|
||||
while IFS= read -r __LINE ; do
|
||||
echoinfo "D:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue