]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/lib.sh
Add test for filters
[can-benchmark.git] / gw-tests / lib.sh
index f82ea28d855ac6a07a9bdf215a579fd559472832..63ee99d6bfa07ddeb2b7cb40be6f6ae97b8733fc 100644 (file)
@@ -32,8 +32,7 @@ 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'
-    # Delete all GW rules
-    sshgw 'eval $(cangw -L|sed -e s/-A/-D/ -e "s/#.*/;/")'
+    sshgw 'cangw -F'
 }
 
 _plot() {
@@ -77,7 +76,9 @@ _run() {
        dir=$(create_dirs_and_links $(basename $0 .sh) $kvers)
        script=$PWD/$0
        cd $dir
+       echo "Working directory: $dir"
        if [[ ! "$OPT_PLOT_ONLY" ]]; then
+           rm -rf *
            cleanupgw
            main
            cp $script .