Skip to content

Commit

Permalink
Statical linking for docker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noname0443 committed Sep 7, 2023
1 parent b611deb commit 8da0a06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ 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
mkdir ./tests/logs
(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
Expand Down

0 comments on commit 8da0a06

Please sign in to comment.