Skip to content

Commit

Permalink
Merge pull request etcd-io#6194 from heyitsanthony/fix-gofail
Browse files Browse the repository at this point in the history
build: don't override gopath by default, demote old gopath on override
  • Loading branch information
Anthony Romano authored Aug 16, 2016
2 parents cf063ed + e1519cf commit 28b797b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28b797b

Please sign in to comment.