2012-08-18 06:54:29 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
let rx_rate=300
|
|
|
|
|
|
|
|
let count=0
|
|
|
|
let fail=0
|
|
|
|
|
|
|
|
function try_tx_rx_rate
|
|
|
|
{
|
|
|
|
txr=$1
|
|
|
|
echo -n "$txr "
|
|
|
|
let count++
|
|
|
|
./self-test testdata-ascii.txt $txr -- $rx_rate || let fail++
|
|
|
|
}
|
|
|
|
|
2012-08-30 18:00:02 +02:00
|
|
|
# for adj in -8 -5 -3 -2 -1 0 +1 +2 +3 +5 +8
|
|
|
|
for adj in -8 -1 0 +1 +8
|
2012-08-18 06:54:29 +02:00
|
|
|
do
|
|
|
|
let tx_rate="rx_rate + adj"
|
|
|
|
try_tx_rx_rate $tx_rate
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $fail -eq 0 ]
|
|
|
|
then
|
2012-08-20 01:02:21 +02:00
|
|
|
echo " (all $count rate-slop tests passed)"
|
2012-08-18 06:54:29 +02:00
|
|
|
else
|
2012-08-20 01:02:21 +02:00
|
|
|
echo " ($fail/$count rate-slop tests failed)"
|
2012-08-18 06:54:29 +02:00
|
|
|
fi
|
|
|
|
exit $fail
|