X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/9c847f76e5fb2886dfcaebddeb36e764bf4b3976..108d762321a7e8e3a09948689444d3a5af0c2dd0:/gw-tests/lib.sh diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index ae618fd..63ea760 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -35,9 +35,7 @@ sshgw() { if [[ ! -S $socket ]] || ! ssh -x -a -S $socket root@192.168.2.3 true; then # Create master connection to speed up subsequenct command. - # The ssh is put into background and the connection is closed - # after 10 minutes) - ssh -f -M -S $socket root@192.168.2.3 sleep 600 > /dev/null 2>&1 + ssh -N -f -M -S $socket root@192.168.2.3 >/dev/null 2>&1 fi ssh -x -a -S $socket root@192.168.2.3 "$@" } @@ -107,17 +105,6 @@ kill_load() { _measure() { # Remove data from the last measurement rm -rf * - touch .results - cat > plot.sh <<-EOF - #!/bin/bash - export kvers=$kvers - export hostkvers=$hostkvers - export traffic=$traffic - export load=$load - cd \$(dirname \$0)/$(dirname $script) - exec ./$(basename $script) --plot "\$@" - EOF - chmod +x plot.sh # Kill load generators left possibly from the past runs killall -q ping || : killall -q latester || : @@ -140,6 +127,19 @@ _measure() { start_load main kill_load + + # Create a plot script at the end to signalize that the + # measurement was successfully finished + cat > plot.sh <<-EOF + #!/bin/bash + export kvers=$kvers + export hostkvers=$hostkvers + export traffic=$traffic + export load=$load + cd \$(dirname \$0)/$(dirname $script) + exec ./$(basename $script) --plot "\$@" + EOF + chmod +x plot.sh }