]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge branch 'master' into stylechecker
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 23 Feb 2018 16:21:42 +0000 (11:21 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 23 Feb 2018 16:23:29 +0000 (11:23 -0500)
1  2 
tools/checkpatch.sh

index 930c8e2df6bddb8a56c2ff6ff05ee9955ae04724,73421784fa812b7a42c2917bc7c1ba4cfba4765b..e6110f0c7ac6f16a2fa3889354e2e69d3a6029f3
@@@ -69,20 -69,15 +69,20 @@@ els
    done
    echo "Done."
    for file in /tmp/f1/*_cp; do
 -    echo "Report for $(basename $file _cp)" 1>&2
 -    echo "===============================================" 1>&2
      if [ -a /tmp/f2/$(basename $file) ]; then
-       result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING")
 -      diff $file /tmp/f2/$(basename $file) | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1' 1>&2
++      result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
      else
-       result=$(cat $file | grep -A4 "ERROR\|WARNING")
 -      cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" 1>&2
++      result=$(cat $file | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
      fi
      if [ "$?" -eq "0" ]; then
 -      stat=1
 +      echo "Report for $(basename $file _cp)" 1>&2
 +      echo "===============================================" 1>&2
 +      echo "$result" 1>&2
 +      if echo $result | grep -q "ERROR"; then
 +        stat=2
 +      elif [ "$stat" -eq "0" ]; then
 +        stat=1
 +      fi
      fi
    done
  fi