From d4ce82136d08dd3a15b0832517ce1d3cab2e2870 Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Sun, 24 Apr 2016 09:39:32 -0700 Subject: [PATCH] tests: use cmp not md5sum for tx-consistency tests OS X doesn't provide md5sum. https://github.com/kamalmostafa/minimodem/issues/24#issuecomment-213816836 --- tests/16-verify-tx-consistent.test | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/16-verify-tx-consistent.test b/tests/16-verify-tx-consistent.test index 8974bb7..f1ea2ea 100755 --- a/tests/16-verify-tx-consistent.test +++ b/tests/16-verify-tx-consistent.test @@ -19,32 +19,22 @@ trap "rm -f $TMPF.*" 0 set -e $MINIMODEM --tx --file $TMPF.1.wav $minimodem_tx_args < "$textfile" -sum1=$(md5sum -b < $TMPF.1.wav) -echo "$sum1 $TMPF.1.wav" - sleep 1 - $MINIMODEM --tx --file $TMPF.2.wav $minimodem_tx_args < "$textfile" -sum2=$(md5sum -b < $TMPF.2.wav) -echo "$sum2 $TMPF.2.wav" - sleep 1 - $MINIMODEM --tx --file $TMPF.3.wav $minimodem_tx_args < "$textfile" -sum3=$(md5sum -b < $TMPF.3.wav) -echo "$sum3 $TMPF.3.wav" -[ "$sum1" == "$sum2" ] || { +cmp -s $TMPF.1.wav $TMPF.2.wav || { echo -e "TX-NOT-CONSISTENT" exit 1 } -[ "$sum1" == "$sum3" ] || { +cmp -s $TMPF.1.wav $TMPF.3.wav || { echo -e "TX-NOT-CONSISTENT" exit 1 } -stats="$sum1" +stats="three runs of '--tx $minimodem_tx_args' created identical output" result="OK " exitcode=0