X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/4a896b80a58599689b2e9158534a57bb42b399a4..20b3deb1d2a53e85261e1db2d30ff1a7140be018:/gw-tests/lib.sh diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index cacde47..aa05a26 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -30,8 +30,6 @@ sshgw() { } cleanupgw() { - # Set can interfaces up - sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done' sshgw 'cangw -F' } @@ -84,12 +82,20 @@ _run() { cd $dir echo "Working directory: $dir" if [[ ! "$OPT_PLOT_ONLY" ]]; then + # Remove data from the last measurement rm -rf * + # Set can interfaces up + sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done' + # Delete all vcan interfaces + sshgw 'for dev in $(ip l|grep -o vcan[^:]\\+); do ip link del dev $dev; done' cleanupgw + main cp $script . fi - _plot + if [[ ! "$OPT_PLOT_DISABLE" ]]; then + _plot + fi done }