tests: noise testcases

This commit is contained in:
Kamal Mostafa 2012-08-30 00:25:15 -07:00
parent 0c022aca03
commit 23a44ce374
2 changed files with 32 additions and 0 deletions

31
tests/test-40-noise Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
flags="$*"
[ -z "$flags" ] && flags="1200"
let count=0
let fail=0
function try_tx_rx_noise
{
a="$1"
echo -n "$a "
let count++
./self-test testdata-ascii.txt \
$flags --volume 0.5 \
-- \
$flags --Xrxnoise $noise --rx-one || let fail++
}
for noise in 0.00 0.05 0.10 0.50
do
try_tx_rx_noise "$noise"
done
if [ $fail -eq 0 ]
then
echo " (all $count noise tests passed)"
else
echo " ($fail/$count noise tests failed)"
fi
exit $fail

1
tests/test-41-noise-purefreqs Executable file
View File

@ -0,0 +1 @@
exec ./test-40-noise 1200 -M 1200 -S 2400