mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Avoid getting gofail/runtime when failpoints are disabled
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
8438ddae3e
commit
ebf41c2d48
@ -19,22 +19,24 @@ toggle_failpoints() {
|
||||
mode="$1"
|
||||
if command -v gofail >/dev/null 2>&1; then
|
||||
run gofail "$mode" server/etcdserver/ server/storage/backend/ server/storage/mvcc/
|
||||
(
|
||||
cd ./server
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./etcdutl
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./etcdctl
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./tests
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
if [[ "$mode" == "enable" ]]; then
|
||||
(
|
||||
cd ./server
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./etcdutl
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./etcdctl
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
(
|
||||
cd ./tests
|
||||
run go get go.etcd.io/gofail/runtime
|
||||
) || exit 2
|
||||
fi
|
||||
elif [[ "$mode" != "disable" ]]; then
|
||||
log_error "FAILPOINTS set but gofail not found"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user