Debian Codegraph @

tests/40-noise.test

raw
1 #!/bin/bash
2
3 flags="$*"
4 [ -z "$flags" ] && flags="1200"
5
6 let count=0
7 let fail=0
8
9 function try_tx_rx_noise
10 {
11 a="$1"
12 echo -n "$a "
13 let count++
14 ./self-test testdata-ascii.txt \
15 $flags --volume 0.5 \
16 -- \
17 $flags --Xrxnoise $noise --rx-one || let fail++
18 }
19
20 for noise in 0.00 0.05 0.10 0.50
21 do
22 try_tx_rx_noise "$noise"
23 done
24
25 if [ $fail -eq 0 ]
26 then
27 echo " (all $count noise tests passed)"
28 else
29 echo " ($fail/$count noise tests failed)"
30 fi
31 exit $fail