diff --git a/build b/build index ffec483c9..c1a00ad6a 100755 --- a/build +++ b/build @@ -39,14 +39,15 @@ etcd_build() { } etcd_setup_gopath() { - export GOPATH=${CDIR}/gopath - rm -f $GOPATH/src - mkdir -p $GOPATH - ln -s ${CDIR}/cmd/vendor $GOPATH/src + etcdGOPATH=${CDIR}/gopath + # preserve old gopath to support building with unvendored tooling deps (e.g., gofail) + export GOPATH=${etcdGOPATH}:$GOPATH + rm -f ${etcdGOPATH}/src + mkdir -p ${etcdGOPATH} + ln -s ${CDIR}/cmd/vendor ${etcdGOPATH}/src } toggle_failpoints -etcd_setup_gopath # don't build when sourced (echo "$0" | grep "/build$" > /dev/null) && etcd_build || true diff --git a/test b/test index f16b6c25f..5aaa654f7 100755 --- a/test +++ b/test @@ -12,6 +12,9 @@ set -e source ./build +# build tests with vendored dependencies +etcd_setup_gopath + if [ -z "$PASSES" ]; then PASSES="fmt dep compile build unit" fi