From: Michal Sojka Date: Fri, 17 Oct 2014 13:44:11 +0000 (+0200) Subject: Improve continuous tests runner X-Git-Tag: pc-sw-update~7 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/2c56cfb6f9e9fa6c85cb3eddceb036200697f835?hp=869acdaf3491ca1072f6284a260e6e648af2c271 Improve continuous tests runner - Do not run ifup scripts. They restart openssh server and if this happens too often, systemd marks it as failed. - Output newly added out_of_range statistics - Use bc to compare floating point "$avg" - otherwise, there is a warning. Also use herestring syntax (<<<) available in bash and zsh. --- diff --git a/continuous/gw-setup/run.pl b/continuous/gw-setup/run.pl index f31fd55..713f044 100755 --- a/continuous/gw-setup/run.pl +++ b/continuous/gw-setup/run.pl @@ -21,16 +21,17 @@ $exp->expect(120, # Measure latencies my $latester = ' set -e -rm -f tmp-stat.txt echo "Starting latester" -sudo /sbin/ifdown eth0 +rm -f tmp-stat.txt +sudo /sbin/ifdown --no-scripts eth0 r=0 sudo ~/bin/latester -d can0 -d can1 -d can2 -c 3200 -q --oneattime -n tmp || r=$? -sudo /sbin/ifup eth0 +sudo /sbin/ifup --no-scripts eth0 source tmp-stat.txt -for i in sent lost enobufs $(seq -f percentile%g 0 10 100); do keyval="$keyval $i=$((i))"; done +unset keyval +for i in sent lost enobufs out_of_range_below out_of_range_above $(seq -f percentile%g 0 10 100); do keyval="$keyval $i=$((i))"; done echo "! PERF: gw_latency $avg µs $keyval ok" -test $avg -eq 0 && exit 1 +if [ $(bc -l <<< "$avg == 0") -eq 1 ]; then exit 1; fi exit $r ';