From 9481667c16efad391c67e436b242d3e844089c08 Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Fri, 10 Jun 2011 18:03:52 -0700 Subject: [PATCH] test suite restructure --- src/run-test | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/run-test b/src/run-test index 335ff22..f95abc7 100755 --- a/src/run-test +++ b/src/run-test @@ -17,18 +17,22 @@ let nfail=0 for i in ../testdata/*/*.wav do + dir="${i%/*}" + f="${i##*/}" rate="${f#*-}" rate="${rate%%-*}" - echo TEST ./minimodem "$i" "$rate" - ./minimodem "$i" "$rate" >$TMPDIR/out 2>$TMPDIR/err + txtnum="${i##*/}" + txtnum="${txtnum%%-*}" + + echo TEST ./minimodem "$rate" "$i" + ./minimodem "$rate" "$i" >$TMPDIR/out 2>$TMPDIR/err t="${f%%-*}" egrep 'CARRIER|TONE' $TMPDIR/err -# sum -r ../testdata/$t-*.txt $TMPDIR/out - cmp ../testdata/$t-*.txt $TMPDIR/out + cmp $dir/${txtnum}-*.txt $TMPDIR/out if [ $? -eq 0 ] then echo "@@@ PASS $f"