From 6a805e5222a2df34e8fde0f29dfe948936e844ae Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 13 Apr 2017 14:00:59 -0700 Subject: [PATCH] test: do not run extra static checks on release branch Things are usually already fixed in master branch but not worth backporting. Signed-off-by: Gyu-Ho Lee --- .travis.yml | 12 ------------ test | 48 +----------------------------------------------- 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7bdbbd390..0b74c3a72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,18 +32,6 @@ matrix: - go: tip env: TARGET=ppc64le -addons: - apt: - packages: - - libpcap-dev - - libaspell-dev - - libhunspell-dev - -before_install: - - go get -v github.com/chzchzchz/goword - - go get -v honnef.co/go/simple/cmd/gosimple - - go get -v honnef.co/go/unused/cmd/unused - # disable godep restore override install: - pushd cmd/etcd && go get -t -v ./... && popd diff --git a/test b/test index b9cd3d72f..ea845dcfa 100755 --- a/test +++ b/test @@ -9,7 +9,7 @@ # PKG=./wal ./test # PKG=snap ./test # -# Run code coverage +# Run code coverage # COVERDIR=coverage PASSES=cov ./test set -e @@ -32,10 +32,6 @@ TEST_PKGS=`find . -name \*_test.go | while read a; do dirname $a; done | sort | FORMATTABLE=`find . -name \*.go | while read a; do echo $(dirname $a)/"*.go"; done | sort | uniq | egrep -v "$IGNORE_PKGS" | sed "s|\./||g"` TESTABLE_AND_FORMATTABLE=`echo "$TEST_PKGS" | egrep -v "$INTEGRATION_PKGS"` -# TODO: 'client' pkg fails with gosimple from generated files -# TODO: 'rafttest' is failing with unused -GOSIMPLE_UNUSED_PATHS=`find . -name \*.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | grep -v 'client'` - if [ -z "$GOARCH" ]; then GOARCH=$(go env GOARCH); fi @@ -194,48 +190,6 @@ function fmt_pass { fi done - if which goword >/dev/null; then - echo "Checking goword..." - # get all go files to process - gofiles=`find $FMT -iname '*.go' 2>/dev/null` - # ignore tests and protobuf files - gofiles=`echo ${gofiles} | sort | uniq | sed "s/ /\n/g" | egrep -v "(\\_test.go|\\.pb\\.go)"` - # only check for broken exported godocs - gowordRes=`goword -use-spell=false ${gofiles} | grep godoc-export | sort` - if [ ! -z "$gowordRes" ]; then - echo -e "goword checking failed:\n${gowordRes}" - exit 255 - fi - else - echo "Skipping goword..." - fi - - if which gosimple >/dev/null; then - echo "Checking gosimple..." - for path in $GOSIMPLE_UNUSED_PATHS; do - simplResult=`gosimple ${path} 2>&1 || true` - if [ -n "${simplResult}" ]; then - echo -e "gosimple checking ${path} failed:\n${simplResult}" - exit 255 - fi - done - else - echo "Skipping gosimple..." - fi - - if which unused >/dev/null; then - echo "Checking unused..." - for path in $GOSIMPLE_UNUSED_PATHS; do - unusedResult=`unused ${path} 2>&1 || true` - if [ -n "${unusedResult}" ]; then - echo -e "unused checking ${path} failed:\n${unusedResult}" - exit 255 - fi - done - else - echo "Skipping unused..." - fi - echo "Checking for license header..." licRes=$(for file in $(find . -type f -iname '*.go' ! -path './cmd/*' ! -path './gopath.proto/*'); do head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo -e " ${file}"