Skip to content

Commit

Permalink
Fix test for working gnuplot in reg_wrapper.sh
Browse files Browse the repository at this point in the history
`gnuplot -e "set terminal png"` does not return an error if the
command fails, but prints an error message.

So instead of checking for an error the test now checks for a
non-empty output.

This fixes `make check` on hosts with a gnuplot which does not
support `set terminal png`.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 12, 2024
1 parent bcaa728 commit fa3992f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prog/reg_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case "${TEST_NAME}" in
baseline|boxa[1234]|colormask|colorspace|crop|dna|enhance|extrema|fpix1|hash|italic|kernel|nearline|numa[123]|pixa1|projection|rank|rankbin|rankhisto|wordboxes)
GNUPLOT=$(which gnuplot || which wgnuplot)

if [ -z "${GNUPLOT}" ] || ! "${GNUPLOT}" -e "set terminal png" 2>/dev/null ; then
if [ -z "${GNUPLOT}" ] || [ -n "$(${GNUPLOT} -e 'set terminal png' 2>&1)" ] ; then
exec ${@%${TEST}} /bin/sh -c "exit 77"
fi
esac
Expand Down

0 comments on commit fa3992f

Please sign in to comment.