diff --git a/build b/build index c56a2f944..03824461e 100755 --- a/build +++ b/build @@ -84,6 +84,10 @@ tools_build() { toggle_failpoints_default +if [[ "${ETCD_SETUP_GOPATH}" == "1" ]]; then + etcd_setup_gopath +fi + # only build when called directly, not sourced if echo "$0" | grep "build$" >/dev/null; then etcd_build diff --git a/test b/test index cc8897902..78e657df9 100755 --- a/test +++ b/test @@ -16,10 +16,6 @@ set -e source ./build -if [[ "${ETCD_SETUP_GOPATH}" == "1" ]]; then - etcd_setup_gopath -fi - # build before setting up test GOPATH if [[ "${PASSES}" == *"functional"* ]]; then ./tools/functional-tester/build