1 Star 1 Fork 0

endlife93/Gaea

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
ROOT:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
GOOS ?= linux
GOARCH ?= $(shell go env GOARCH)
GOENV := CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH)
GO := $(GOENV) go
GAEA_OUT:=$(ROOT)/bin/gaea
GAEA_CC_OUT:=$(ROOT)/bin/gaea-cc
PKG:=$(shell go list -m)
.PHONY: all build gaea gaea-cc parser clean test build_with_coverage
all: build test
build: parser gaea gaea-cc
gaea:
$(GO) build -o $(GAEA_OUT) $(shell bash gen_ldflags.sh $(GAEA_OUT) $(PKG)/core $(PKG)/cmd/gaea)
gaea-cc:
$(GO) build -o $(GAEA_CC_OUT) $(shell bash gen_ldflags.sh $(GAEA_CC_OUT) $(PKG)/core $(PKG)/cmd/gaea-cc)
parser:
cd parser && make && cd ..
clean:
@rm -rf bin
@rm -f .coverage.out .coverage.html
ALL_CHECKS = EOF spelling
check: $(addprefix check-,$(ALL_CHECKS))
check-%:
./hack/verify-$*.sh
test:
go test -gcflags="all=-l -N" -coverprofile=.coverage.out `go list ./...` -short
go tool cover -func=.coverage.out -o .coverage.func
tail -1 .coverage.func
go tool cover -html=.coverage.out -o .coverage.html
e2e-test: gaea gaea-cc
cp bin/gaea bin/gaea-cc tests/e2e/cmd/
./hack/e2e-mysql5.sh
./hack/ginkgo-run-mysql5.sh
e2e-test-mysql8: gaea gaea-cc
cp bin/gaea bin/gaea-cc tests/e2e/cmd/
./hack/e2e-mysql8.sh
./hack/ginkgo-run-mysql8.sh
integrate_test:
go test -timeout 30m -coverprofile=.integrate_coverage.out ./... -run ^TestIntegration$
go tool cover -func=.integrate_coverage.out -o .integrate_coverage.func
tail -1 .integrate_coverage.func
go tool cover -html=.integrate_coverage.out -o .integrate_coverage.html
build_with_coverage:
go test -c cmd/gaea/main.go cmd/gaea/main_test.go -coverpkg ./... -covermode=count -o bin/gaea
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tobepower/Gaea.git
git@gitee.com:tobepower/Gaea.git
tobepower
Gaea
Gaea
master

搜索帮助