Debian Codegraph @

tests/21-rate-slop.test

raw
1 #!/bin/bash
2
3 let rx_rate=300
4
5 let count=0
6 let fail=0
7
8 function try_tx_rx_rate
9 {
10 txr=$1
11 echo -n "$txr "
12 let count++
13 ./self-test testdata-ascii.txt $txr -- $rx_rate || let fail++
14 }
15
16 # for adj in -8 -5 -3 -2 -1 0 +1 +2 +3 +5 +8
17 for adj in -8 -1 0 +1 +8
18 do
19 let tx_rate="rx_rate + adj"
20 try_tx_rx_rate $tx_rate
21 done
22
23 if [ $fail -eq 0 ]
24 then
25 echo " (all $count rate-slop tests passed)"
26 else
27 echo " ($fail/$count rate-slop tests failed)"
28 fi
29 exit $fail