This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
forked from vectorengine/vectorsql
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
97 lines (73 loc) · 1.69 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
export GO111MODULE = off
export GOPATH := $(shell pwd)
build:
@echo "--> Building..."
go build -v -o bin/vectorsql-server src/cmd/server.go
goyacc:
goyacc -o src/parsers/sqlparser/sql.go src/parsers/sqlparser/sql.y
clean:
@echo "--> Cleaning..."
@go clean
@rm -f bin/*
test:
@echo "--> Testing..."
@$(MAKE) testbase
@$(MAKE) testconfig
@$(MAKE) testsessions
@$(MAKE) testexpressions
@$(MAKE) testprocessors
@$(MAKE) testdatatypes
@$(MAKE) testdatastreams
@$(MAKE) testparsers
@$(MAKE) testplanners
@$(MAKE) testoptimizers
@$(MAKE) testexecutors
@$(MAKE) testtransforms
testbase:
go test -v -race base/xlog
go test -v -race base/lru
go test -v -race base/metric
testconfig:
go test -v -race config
testsessions:
go test -v -race sessions
testprocessors:
go test -v -race processors
testdatatypes:
go test -v -race datatypes
testdatastreams:
go test -v -race datastreams
testexpressions:
go test -v -race expressions
testparsers:
go test -v -race parsers/...
testplanners:
go test -v -race planners
testoptimizers:
go test -v -race optimizers
testexecutors:
go test -v -race executors
testtransforms:
go test -v -race transforms
pkgs = config \
sessions \
processors \
parsers/... \
datatypes \
datastreams \
expressions \
planners \
optimizers \
executors \
transforms
coverage:
go build -v -o bin/gotestcover \
src/vendor/github.com/pierrre/gotestcover/*.go;
bin/gotestcover -coverprofile=coverage.out -v $(pkgs)
go tool cover -html=coverage.out
check:
go get -v github.com/golangci/golangci-lint/cmd/golangci-lint
bin/golangci-lint --skip-dirs github run src/... --skip-files sql.go
fmt:
go fmt $(pkgs)
.PHONY: build clean install fmt test coverage