Skip to content

Commit

Permalink
Display a useful command to repeat a test if one fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Apr 30, 2024
1 parent 0611728 commit 3e053b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/encodedecodetest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ script="$4"
flags="$5"
dir="$6"

srcfile=$dir.$format.src.img
fluxfile=$dir.$format.$ext
destfile=$dir.$format.dest.img
srcfile=$dir/src.img
fluxfile=$dir/flux.$ext
destfile=$dir/dest.img

dd if=/dev/urandom of=$srcfile bs=1048576 count=2 2>&1

Expand All @@ -24,6 +24,8 @@ fi
truncate $srcfile -r $destfile
if ! cmp $srcfile $destfile; then
echo "Comparison failed!" >&2
echo "Run this to repeat:" >&2
echo "./scripts/encodedecodetest.sh \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\"" >&2
exit 1
fi
exit 0
Expand Down

0 comments on commit 3e053b3

Please sign in to comment.