chiark / gitweb /
regress: fuzz: change check1fuzz to send stderr to /dev/null
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 30 Nov 2016 18:37:43 +0000 (18:37 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Jun 2020 15:13:02 +0000 (16:13 +0100)
And also be less verbose when the test fails.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/check1fuzz

index 1609008ceddc6866a9a910347fd100374b651e43..578bafb29df8a0fa6a2a1755f9caa0f4f591c5e6 100755 (executable)
@@ -26,6 +26,14 @@ case "$program" in
 *)     program="./$program" ;;
 esac
 
-${program} <"$fuzzfile" >/dev/null
+set +e
+${program} <"$fuzzfile" >/dev/null 2>&1
+rc=$?
+set -e
+
+if [ $rc != 0 ]; then
+       printf >&2 '\nFAIL-%s\n' $fuzzfile
+       exit $rc
+fi
 
 printf "$desc "