mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: don't use hardcoded package lists for testing
This commit is contained in:
parent
8bb0ce54e6
commit
6c0882145a
8
test
8
test
@ -27,9 +27,11 @@ mkdir -p $GOPATH
|
||||
ln -s ${PWD}/cmd/vendor $GOPATH/src
|
||||
|
||||
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
||||
PKGS=`ls pkg/*/*go | cut -f1,2 -d/ | sort | uniq`
|
||||
TESTABLE_AND_FORMATTABLE="auth client clientv3 discovery error etcdctl/ctlv2 etcdctl/ctlv3 etcdmain etcdserver etcdserver/auth etcdserver/api/v2http etcdserver/api/v2http/httptypes etcdserver/api/v3rpc etcdserver/api/v3rpc/rpctypes $PKGS proxy/httpproxy proxy/tcpproxy raft snap mvcc mvcc/backend store version wal rafthttp"
|
||||
FORMATTABLE="$TESTABLE_AND_FORMATTABLE *.go etcdctl/ integration clientv3/integration e2e alarm"
|
||||
IGNORE_PKGS="(cmd|vendor|etcdserverpb|rafttest)"
|
||||
INTEGRATION_PKGS="(integration|e2e|contrib|functional-tester)"
|
||||
TEST_PKGS=`find . -name \*_test.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | sed "s|\./||g"`
|
||||
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"`
|
||||
|
||||
# user has not provided PKG override
|
||||
if [ -z "$PKG" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user