From 4807b869f0299f4fb0073c20347b886945f16dd5 Mon Sep 17 00:00:00 2001 From: noname0443 Date: Thu, 7 Sep 2023 18:32:28 +0300 Subject: [PATCH] Statical linking for docker tests (#35) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b0e6e423..5b020e72 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ jepsen_base_img: docker build --tag=mysync-jepsen-test-base tests/images/jepsen_common test: - GOOS=linux go build -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql/mysync rm -rf ./tests/logs @@ -30,7 +30,7 @@ test: (cd tests; go test -timeout 150m) jepsen_test: - GOOS=linux go build -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql_jepsen/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql_jepsen/mysync docker-compose -p mysync -f ./tests/images/jepsen-compose.yml up -d --force-recreate --build