When a test case fails, there are two echo-s executed: the first
one either prints the error message into /dev/null (default) or
onto stdout (when the test script is executed with -d). Then, the
second one prints the error message onto stdout. While this
technically works, there's nothing ever printed onto stderr which
is usually what's captured. Worse, if some command within the
script fails, it prints something onto stderr but then looking at
meson logs it's needlessly hard to match stderr and stdout lines.
Just print error messages onto stderr.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
input="$4"
if [ ! -e "$input" ]; then
echo "FAIL: could not find $input" >$output
- echo "FAIL: could not find $input"
+ echo "FAIL: could not find $input" >&2
echo " '$extra_args $args': "
errors=$(($errors + 1))
fi
if [ -n "$checkrule" ]; then
if ! grep "$checkrule" "$tmpout" >/dev/null; then
echo "FAIL: missing rule '$checkrule'" >"$output"
+ echo "FAIL: missing rule '$checkrule'" >&2
rule_missing=1
fi
fi