Skip to content

Commit

Permalink
makefile: remove build in test
Browse files Browse the repository at this point in the history
use `make test` to run unit tests, it don't need build.

Signed-off-by: Yadong Ding <[email protected]>
  • Loading branch information
Desiki-high committed Dec 24, 2023
1 parent 832236f commit b4354ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contrib/ctr-remote/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build:
release:
@CGO_ENABLED=0 ${PROXY} GOOS=linux GOARCH=${GOARCH} go build -ldflags '-s -w -extldflags "-static"' -v -o bin/ctr-remote ./cmd/main.go

test: build
test:
go vet $(PACKAGES)
golangci-lint run
go test -v -cover ${PACKAGES}
Expand Down
2 changes: 1 addition & 1 deletion contrib/nydus-overlayfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif
all: build

build:
@CGO_ENABLED=0 ${PROXY} GOOS=linux GOARCH=${GOARCH} go build -ldflags="-s -w -X 'main.Version=${GIT_COMMIT}' -X 'main.BuildTime=${BUILD_TIME}'" -v -o bin/nydus-overlayfs ./cmd/main.go
@CGO_ENABLED=0 ${PROXY} GOOS=linux GOARCH=${GOARCH} go build -ldflags="-s -w -X 'main.Version=${GIT_COMMIT}' -X 'main.BuildTime=${BUILD_TIME}'" -v -o bin/nydus-overlayfs ./cmd/main.go

release:
@CGO_ENABLED=0 ${PROXY} GOOS=linux GOARCH=${GOARCH} go build -ldflags '-s -w -extldflags "-static"' -v -o bin/nydus-overlayfs ./cmd/main.go
Expand Down
6 changes: 3 additions & 3 deletions contrib/nydusify/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ release:
plugin:
@CGO_ENABLED=0 ${PROXY} GOOS=linux GOARCH=${GOARCH} go build -ldflags '-s -w -extldflags "-static"' -o nydus-hook-plugin ./plugin

test: build
test:
@go vet $(PACKAGES)
golangci-lint run
@go test -covermode=atomic -coverprofile=coverage.txt -count=1 -v -timeout 20m -race ${PACKAGES}
@go test -covermode=atomic -coverprofile=coverage.txt -count=1 -v -timeout 20m -parallel 16 -race ${PACKAGES}

coverage: test
@go tool cover -func=coverage.out
@go tool cover -func=coverage.txt

clean:
rm -f cmd/nydusify
Expand Down

0 comments on commit b4354ce

Please sign in to comment.