Display a useful command to repeat a test if one fails.

This commit is contained in:
David Given
2024-04-30 23:07:10 +02:00
parent 0611728537
commit 3e053b32e2

View File

@@ -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
@@ -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